{"uid":"cap_1ruEH3L-2tjNsc8K4j5V9","slug":"agent-buyer-identity-preflight-x402-purchase-governance-be06ba91","name":"Agent Buyer Identity Preflight | x402 Purchase Governance","description":"Machine-payable service intelligence for discovering, verifying, and monitoring identity, risk, authorization, execution-preflight, and evidence APIs before autonomous agents spend.","url":"https://base-agent-preflight.bytoken2023.workers.dev/v1/x402/agent/capability-security-preflight","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["target_type","identifier"],"properties":{"domain":{"type":"string","pattern":"^(?=.{1,253}$)(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}$"},"x402_url":{"type":"string","pattern":"^https?://","maxLength":2048},"identifier":{"type":"string","maxLength":512,"minLength":1,"description":"Human-readable package, repository, agent, API, or capability identifier."},"github_repo":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,100}$"},"npm_package":{"type":"string","maxLength":214,"minLength":1},"npm_version":{"type":"string","maxLength":80,"minLength":1},"openapi_url":{"type":"string","pattern":"^https?://","maxLength":2048},"target_type":{"enum":["agent","package","repository","api","capability"],"type":"string","description":"Capability type being evaluated."},"github_owner":{"type":"string","pattern":"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$"},"agent_card_url":{"type":"string","pattern":"^https?://","maxLength":2048}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"network":{"type":"string"},"product":{"type":"string"},"activity":{"type":"object"},"identity":{"type":"object"},"assessment":{"type":"object"},"provenance":{"type":"object"}}}}}}},"responseSchema":{"type":"json","example":{"network":"eip155:8453","product":"agent-capability-security-preflight","assessment":{"flags":[],"risk_level":"low","risk_score":0}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","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.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_V5HdRbpOVZ1bZxqOrTCr-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Verifies whether an AI agent's buyer role, capability type, price, and approval policy are appropriate before it purchases an x402-gated API, dataset, or tool.","exampleAgentPrompt":"Before you spend any USDC, run a preflight check on that x402 API at https://data.example.com/v1/prices — target type is 'api', identifier is 'example-prices-api' — and tell me the risk score and any flags before we proceed.","exampleUseCases":[{"title":"Preflight before buying x402 dataset","prompt":"Before my agent pays for the dataset at https://datasets.example.com/v1/economic-indicators, can you do a preflight check with target type 'capability' and identifier 'economic-indicators-dataset' to see if the purchase is low-risk and within policy?"},{"title":"Validate npm package purchase eligibility","prompt":"My agent wants to buy access to an x402-gated npm package called 'secure-llm-tools' version '2.1.0' — can you run a buyer identity preflight with target type 'package' to check whether this is authorized and what the risk level is?"},{"title":"Governance check before agent acquires GitHub repo access","prompt":"Before my agent spends USDC on the x402-gated GitHub repo 'coinbase/agentkit', run a purchase governance preflight with target type 'repository', github owner 'coinbase', and repo 'agentkit', and let me know if there are any flags or policy blockers."}],"resultDescription":"A JSON object containing a risk_level (e.g. 'low', 'medium', 'high'), a numeric risk_score, a list of flags indicating any policy violations or concerns, plus identity, activity, provenance, and assessment objects describing why the purchase was approved or flagged — all scoped to the EIP-155 Base network (eip155:8453).","failureModes":["Missing required fields (target_type or identifier) returns a validation error","Unknown or unreachable x402_url may result in incomplete provenance data","High risk_score or non-empty flags array indicates purchase should be blocked","Invalid domain or github_owner pattern triggers schema validation rejection","Service may return partial assessment if external identity sources are unavailable"],"whenToPreferThis":"Use this endpoint specifically when an AI agent is about to make an x402 USDC payment for an API, dataset, tool, or capability and you need a governance/risk check before authorizing the spend. It is purpose-built for the x402 payment protocol and agent buyer identity scenarios, unlike generic fraud detection or OAuth authorization services. Prefer it when the purchase involves agent-to-agent or agent-to-API transactions on the Base network where policy compliance and risk scoring are required prior to payment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:50:53.763Z","isFirstParty":false}