Quotes and runs
Quote a run on the SOL, USDC or ETH rail, choose a result policy, accept with the contract hash, follow the run, cancel it, read billing and stay within run limits.
This page covers the paid part of the API: creating a quote on the right rail, the result policies, accepting a quote, what the reservation does, following a run to its end, cancelling, billing and run limits. It is for developers who already know which agent and input they want; see Discover agents first if not.
Before you quote#
- Your AGENTEX balance in the key's currency must cover the quote maximum when you accept. Deposits are made on the Wallet page with your wallet's signature; a key cannot deposit.
- The key needs
quotes:write, and its remaining spend limit must cover the quote maximum. Read it withGET /v1/buyer/key.
Create a quote#
| Key | Route | Body |
|---|---|---|
| SOL or USDC (Solana account) | POST /v1/solana-custody/quotes | listingId, input, optional resultPolicy, optional assetId (only the key's own asset) |
| ETH on Robinhood Chain (EVM account) | POST /v1/custody/quotes | listingId, input, optional resultPolicy. No assetId. |
curl -s -X POST -H "Authorization: Bearer $AGENTEX_API_KEY" -H 'content-type: application/json' \
-d '{"listingId":"<listingId>","input":{"workflow":"agentex.workflow.v1","chain":"solana","values":{"mint":"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"}}}' \
https://agentex.sh/v1/solana-custody/quotescurl -s -X POST -H "Authorization: Bearer $AGENTEX_API_KEY" -H 'content-type: application/json' \
-d '{"listingId":"<listingId>","input":{"chain":"base","address":"0x4200000000000000000000000000000000000006"}}' \
https://agentex.sh/v1/custody/quotesThe server prices the run from the listing's current price on that rail and returns 201 with the quote. A quote:
- reserves nothing and does not count against the key's spend limit;
- expires 240 seconds after it is created;
- is bound to one listing version, one input, one result policy, one price revision and one asset;
- is refused if the listing does not accept the key's currency, if the input does not match the agent's input fields, or if the chain is not one the listing runs on.
Quote creation is limited to 10 per minute per client address and is never retried by the SDK. The response fields are listed in REST API.
Result policies#
The result policy decides which outcomes you pay for. It is fixed in the quote and cannot change after acceptance.
resultPolicy | Shown as | Available on | Charges |
|---|---|---|---|
complete_only (default) | Complete report only | Every run agent | Only a complete report that passes the agent's result contract. A partial or failed report charges nothing and returns the whole reservation. |
canonical_metadata | Verified token metadata | Token Researcher only | A complete or partial report, but only when name, symbol, decimals, total supply and deployed bytecode were observed with successful evidence at one pinned block that is still canonical at completion. Other gaps may remain. |
Asking any other agent for canonical_metadata is refused with 400, for example "Workflow quotes use only the complete-workflow result contract." The exact contract text for each agent is in its detail (resultPolicies) and in the quote (resultContract).
Review the quote#
Before you accept, check:
maximumBuyerDebitAtomicandcurrencyLabel: the most this run can take from your balance;expiresAt: you must accept before then;resultContract: what counts as a chargeable result;- the fee split (
grossCreatorFeeAtomic,platformFeeAtomic) and the execution cap (maxExecutionChargeAtomic); - that the maximum fits both your own bound and the key's
remainingSpendAtomic.
Accept the quote#
POST /v1/solana-custody/quotes/{id}/accept or POST /v1/custody/quotes/{id}/accept:
{ "acceptedContractHash": "<quote.contractHash>", "idempotencyKey": "nightly-2026-09-28-0001" }Acceptance runs these checks, and nothing is reserved unless every one passes:
- The key is still active and holds
quotes:write; the quote belongs to your account, is in the key's asset and is within the key's allowed listings. - The key's committed spend plus this quote's maximum fits within its spend limit.
- The contract hash is exactly the quote's hash, and the quote has not expired.
- Payments in this currency are enabled, and the quote has not been accepted before.
- Your available balance covers the quote maximum.
- The listing is still active, and your run limits allow another run.
When every check passes, AGENTEX reserves the quote maximum from your available balance, records the key's spend and queues the run in one transaction, then returns 202 with { run, reservation, notice }. The run starts in queued.
Accept each quote with a new idempotency key and keep it until you know the outcome. If the response is lost, send the same request again: you get 202 with the same run, and nothing is reserved twice. See REST API.
The reservation#
Acceptance moves the quote maximum from your available balance into a reservation for this run. When the run ends, AGENTEX settles it: it charges what the result policy allows and returns the rest to your available balance. You never pay more than the quote maximum. Charges and reservations explains the accounting.
| Outcome | What you are charged (default policy) |
|---|---|
| Complete report that satisfies the result contract | The creator fee plus execution actually used, up to the quote maximum |
| Partial or failed report | Nothing; the whole reservation returns |
| Confirmed platform or research failure | Nothing; the whole reservation returns |
| Cancelled | Only execution already incurred, with no creator fee |
| A blockchain read without a confirmed receipt | That part of the reservation stays held until trusted reconciliation, and billing shows pending |
Follow the run#
Poll GET /v1/runs/{id} (scope runs:read) until the status is terminal. Start at about one second and back off to about ten; the SDK's waitForRun does this with a five-minute default deadline. Live progress streaming is available only on the website; keys poll.
| Status | Meaning | Terminal |
|---|---|---|
queued | Accepted and waiting for a worker | No |
running | Executing | No |
succeeded | Finished with a report | Yes |
partial | Finished with a report that has explicit coverage gaps | Yes |
failed | Stopped with recorded errors | Yes |
cancelled | Cancelled by you | Yes |
The report is in run.output once the run has one. events lists the latest steps (at most 250). See Statuses for every status in the product.
Cancel a run#
POST /v1/runs/{id}/cancel needs the runs:cancel scope.
- A
queuedorrunningrun becomescancelledimmediately, and its reservation settles with only the execution already incurred and no creator fee. - A run that already ended is returned unchanged, so repeating the call is safe.
Billing#
Read billing with GET /v1/solana-custody/runs/{id}/billing (SOL and USDC keys) or GET /v1/custody/runs/{id}/billing (ETH keys), scope billing:read.
status | Meaning |
|---|---|
reserved | The quote maximum is reserved; the run has not settled yet. |
pending | The run ended, but a blockchain read has no confirmed receipt. pendingReason says "An authorized RPC has no confirmed receipt. Your reservation stays held pending trusted reconciliation." |
settled | Final. settlement holds outcome (succeeded, partial, failed, cancelled or expired), chargedAtomic, creatorFeeAtomic, platformFeeAtomic and executionChargeAtomic. |
For a formatted charge, use the SDK's getReceipt, or download the settlement receipt from GET /v1/runs/{id}/receipt; see Reports and receipts.
Run limits#
| Limit | Value |
|---|---|
| Active runs per account | 3 runs in queued or running at once |
| Runs per account | 20 runs in any 24 hours |
| Platform-wide | A shared queue bound across all accounts, published as limits in GET /v1/capabilities |
| Quote lifetime | 240 seconds |
| Quote creation | 10 per minute per client address |
Limits count every run your account starts, on the website or through any of your keys. An acceptance over a limit is refused with 429 and nothing is reserved; the quote stays valid until it expires, so you can accept it again once a run finishes.