The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
a2a-x402 is a widely-adopted Python project in the AI payments / x402 ecosystem, focused on a2a, a2a-protocol, agentic-ai, agents. It currently has 541 GitHub stars and 141 forks, and sits alongside related tools like x402, lucid-agents, summoner-agents, x402, aser, a2a-go.
The official bridge between Google’s Agent-to-Agent (A2A) protocol and x402: an extension that lets one agent pay another for a service, on-chain, as part of a standard A2A conversation. It explicitly revives the spirit of HTTP 402 for the decentralized agent ecosystem.
This repo matters out of proportion to its size because it is the convergence point of the two biggest protocol bets in agent payments — A2A for coordination, x402 for settlement. If you want to understand how a "paid task" between two autonomous agents actually flows, this is the canonical example, in Python.
Best for: anyone building multi-agent systems where agents hire each other. Read this before designing your own escrow or invoicing layer.
The A2A x402 Extension brings cryptocurrency payments to the Agent-to-Agent (A2A) protocol, enabling agents to monetize their services through on-chain payments. This extension revives the spirit of HTTP 402 "Payment Required" for the decentralized agent ecosystem.
Enable agent commerce by providing a standardized way for agents to charge for their services and receive payments on-chain. This transforms any A2A agent into a commercial service that can charge for API calls, data processing, AI inference, or any other valuable capability.
This repository contains the specification, core libraries, and example implementations for the A2A x402 extension, supporting multiple languages.
x402-a2a/
├── spec/
│ └── v0.1/
│ └── spec.md # The official x402 extension specification
│
├── schemes/ # Directory contains experimental x402 payment schemes drafted by partners and other contributors
│
└── {language}/ # Language-specific implementations (e.g., python/, typescript/)
├── x402_a2a/ # The core library for the x402 extension
│
└── examples/
└── {demo}/ # Demonstrations for each language implementation
The x402 extension defines a simple, robust payment flow between agents:
payment-required message.payment-submitted message.payment-completed message, delivering the requested service.This flow is designed to be implemented in any language, allowing developers to focus on their agent's core logic.
Each language-specific implementation (e.g., python/x402_a2a) contains its own README.md with detailed instructions on how to install dependencies, run tests, and use the library.
The examples/ directory contains various demonstrations of the x402 extension. Each example also has its own README.md with instructions on how to run it.
The x402_a2a libraries follow a functional core, imperative shell architecture:
This design provides both flexibility and ease of use, allowing developers to either build custom payment logic with the core protocol or use the executors for a more hands-off approach.
Contributions are welcome! Please read the specification and the existing code to understand the project's design and goals. Then, feel free to open a pull request with your changes.
💸 Simplify payments with x402, an open protocol for fast, fee-free digital dollar transactions. Experience seamless integration and instant settlements.
Lucid Agents Commerce SDK. Bootstrap AI agents in 60 seconds that can pay, sell, and participate in agentic commerce supply chains. Our protocol agnostic SDK provides CLI-generated templates and drop-in adapters for Hono, Express, Next.js, and TanStack, giving you instant access to crypto/fiat payment rails (AP2, A2A, x402, ERC8004).
A collection of Summoner clients and agents featuring example implementations and reusable templates
💸 Enable seamless, low-cost digital dollar payments with x402—zero fees, instant settlement, and no high minimums for all users.
Aser is a lightweight, self-assembling AI Agent frame.
Golang SDK for A2A Protocol
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Agent behavior that compiles
A small, powerful, open-source CLI coding agent that works with open models.
Beacon - agent-to-agent pings with optional RTC value attached (BoTTube/Moltbook/RustChain + UDP bus)
AI agents platform that gives you a workspace with an integrated team of personal assistants that can work behind the scenes to handle daily monotonous tasks.