a2a-python
Official Python SDK for the Agent2Agent (A2A) Protocol
What is a2a-python?
Official Python SDK for the Agent2Agent (A2A) Protocol
Overview of a2a-python
What it is
a2a-python is the official Python SDK for the Agent2Agent (A2A) Protocol. It provides a library for building agentic applications that operate as A2A Servers, following the A2A specification. The SDK supports multiple transports including JSON-RPC, HTTP+JSON/REST, and gRPC, and is built on modern async Python. It implements the A2A Protocol Specification version 1.0, with a compatibility mode for version 0.3.
Key features
- A2A Protocol Compliant: Build agentic applications that adhere to the Agent2Agent (A2A) Protocol.
- Extensible: Easily add support for different communication protocols and database backends.
- Asynchronous: Built on modern async Python for high performance.
- Optional Integrations: Includes optional support for HTTP servers (FastAPI, Starlette), gRPC, OpenTelemetry for tracing, and SQL databases (PostgreSQL, MySQL, SQLite).
Use cases
This SDK is suitable for developers building agentic applications that need to communicate using the A2A Protocol. It can be used to create A2A servers and clients that interact over JSON-RPC, HTTP+JSON/REST, or gRPC transports. The optional database integrations allow agents to persist state or data using PostgreSQL, MySQL, or SQLite. The telemetry integration enables tracing and monitoring of agent interactions.
Getting started
Prerequisites: Python 3.10+ and uv (recommended) or pip.Install the core SDK:uv add a2a-sdkOr with pip:pip install a2a-sdkTo run the helloworld example:git clone https://github.com/a2aproject/a2a-samples.gitcd a2a-samples/samples/python/agents/helloworlduv run .In another terminal, run the client:cd a2a-samples/samples/python/agents/helloworlduv run test_client.py
License and pricing
This project is licensed under the Apache 2.0 License. It is open source and free to use.
Based on the project's public README and repository metadata.