-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
tools[Component] This issue is related to tools[Component] This issue is related to tools
Description
Feature Request
Problem
ADK has samples for MCP integration, RAG, multi-agent workflows, and dozens of other patterns, but no samples demonstrating how an agent handles paid API access. As agents interact with premium services, they need a standard way to handle HTTP 402 (Payment Required) responses.
Proposed Solution
Add a sample agent that handles x402 payment negotiation. When fetching from a paid API:
- Agent receives HTTP 402 with payment requirements
- Evaluates cost against spending policy (per-tx cap, daily limit, recipient allowlist)
- Signs a USDC payment proof
- Retries with payment header
Implementation
PR #4937 implements this with two tools (fetch_paid_api + get_spending_status) and a mock server for testing.
Context
The x402 protocol (by Coinbase) standardizes HTTP 402 payment negotiation. This pattern was recently merged into NVIDIA's NeMo Agent Toolkit.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
tools[Component] This issue is related to tools[Component] This issue is related to tools