{"service":"AgentSpendGuard","targetBuyer":"Autonomous buyer, wallet, and trading agents that need a cheap risk decision before spending USDC or signing EVM calldata.","primaryPromise":"Return strict JSON allow/caution/block risk reports that another agent can consume without natural-language parsing.","decisionContract":{"allowedVerdicts":["allow","caution","block"],"whenToCall":{"/v1/x402-risk":"Before paying a newly discovered x402 HTTP resource.","/v1/token-risk":"Before swapping into or interacting with an EVM token.","/v1/tx-explain":"Before signing EVM calldata or submitting a transaction."},"stopConditions":[{"field":"verdict","operator":"equals","value":"block","action":"do_not_continue_automatically"},{"field":"riskLevel","operator":"equals","value":"critical","action":"require_human_override"},{"field":"score","operator":"less_than","value":50,"action":"do_not_pay_or_sign"}],"machineReadableReasonCodes":true},"recommendedPolicy":{"allow":"Proceed only if the endpoint/token/transaction also matches the agent task and budget.","caution":"Ask for user confirmation, lower spend, run another check, or route to a safer alternative.","block":"Do not pay, swap, approve, or sign unless a human operator explicitly overrides."},"minimumUsefulIntegration":["Fetch /v1/buyer-guide once and cache the decisionContract.","Call the relevant paid endpoint before payment, swap, approval, or signing.","Apply stopConditions before continuing the agent workflow."],"expectedCosts":{"x402Risk":"$0.003","tokenRisk":"$0.015","txExplain":"$0.01"},"workflows":[{"name":"Preflight an unknown x402 API before payment","paidEndpoint":"https://api-production-2800.up.railway.app/v1/x402-risk","whenToCall":"Before a buyer agent pays a newly discovered x402 resource from Bazaar or another registry.","request":{"resourceUrl":"https://api.oatp.cc/tools/token_risk_scan","expectedNetwork":"eip155:8453","expectedMaxPriceUsd":1},"expectedUsefulFields":["verdict","riskLevel","score","reasons[].code","quality","alternatives"]},{"name":"Check token risk before swap or contract interaction","paidEndpoint":"https://api-production-2800.up.railway.app/v1/token-risk","whenToCall":"Before a wallet, trading, or portfolio agent swaps into or interacts with an EVM token.","request":{"chainId":8453,"tokenAddress":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","minLiquidityUsd":10000,"minHolderCount":100},"expectedUsefulFields":["verdict","riskLevel","score","token","reasons[].code","evidence"]},{"name":"Explain calldata before signing","paidEndpoint":"https://api-production-2800.up.railway.app/v1/tx-explain","whenToCall":"Before an agent signs EVM calldata, especially approvals, multicalls, swaps, and unknown selectors.","request":{"chainId":8453,"to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","valueWei":"0","data":"0x095ea7b30000000000000000000000001111111111111111111111111111111111111111ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff","knownSpenders":[]},"expectedUsefulFields":["verdict","riskLevel","score","intent","reasons[].code","recommendedAction"]}],"integration":{"x402Client":"@x402/fetch","flow":["Discover AgentSpendGuard through Bazaar search or direct URL.","POST JSON to a paid endpoint and receive HTTP 402 with x402 payment requirements.","Pay and retry using an x402-compatible buyer wallet.","Read the strict JSON response and apply recommendedPolicy before taking the next action."],"freeEndpoints":{"capabilities":"https://api-production-2800.up.railway.app/v1/capabilities","examples":"https://api-production-2800.up.railway.app/v1/examples","paymentHelp":"https://api-production-2800.up.railway.app/v1/payment-help","paymentQuote":"https://api-production-2800.up.railway.app/v1/payment-quote","paymentPreview":"https://api-production-2800.up.railway.app/v1/payment-preview","openapi":"https://api-production-2800.up.railway.app/openapi.json","usage":"https://api-production-2800.up.railway.app/v1/usage"},"paymentTroubleshooting":{"ifYouReceive402":"This is expected for paid endpoints. Use an x402-compatible buyer wallet to sign/pay and retry the same POST request.","quoteEndpoint":"https://api-production-2800.up.railway.app/v1/payment-quote","previewEndpoint":"https://api-production-2800.up.railway.app/v1/payment-preview","helpEndpoint":"https://api-production-2800.up.railway.app/v1/payment-help","unpaidTouchDefinition":"A POST that returns 402 without a successful settle is only an unpaid touch. It is not counted as a buyer until x402 settlement succeeds."}},"paidEndpoints":[{"endpoint":"POST /v1/x402-risk","url":"https://api-production-2800.up.railway.app/v1/x402-risk","priceUsd":"$0.003","purpose":"Preflight an x402 endpoint before payment using Bazaar discovery, buyer reach, recent usage, price, and metadata quality."},{"endpoint":"POST /v1/token-risk","url":"https://api-production-2800.up.railway.app/v1/token-risk","priceUsd":"$0.015","purpose":"Scan an EVM/Base token before swap or interaction using GoPlus and DexScreener evidence."},{"endpoint":"POST /v1/tx-explain","url":"https://api-production-2800.up.railway.app/v1/tx-explain","priceUsd":"$0.01","purpose":"Explain EVM calldata before signing and flag approvals, unlimited allowances, swaps, multicalls, and unknown selectors."}]}