{"uid":"cap_lUORqhp6m4vCnbjHNQ0kH","slug":"agent-buyer-identity-preflight-x402-purchase-governance-ca1fec2b","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/buyer-identity-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":["agent_role","product_category"],"properties":{"purpose":{"type":"string","pattern":"^[a-z0-9_-]{2,80}$","description":"Normalized intended use for the purchase."},"agent_role":{"enum":["research_agent","writer_agent","accounting_agent","finance_agent","operator_agent"],"type":"string","description":"Declared or credential-mapped buyer agent role."},"price_usdc":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]{1,6})?$","description":"Quoted x402 price for this purchase."},"agent_status":{"enum":["active","paused","disabled"],"type":"string","description":"Lifecycle state of the buyer agent."},"approval_ref":{"type":"string","maxLength":160,"description":"Optional human approval reference for elevated purchases."},"data_sensitivity":{"enum":["low","medium","high","restricted"],"type":"string","description":"Sensitivity level of the service or returned data."},"product_category":{"type":"string","pattern":"^[a-z0-9_-]{2,80}$","description":"Normalized category of the x402 service, such as wallet_risk, invoice_verification, or market_intelligence."}}}},"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-buyer-identity-preflight","assessment":{"flags":[],"risk_level":"low","risk_score":0}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_TZXA0w3dNld_Ma-GQoWmC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","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, status, and approval policy are compatible with a target x402 product category, price, and data sensitivity before purchase.","exampleAgentPrompt":"Before my finance_agent buys that wallet_risk API priced at 2.50 USDC, run a buyer identity preflight to check if the role is allowed for a high-sensitivity product — the agent is currently active and the purpose is portfolio_monitoring.","exampleUseCases":null,"resultDescription":"Returns a JSON object containing a risk assessment with risk_level (e.g. 'low'), a numeric risk_score, and a flags array listing any governance violations or concerns, along with identity metadata, network info (e.g. 'eip155:8453'), and provenance details about the product and buyer.","failureModes":["Missing required query params agent_role or product_category returns a 400 error","Invalid enum value for agent_role or agent_status returns a validation error","price_usdc with invalid format (non-numeric or wrong precision) rejected by schema","agent_status 'disabled' likely triggers a high risk_score and flags","Restricted data_sensitivity without approval_ref may cause policy flag","Cloudflare Worker cold start or downtime returns 503","Unrecognized product_category pattern (not matching ^[a-z0-9_-]{2,80}$) returns 400"],"whenToPreferThis":"Use this endpoint when an AI agent is about to make an x402 micropayment purchase and you need a lightweight, pre-transaction governance check to confirm the agent's declared role is appropriate for the product category, price tier, and data sensitivity — before committing any USDC. Prefer this over post-hoc audit tools or general payment firewalls when you specifically need buyer identity and role-fitness validation rather than spend-limit enforcement.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:52:29.663Z","isFirstParty":false}