{"uid":"cap_pRPsFoR2hpaNNubdu0Z1b","slug":"agent402-decide-tool-plan-for-a-task-440b7dc3","name":"Agent402 Decide: Tool Plan for a Task","description":"Describe a job and get a call-ready plan: which tools, across this catalog and outside x402 sellers with a recently verified 402, solve it end to end, in what order, with fallbacks and input params that validate against each tool's schema. Priced by depth: quick $0.003 (one best tool), plan $0.01 (the default: steps, fallbacks, params from your task, cost and latency estimates), full $0.03 (the plan plus a compiled prompt).","url":"https://agent402.tools/api/decide?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"task":{"type":"string"},"depth":{"type":"string"},"constraints":{"type":"object"}}},"responseSchema":{"type":"json","example":{"gaps":[],"plan":[{"step":1,"tool":{"slug":"ens-resolve","method":"GET","endpoint":"https://agent402.tools/api/ens-resolve","priceUsd":0.001,"firstParty":true,"exampleParams":{"name":"vitalik.eth"}},"purpose":"resolve the ENS name to an address","dependsOn":[],"fallbacks":[]},{"step":2,"tool":{"slug":"wallet-balance","method":"POST","endpoint":"https://agent402.tools/api/wallet-balance","priceUsd":0.002,"firstParty":true,"exampleParams":{"address":"{{step 1}}","network":"base"}},"purpose":"read that address's balance on Base","dependsOn":[1],"fallbacks":[]}],"task":"Resolve the ENS name vitalik.eth and read its wallet balance on Base","depth":"plan","priceUsd":0.01,"confidence":0.9,"decisionId":"dec_…","feedbackToken":"fb_…","executionCredit":{"token":"dc_…","amountUsd":0.01,"redeemWith":"POST /api/decide/execute { decisionId, creditToken }"},"estimatedCostUsd":0.003,"estimatedLatencyMs":3000}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_THe7Pfr7TOEIfUaSfah5C","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Given a task description, returns a call-ready multi-step tool plan with ranked tools, fallbacks, input parameters, and cost/latency estimates across the x402 catalog.","exampleAgentPrompt":"Can you plan out all the tool calls I'd need to research the latest EU AI Act obligations for general-purpose models and compile a cited summary — give me a full plan with validated input params and cost estimates, keeping total spend under $0.50?","exampleUseCases":[{"title":"Research workflow with citations","prompt":"I need to write a report on OPEC's latest oil production quotas with citations — can you give me a full step-by-step tool plan including validated parameters and cost estimates, staying under $1 total?"},{"title":"Budget-constrained data pipeline","prompt":"Plan out the cheapest sequence of tools that can fetch current BTC/USD price, convert it to EUR, and send a Slack notification — keep total cost under $0.10 and latency under 3 seconds, full depth please."},{"title":"Quick best-tool lookup","prompt":"What's the single best tool from the x402 catalog to geocode a street address to lat/lon coordinates? Just give me a quick recommendation."}],"resultDescription":"A JSON object containing an ordered array of tool steps, each with the tool's name, endpoint, payment rail, price, input schema, example parameters, fallback options, a fitness score, and an explanation of why it was chosen. Also includes overall confidence, total estimated cost and latency, a decision ID (reusable for execution), and a neutrality statement describing the ranking formula.","failureModes":["Task description exceeds 2000 characters — request rejected","No tools found matching the constraints — empty plan returned with gaps array populated","Specified depth value not in enum — validation error","Budget or latency constraints too tight — partial plan returned with partial:true","Tool catalog unavailable or stale — reduced confidence scores","Invalid CAIP-2 chain identifiers in constraints — schema validation error"],"whenToPreferThis":"Use this endpoint when an agent needs to dynamically discover and sequence multiple tools to complete an open-ended task, especially when the optimal tool chain is not known in advance. Prefer it over hardcoded tool selection when tasks vary, budgets must be respected, or fallback resilience is needed. The 'full' depth is ideal when you want compiled prompts with pre-validated parameters ready to execute; 'quick' is best for fast single-tool lookup; 'plan' balances detail and speed for multi-step workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-04T00:42:02.235Z","isFirstParty":false,"canonicalSlug":"agent402-decide-tool-plan-for-a-task-440b7dc3"}