{"uid":"cap_75HAX_0KKt70-aosXnRLx","slug":"agent-mid-task-x402-payment-wall-decision-procedure-7ec62357","name":"Agent Mid-Task x402 Payment Wall Decision Procedure","description":"Decision procedure for web-automation agents (Browser Use class) that hit an x402 payment wall mid-task. Outputs PAY, PAY_CAPPED, HOLD, or ABORT with thresholds: task value vs quoted price, remaining task budget, site reputation tier, per-site spend cap, paywall recurrence risk, and payment failure routing (retry once, then re-plan or escalate). Includes pre-payment challenge vetting: verify 402 challenge issuer, network, price sanity, and session binding before signing, plus post-payment","url":"https://k2so-8080.on.ascii.dev/api/services/decision-procedure-for-web-automation-agents-bro","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 Mid-Task x402 Payment Wall 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.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_qXoyF7tPNYUMXhiSBLodk","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 (PAY, PAY_CAPPED, HOLD, or ABORT) for web-automation agents that encounter an x402 payment wall mid-task, with full vetting and routing logic.","exampleAgentPrompt":"I'm running a Browser Use task and just hit an x402 payment wall mid-task — the site is quoting $0.003 USDC, my remaining task budget is $0.05, the site has a medium reputation, and my per-site spend cap is $0.01. Should I PAY, hold, or abort, and do I need to vet the challenge first?","exampleUseCases":[{"title":"Mid-task paywall spend authorization","prompt":"My web agent is halfway through a research task and just hit an x402 paywall asking for $0.005 USDC. My total remaining budget for this task is $0.02 and I've already paid this site once before — should the agent pay, cap the payment, hold for approval, or abort? Walk me through the decision."},{"title":"Pre-signing x402 challenge vetting","prompt":"Before my agent signs an x402 payment challenge on this site, I want to make sure the challenge issuer, network, price, and session binding all check out — can you run the vetting procedure and tell me if it's safe to sign?"},{"title":"Payment failure re-routing after x402 rejection","prompt":"My agent tried to pay an x402 wall, the payment failed, and now the site is still blocking access. Should the agent retry the payment, re-plan the task, or escalate to me — what's the recommended routing procedure here?"}],"resultDescription":"A structured response containing a decision outcome label (PAY, PAY_CAPPED, HOLD, or ABORT), prose explaining the decision rationale, pre-payment challenge vetting results (issuer, network, price sanity, session binding), post-payment routing instructions including retry and re-plan logic, the generation source (llm, reasoning, or deterministic), and an ISO-8601 timestamp.","failureModes":["Invalid or missing input method returns a validation error","Unrecognized topic override may produce a generic procedure rather than a tailored one","Payment for the $0.002 USDC call itself fails, blocking access to the procedure","Stale or cached procedure if the service's LLM/reasoning backend is unavailable","Network connectivity issues to k2so-8080.on.ascii.dev result in no response"],"whenToPreferThis":"Choose this endpoint when your web-automation or Browser Use agent needs a structured, threshold-based decision framework for x402 payment walls encountered mid-task — especially when you need both pre-payment challenge vetting (issuer, network, price sanity, session binding) and post-payment failure routing in a single call. Prefer it over ad-hoc agent logic when per-site spend caps, paywall recurrence risk, and task value vs quoted price comparisons need to be systematically evaluated.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:30:40.619Z","isFirstParty":false}