Feature request
Support for calling paywalled tools (specifically x402-protected HTTP endpoints) from an Agents SDK agent.
Problem
Tools are increasingly exposed as pay-per-call HTTP endpoints. There's no built-in way for an Agents SDK tool to receive a 402 Payment-Required challenge, sign the payment, and retry.
Proposed behavior
A helper (or tool wrapper) that:
- Makes the tool request.
- On HTTP 402, reads the
Payment-Required header (x402 v2).
- Signs the quoted Base USDC amount with a configured wallet.
- Retries with a
Payment-Signature header and returns the paid result.
Context
x402 is an open, HTTP-native payment standard (402 + Payment-Required/Payment-Signature headers) already used by several agent tools. A live example is POST https://genesis-agent-tools.genesisagenttools.workers.dev/api/flagships/release-guardian, which returns 402 on the first call and the paid verdict on a signed retry.
Feature request
Support for calling paywalled tools (specifically x402-protected HTTP endpoints) from an Agents SDK agent.
Problem
Tools are increasingly exposed as pay-per-call HTTP endpoints. There's no built-in way for an Agents SDK tool to receive a 402
Payment-Requiredchallenge, sign the payment, and retry.Proposed behavior
A helper (or tool wrapper) that:
Payment-Requiredheader (x402 v2).Payment-Signatureheader and returns the paid result.Context
x402 is an open, HTTP-native payment standard (402 +
Payment-Required/Payment-Signatureheaders) already used by several agent tools. A live example isPOST https://genesis-agent-tools.genesisagenttools.workers.dev/api/flagships/release-guardian, which returns 402 on the first call and the paid verdict on a signed retry.