Problem
ADK agents can discover and call tools, but there is no built-in mechanism for agents to pay for premium API access or agent-to-agent services. Agents hit rate limits, get blocked by paywalls, or need manual API key provisioning — all of which break autonomous operation.
Google ADK already supports A2A (Agent-to-Agent) communication. But A2A without a payment layer means agents can talk but cannot transact. An agent that discovers another agent's service has no way to pay for it.
Proposal: google-adk-x402 integration
Add an optional x402 payment tool that lets ADK agents:
- Detect HTTP 402 Payment Required responses from any API
- Evaluate the price against configured budgets
- Pay in USDC on Base L2 (sub-cent transaction fees)
- Retry with payment proof to get the resource
How it fits ADK
ADK's tool system already supports custom Tool implementations. An x402 wrapper could be:
from google.adk.tools import Tool
from x402 import pay
class X402Tool(Tool):
"""Wrap any HTTP endpoint with automatic x402 payment handling."""
async def run(self, args):
response = await fetch(args["url"])
if response.status == 402:
payment = await pay(response.headers["x402-requirements"])
response = await fetch(args["url"], payment_proof=payment)
return response.json()
Live ecosystem
The x402 protocol is already live in production:
- 174 payable services on minia2a.uk (on-chain data, web scraping, token security, email verification, sentiment analysis, etc.)
- 115 registered agents actively discovering services
- 298K+ requests processed
- USDC on Base L2 — sub-cent fees, instant settlement
- Protocol spec: https://docs.x402.org
Why this matters for ADK
ADK is Google's official agent framework with A2A support. Adding a payment layer makes A2A economically viable — agents can not just discover each other, but pay each other for services. This is the missing piece for a true agent economy.
Scope
- An optional
google-adk-x402 package (not in core — keeps deps lean)
- A
payment_tool that wraps any HTTP endpoint with x402 pay-and-retry
- Budget/policy configuration matching ADK's existing safety patterns
- Example: financial-advisor agent paying for real-time price oracle data
Would love to discuss or help prototype. The x402 protocol is open (Apache 2.0) and has client libraries available.
Problem
ADK agents can discover and call tools, but there is no built-in mechanism for agents to pay for premium API access or agent-to-agent services. Agents hit rate limits, get blocked by paywalls, or need manual API key provisioning — all of which break autonomous operation.
Google ADK already supports A2A (Agent-to-Agent) communication. But A2A without a payment layer means agents can talk but cannot transact. An agent that discovers another agent's service has no way to pay for it.
Proposal:
google-adk-x402integrationAdd an optional x402 payment tool that lets ADK agents:
How it fits ADK
ADK's tool system already supports custom
Toolimplementations. An x402 wrapper could be:Live ecosystem
The x402 protocol is already live in production:
Why this matters for ADK
ADK is Google's official agent framework with A2A support. Adding a payment layer makes A2A economically viable — agents can not just discover each other, but pay each other for services. This is the missing piece for a true agent economy.
Scope
google-adk-x402package (not in core — keeps deps lean)payment_toolthat wraps any HTTP endpoint with x402 pay-and-retryWould love to discuss or help prototype. The x402 protocol is open (Apache 2.0) and has client libraries available.