A plan for any job
One paid call returns a call-ready plan over this catalog and outside x402 sellers with a recently verified 402: which tools, in what order, with fallbacks and params that validate. Run it yourself, or have Agent402 run it and the fee comes back as credit.
$0.003 to $0.03 per decision, paid per request in USDC over x402 or MPP.
curl -X POST https://agent402.tools/api/decide \
-H "Content-Type: application/json" \
-d '{"task":"Check whether a wallet is on a sanctions list, then list its recent token transfers on Base","depth":"plan"}'{
"decisionId": "dec_…",
"plan": [
{
"step": 1,
"purpose": "check the wallet against sanctions lists",
"tool": {
"slug": "sanctions-wallet",
"seller": "agent402",
"firstParty": true,
"endpoint": "/api/sanctions/wallet",
"priceUsd": 0.002,
"exampleParams": {
"address": "0x…"
}
},
"fallbacks": [
"…"
],
"dependsOn": []
},
{
"step": 2,
"purpose": "fetch recent token transfers on Base",
"tool": {
"slug": "asset-transfers",
"seller": "agent402",
"firstParty": true,
"endpoint": "/api/asset-transfers",
"priceUsd": 0.003,
"exampleParams": {
"address": "0x…",
"network": "base"
}
},
"fallbacks": [
"…"
],
"dependsOn": []
}
],
"estimatedCostUsd": 0.005,
"estimatedLatencyMs": 3000,
"confidence": 0.95,
"gaps": [],
"executionCredit": {
"amountUsd": 0.01,
"token": "dc_…"
}
}How it decides.
A plan is only useful if you can trust why each tool is in it, so every step says why, every tool says whose it is, and the scoring is the same for everyone.
This catalog and outside sellers
This catalog plus outside x402 sellers, each with its price, rails, chains and input schema. Outside tools need a live 402 in the last 7 days.
One formula for every seller
Fit to the job, observed reliability, price, schema quality and a freshness pass mark, with the same weights for every tool and no term for who sells it.
Steps you can call
The job split into steps, each with a primary tool and fallbacks, params that validate against the tool's schema, and a cost and latency estimate. Gaps are named.
Yourself, or through us
Call the plan directly, or send it to /api/decide/execute. Outside steps are bought from the seller and resold at the seller's price plus a 5% markup, and a decision paid with a wallet returns its fee as credit.
Three depths.
Priced by how much of the plan you want. Each decision's fee returns as a 100% credit, valid 24 hours, toward running it.
The single best tool for the whole job, with fallbacks.
The job split into steps, each with a primary tool, fallbacks, dependencies and params filled from your task.
The plan plus a compiled prompt an agent can run as is, with more time to plan.
How a plan is priced.
Our tools and every outside seller's are scored on the same five signals with the same weights, and the formula has no term for who sells a tool. The model that judges fit sees the same bounded description for every tool, and every tool in a plan carries firstParty, so the source is disclosed.
What we charge is on the page: the decision fee by depth, our tools at list price when a plan runs through us, and outside tools at the seller's price plus a disclosed 5% markup. Reliability counts what we observe, one observation per payer per day, and reports through /api/decide/feedback can move a tool only within a bounded range.
Connect.
Three routes, the same on every surface.
claude mcp add --transport http agent402 https://agent402.tools/mcp
Questions.
What does a decision return?
A plan: each step names its tool, endpoint, price, input params that validate against that tool's schema, and fallbacks. Plus a cost and latency estimate, a confidence score, and any needs no indexed tool covers (gaps). Depth "full" adds a compiled prompt an agent can run as is.
How are Agent402's own tools ranked?
By the same formula as every other seller's, with the same weights: fit to the step, observed reliability, price, schema quality and a freshness pass mark. The formula has no term for who sells a tool, the model that judges fit sees the same bounded description for every tool, and every tool in a plan carries firstParty, so you always see whose it is.
Which outside sellers can appear?
Outside x402 sellers (including sellers that also accept MPP) whose route answered a live 402 within the last 7 days and whose input schema is known. Anything the index cannot cover is listed in gaps.
Can a step use what an earlier step returned?
Yes. When a later step needs a value an earlier step produces (the address an ENS lookup resolved, say), the plan writes {{step N}} for it and lists that step in dependsOn; when the field has another name (a lookup that returns ticker for a symbol input), it writes {{step N.field}}. Run through POST /api/decide/execute, Agent402 fills it in from the earlier step's answer: the named field, a field with the parameter's name, or the one address or IP it returned. A value it cannot name without guessing skips that step, and nothing is paid for it.
How is a plan built?
A base planner builds every plan: it splits the task into steps, retrieves and judges candidate tools, ranks them, and fills params. For a plan or full decision, a small model call then looks at the task and the base plan and may pick one specialized planner for the task's kind: chained lookups, on-chain addresses and chains, market data over a range, research with sources, or media with a format. Each one changes a single part of planning (the steps, the params, or which step a value comes from) and leaves retrieval and ranking to the same formula as the base. Its plan is served only when it is no worse than the base plan on gaps, runnable steps, params that validate and step links; otherwise, and whenever the pick is unsure, the base plan is served. The decision names the planner that built it in harness.id.
Can execute run a free plan sketch?
Yes. /api/find and /api/route answer a multi-step task with a free sketch: one tool per step, chosen by keyword, no model. Send its execute body (the step slugs and your inputs for step 1) to POST /api/decide/execute and Agent402 runs them at list price; each later step takes its one required input from the step before, and steps that take nothing from each other run side by side. A paid decision adds judged fit, fallbacks, filled params and the credit.
Can I reuse a plan and still get better tools?
Yes. A decisionId is kept 30 days: POST /api/decide/execute with it runs the same plan again. Add replan: true and the saved task is planned again with its constraints and depth before the run, on current prices and reliability, for the decision price at that depth ($0.003 to $0.03) added to the run's quote. The answer's replanned field gives the new decisionId and each step whose tool, seller or price changed, or unchanged: true. If the re-plan cannot run, the saved plan runs and the re-plan price comes back as credit when that decision's 24-hour credit window stays open past the run's deadline; otherwise the call is refused and nothing is charged on x402.
How does the credit work?
A decision paid with a wallet returns its fee as a credit worth 100% of it, valid 24 hours, toward running that plan with POST /api/decide/execute. Unspent budget from a run returns as credit until the same window closes. A decision paid with prepaid credits or a card earns no credit.
What does running a plan cost?
Our tools at list price. Outside tools at the seller's price plus a 5% markup: we buy the result from the seller and sell it to you. A run through Agent402 is paid on Base. Spend stops at your budget, fallbacks run in order, and a run where no step succeeds is not charged on x402. The separate route-and-execute call (/api/route/execute) charges one flat price per tier instead, which covers the seller's price up to that tier's limit. On either path the buyer pays; the seller is paid its own price and is never charged.