- Protocol
- A2A
- Type
- Spec
- Stars
- 572
- License
- Apache-2.0
- Last push
- Aug 4, 2026
About A2A x402 Extension
A2A x402 Extension is an open-source A2A spec by google-agentic-commerce, written mainly in Python. Extension adding x402 crypto payments to A2A agent interactions. It has 572 GitHub stars and uses the Apache-2.0 license, and its code was last pushed on Aug 4, 2026.
New to A2A? Our A2A Protocol guide explains how it works and lists other projects built on it.
At a glance
- Protocol
- A2A
- Type
- Spec
- Language
- Python
- License
- Apache-2.0
- GitHub stars
- 572
- Last push
- Aug 4, 2026
Listed from public GitHub data, checked 2026-11-08. Not scanned by AgenticMart.
Questions about A2A x402 Extension
What is A2A x402 Extension?
Extension adding x402 crypto payments to A2A agent interactions It is listed as a A2A spec, maintained in the google-agentic-commerce/a2a-x402 repository on GitHub.
How do I install A2A x402 Extension?
The README in google-agentic-commerce/a2a-x402 has the setup steps. Clone the repository with git clone https://github.com/google-agentic-commerce/a2a-x402.git and follow its instructions.
Is A2A x402 Extension an official A2A project?
No. It is a community project built on A2A, not published by the organisation that runs the protocol.
What license does A2A x402 Extension use?
It is published under the Apache-2.0 license. Check the license file in the repository before using it commercially.
Is A2A x402 Extension still maintained?
Its code was last pushed on Aug 4, 2026, and it had 572 GitHub stars when we checked on 2026-11-08. Look at recent issues and releases in the repository for a fuller picture.
README
A2A x402 Extension
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.
π― Goal
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.
ποΈ Repository Structure
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
π€ How It Works
The x402 extension defines a simple, robust payment flow between agents:
- Payment Required: A merchant agent, when payment is required for a service, responds with a
payment-requiredmessage. - Payment Submitted: The client agent signs the payment details and sends them back to the merchant in a
payment-submittedmessage. - Payment Completed: The merchant verifies the payment, settles it on-chain, and responds with a
payment-completedmessage, delivering the requested service.
This flow is designed to be implemented in any language, allowing developers to focus on their agent's core logic.
π Getting Started
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.
ποΈ Architecture
The x402_a2a libraries follow a functional core, imperative shell architecture:
- Core Protocol: The fundamental data structures and functions for creating, signing, and verifying payments.
- Executors: Middleware that automates the payment flow, making it easy to add payment capabilities to any agent.
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.
π Learn More
- Specification: The complete technical specification for the x402 extension.
- Python Library: The documentation for the Python implementation of the x402 extension.
- Python Examples: The directory containing demonstration applications for the Python implementation.
- A2A Protocol: The core agent-to-agent protocol.
- x402 Protocol: The underlying payment protocol.
- AP2 Protocol: The Agent Payments Protocol.
π€ Contributing
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.
More A2A projects
All 20 βA2A
Specification and documentation for the Agent2Agent protocol
A2A Python SDK
Python SDK for building A2A clients and servers
A2A Samples
Sample agents and code showing the A2A protocol in use