Skip to content
AGENTEX on XEnter App

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 with GET /v1/buyer/key.

Create a quote#

KeyRouteBody
SOL or USDC (Solana account)POST /v1/solana-custody/quoteslistingId, input, optional resultPolicy, optional assetId (only the key's own asset)
ETH on Robinhood Chain (EVM account)POST /v1/custody/quoteslistingId, input, optional resultPolicy. No assetId.
Quote in SOL
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/quotes
Quote in ETH: Token Researcher on Base
curl -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/quotes

The 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.

resultPolicyShown asAvailable onCharges
complete_only (default)Complete report onlyEvery run agentOnly a complete report that passes the agent's result contract. A partial or failed report charges nothing and returns the whole reservation.
canonical_metadataVerified token metadataToken Researcher onlyA 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:

  • maximumBuyerDebitAtomic and currencyLabel: 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:

JSON
{ "acceptedContractHash": "<quote.contractHash>", "idempotencyKey": "nightly-2026-09-28-0001" }

Acceptance runs these checks, and nothing is reserved unless every one passes:

  1. 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.
  2. The key's committed spend plus this quote's maximum fits within its spend limit.
  3. The contract hash is exactly the quote's hash, and the quote has not expired.
  4. Payments in this currency are enabled, and the quote has not been accepted before.
  5. Your available balance covers the quote maximum.
  6. 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.

OutcomeWhat you are charged (default policy)
Complete report that satisfies the result contractThe creator fee plus execution actually used, up to the quote maximum
Partial or failed reportNothing; the whole reservation returns
Confirmed platform or research failureNothing; the whole reservation returns
CancelledOnly execution already incurred, with no creator fee
A blockchain read without a confirmed receiptThat 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.

StatusMeaningTerminal
queuedAccepted and waiting for a workerNo
runningExecutingNo
succeededFinished with a reportYes
partialFinished with a report that has explicit coverage gapsYes
failedStopped with recorded errorsYes
cancelledCancelled by youYes

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 queued or running run becomes cancelled immediately, 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.

statusMeaning
reservedThe quote maximum is reserved; the run has not settled yet.
pendingThe 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."
settledFinal. 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#

LimitValue
Active runs per account3 runs in queued or running at once
Runs per account20 runs in any 24 hours
Platform-wideA shared queue bound across all accounts, published as limits in GET /v1/capabilities
Quote lifetime240 seconds
Quote creation10 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.