{"uid":"cap_Y58ZhEKbzE-BjWrCEaz2w","slug":"per-task-budget-assertion-procedure-for-browser-agents-28ddf7ca","name":"Per-Task Budget Assertion Procedure for Browser Agents","description":"Decision procedure for agents that buy x402 credits from a browser or workflow agent context. Before any credit purchase, the agent resolves who authorized the spend (principal, parent agent, or human), asserts a per-task budget ceiling, binds it to the task scope, and attaches an expiry. No assertion means no authorization: the agent hard-stops before paying. Includes evidence retention rules for post-hoc audit, revocation of stale assertions, and falsifier checks for over-wide scope or","url":"https://k2so-8080.on.ascii.dev/api/services/agent-payment-authorization-per-task-budget-asse?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":"Per-Task Budget Assertion Procedure for Browser Agents 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.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_f_oPC9LTgdVB-mDGst5IB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a decision procedure for agents to assert, bind, and audit per-task x402 credit purchase budgets before executing any payment in a browser or workflow context.","exampleAgentPrompt":"Before my browser agent buys any x402 credits for this task, walk me through the full per-task budget assertion procedure — including how to resolve who authorized the spend, how to set and bind a budget ceiling to this task scope, attach an expiry, and what evidence to retain for audit.","exampleUseCases":[{"title":"Pre-payment authorization check for browser agent","prompt":"My browser agent is about to purchase x402 credits to complete a web scraping task — what's the exact procedure it should follow to assert a per-task budget ceiling, confirm who authorized the spend, and ensure it hard-stops if no assertion exists?"},{"title":"Audit trail setup for agentic payment tasks","prompt":"I need my workflow agent to retain proper evidence for every x402 credit purchase it makes, including who authorized each spend and what task scope it was bound to — walk me through the evidence retention and revocation rules I should implement."},{"title":"Detecting over-wide scope in agent payment assertions","prompt":"My agent's payment authorization assertions seem to be covering more scope than the individual tasks they're supposed to — can you give me the falsifier checks and scope validation steps so I can catch and reject assertions that are too broad before any payment goes through?"}],"resultDescription":"A structured response containing decision procedure prose for the agent ('brief'), the service slug, generation source (llm, reasoning, or deterministic), an ISO-8601 timestamp, and optional topic context. The procedure details how to resolve authorization principal, assert budget ceilings, bind to task scope, set expiry, retain audit evidence, revoke stale assertions, and run falsifier checks for over-wide scope.","failureModes":["No payment header provided — agent receives a 402 Payment Required response and must acquire x402 credits before retrying","Invalid or expired payment assertion — procedure returns an authorization failure with detail on why the assertion was rejected","Over-wide scope detected by falsifier checks — procedure flags and rejects the assertion","Missing required 'input' or 'method' fields in request — returns schema validation error","Service temporarily unavailable on k2so-8080.on.ascii.dev — network or upstream LLM failure"],"whenToPreferThis":"Use this endpoint when a browser or workflow agent needs a canonical, auditable decision procedure for x402 credit purchases — particularly when you need to enforce per-task budget ceilings, bind authorizations to task scope with expiry, retain evidence for post-hoc audit, or detect and reject over-wide authorization assertions. Prefer this over ad-hoc agent payment logic when compliance, auditability, or multi-principal authorization chains are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T00:33:27.212Z","isFirstParty":false,"canonicalSlug":"per-task-budget-assertion-procedure-for-browser-agents-28ddf7ca"}