a2a-sdk

A2A Python SDK

55 个版本 Python >=3.10
安装
pip install a2a-sdk
poetry add a2a-sdk
pipenv install a2a-sdk
conda install a2a-sdk
描述

A2A Python SDK

License PyPI version PyPI - Python Version PyPI - Downloads Python Unit Tests

Ask Code Wiki
A2A Logo

A Python library for running agentic applications as A2A Servers, following the Agent2Agent (A2A) Protocol.


[!IMPORTANT] Upgrading the SDK from 0.3 to 1.0? See the v0.3 → v1.0 migration guide. For supported A2A spec versions, see Compatibility.

✨ 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:

🧩 Compatibility

This SDK implements the A2A Protocol Specification 1.0, with compatibility mode for 0.3. See #742 for details on the compatibility scope.

Spec Version Transport Client Server
1.0 JSON-RPC
1.0 HTTP+JSON/REST
1.0 gRPC
0.3 (compat) JSON-RPC
0.3 (compat) HTTP+JSON/REST
0.3 (compat) gRPC

🚀 Getting Started

Prerequisites

  • Python 3.10+
  • uv (recommended) or pip

🔧 Installation

Install the core SDK and any desired extras using your preferred package manager.

Feature uv Command pip Command
Core SDK uv add a2a-sdk pip install a2a-sdk
All Extras uv add "a2a-sdk[all]" pip install "a2a-sdk[all]"
HTTP Server uv add "a2a-sdk[http-server]" pip install "a2a-sdk[http-server]"
FastAPI Integration uv add "a2a-sdk[fastapi]" pip install "a2a-sdk[fastapi]"
gRPC Support uv add "a2a-sdk[grpc]" pip install "a2a-sdk[grpc]"
OpenTelemetry Tracing uv add "a2a-sdk[telemetry]" pip install "a2a-sdk[telemetry]"
Encryption uv add "a2a-sdk[encryption]" pip install "a2a-sdk[encryption]"
Database Drivers
PostgreSQL uv add "a2a-sdk[postgresql]" pip install "a2a-sdk[postgresql]"
MySQL uv add "a2a-sdk[mysql]" pip install "a2a-sdk[mysql]"
SQLite uv add "a2a-sdk[sqlite]" pip install "a2a-sdk[sqlite]"
All SQL Drivers uv add "a2a-sdk[sql]" pip install "a2a-sdk[sql]"

Examples

Helloworld Example

  1. Run Remote Agent

    git clone https://github.com/a2aproject/a2a-samples.git
    cd a2a-samples/samples/python/agents/helloworld
    uv run .
    
  2. In another terminal, run the client

    cd a2a-samples/samples/python/agents/helloworld
    uv run test_client.py
    
  3. You can validate your agent using the agent inspector. Follow the instructions at the a2a-inspector repo.


🌐 More Examples

You can find a variety of more detailed examples in the a2a-samples repository:


🤝 Contributing

Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines on how to get involved.


📄 License

This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.

版本列表
1.1.0 2026-05-29
1.0.3 2026-05-13
1.0.2 2026-04-24
1.0.1 2026-04-22
1.0.0 2026-04-20
1.0.0a3 2026-04-17
1.0.0a2 2026-04-17
1.0.0a1 2026-04-10
1.0.0a0 2026-03-17
0.3.26 2026-04-09
0.3.25 2026-03-10
0.3.24 2026-02-20
0.3.23 2026-02-17
0.3.22 2025-12-16
0.3.21 2025-12-12
0.3.20 2025-12-03
0.3.19 2025-11-25
0.3.18 2025-11-25
0.3.17 2025-11-24
0.3.16 2025-11-21
0.3.15 2025-11-19
0.3.14 2025-11-18
0.3.13 2025-11-17
0.3.12 2025-11-12
0.3.11 2025-11-07
0.3.10 2025-10-21
0.3.9 2025-10-15
0.3.8 2025-10-06
0.3.7 2025-09-23
0.3.6 2025-09-17
0.3.5 2025-09-08
0.3.4 2025-09-02
0.3.3 2025-08-25
0.3.2 2025-08-20
0.3.1 2025-08-13
0.3.0 2025-07-31
0.2.16 2025-07-21
0.2.15 2025-07-21
0.2.14 2025-07-18
0.2.13 2025-07-17
0.2.12 2025-07-14
0.2.11 2025-07-08
0.2.10 2025-06-30
0.2.9 2025-06-24
0.2.8 2025-06-13
0.2.7 2025-06-11
0.2.6 2025-06-09
0.2.5 2025-05-27
0.2.4 2025-05-22
0.2.3 2025-05-20
0.2.2 2025-05-20
0.2.1 2025-05-20
0.2.1a2 2025-05-20
0.2.1a1 2025-05-15
0.2.0a1 2025-05-15