{"uid":"cap_nMfaRnMCkSJ0QCooIqma9","slug":"agent-decision-procedure-x402-baseline-4a3022e5","name":"Agent Decision Procedure (x402 Baseline)","description":"Generic baseline decision procedure for an agent handling an x402 payment: ordered checks for offer validity, quote acceptance, spend authorization, settlement confirmation, and dispute readiness. Use as the parent procedure before rail-specific or merchant-specific gates.","url":"https://k2so-8080.on.ascii.dev/api/services/agent-decision-procedure?utm_source=zero.xyz","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Agent decision procedure paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Z2tD7uxswhkkB2fTOv3qQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a generic baseline decision procedure for AI agents handling x402 payments, covering offer validity, quote acceptance, spend authorization, settlement confirmation, and dispute readiness.","exampleAgentPrompt":"Before my agent approves any x402 payment, walk it through the standard baseline decision procedure — the ordered checks for offer validity, quote acceptance, spend authorization, settlement confirmation, and dispute readiness.","exampleUseCases":[{"title":"Pre-payment safety check for autonomous agent","prompt":"My agent is about to make an x402 payment to an unknown merchant — what's the standard ordered checklist it should run through before authorizing the spend?"},{"title":"Onboarding a new x402-capable agent","prompt":"I'm building a new AI agent that needs to handle x402 payments. Give it the generic baseline decision procedure to use as its default payment evaluation flow before any rail-specific logic kicks in."},{"title":"Dispute readiness review before settlement","prompt":"Before my agent finalizes an x402 settlement, what baseline procedure should it follow to make sure it's prepared for disputes and has confirmed the quote and authorization are still valid?"}],"resultDescription":"A structured response containing decision procedure prose (brief) tailored for agents, along with metadata including the topic, service slug, generation source (llm/reasoning/deterministic), ISO-8601 timestamp, and model used. The `ok` and `paid` fields confirm successful payment and handler execution.","failureModes":["Payment not included or invalid — returns 402 with payment requirements","Invalid HTTP method (POST, PUT, etc.) — schema only accepts GET/HEAD/DELETE","Malformed query parameters — topic or meta values outside accepted types may be rejected","Handler failure indicated by ok:false in result object","Service temporarily unavailable on ascii.dev infrastructure"],"whenToPreferThis":"Use this endpoint when an agent needs a general-purpose, rail-agnostic baseline procedure for x402 payment decisions — before applying any merchant-specific or rail-specific gates. It is the recommended parent procedure that should run first in any x402 payment decision chain. Prefer this over rail-specific siblings when no specific rail (Algorand, etc.) or merchant context is known yet.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T12:41:31.553Z","isFirstParty":false,"canonicalSlug":"agent-decision-procedure-x402-baseline-4a3022e5"}