a2a-cpp is a C++20 SDK for building Agent2Agent (A2A) clients and servers.
It provides Agent Card discovery, task lifecycle operations, streaming, push notifications, authentication hooks, and HTTP+JSON, JSON-RPC, and gRPC transports.
- Client APIs for messaging, task management, streaming, subscriptions, and push notification configuration.
- Server-side executor and transport abstractions for HTTP+JSON, JSON-RPC, and gRPC.
- Agent Card discovery, preferred-interface resolution, and extended-card support.
- Cancellable streaming with built-in SSE support for HTTP transports.
- Authentication metadata, interceptors, and required-extension validation.
- In-memory stores and optional PostgreSQL-backed stores.
- Installable CMake targets under the
a2a::namespace. - Continuous Linux, macOS, Windows, interoperability, benchmark, and A2A TCK validation.
- CMake 3.25 or newer.
- A C++20 compiler: GCC, Clang, AppleClang, or Visual Studio 2022.
- Protobuf and gRPC C++.
- libcurl for built-in HTTP+JSON, JSON-RPC, and SSE clients.
- PostgreSQL client libraries only when PostgreSQL stores are enabled.
See the platform-specific installation guide.
On Debian, Ubuntu, or Windows Git Bash:
git clone https://github.com/MisterVVP/a2a-cpp.git
cd a2a-cpp
./scripts/install_build_deps.sh
./scripts/run_examples.sh build-example hello_agenthello_agent runs a deterministic in-process client/server flow. The
quickstart covers macOS, Windows,
transport, streaming, push-notification, and authentication examples.
include(FetchContent)
set(A2A_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(A2A_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(A2A_BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
a2a_cpp
GIT_REPOSITORY https://github.com/MisterVVP/a2a-cpp.git
GIT_TAG main
)
FetchContent_MakeAvailable(a2a_cpp)
target_link_libraries(my_agent PRIVATE a2a::client a2a::server a2a::core)Pin GIT_TAG to a release or
reviewed commit for reproducible builds. See the complete
FetchContent consumer.
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
cmake --install build --prefix /tmp/a2a-cpp-installfind_package(a2a_cpp CONFIG REQUIRED)
target_link_libraries(my_agent PRIVATE a2a::client a2a::server a2a::core)See the CMake integration and vcpkg guides for additional workflows.
The examples/ directory includes client/server, transport,
streaming, push-notification, and authentication examples.
./scripts/run_examples.sh build-example hello_agent streaming_client streaming_server push_notifications- Documentation website
- Installation and quickstart
- Client and server APIs
- Transports and streaming
- Authentication
- Storage
- Performance testing
- API reference
- Releases and versioning
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
ctest --test-dir build --output-on-failureContributors should read CONTRIBUTING.md and
AGENTS.md, then run:
./scripts/verify_changes.shSee microbenchmark guide for microbenchmarks and workload testing guide for workload tests.
The realistic multi-process tutorials under examples/tutorials/ demonstrate Agent Card discovery and HTTP+JSON A2A delegation. They support native Linux runs and cross-platform Docker Compose, including Docker Desktop on Windows without WSL.
See the production tutorials guide to run both tutorials or choose an individual tutorial.
See CONTRIBUTING.md for contribution requirements, AGENTS.md and C++ conventions for repository engineering rules, SECURITY.md for vulnerability reporting, and SUPPORT.md for supported versions and release cadence.
Licensed under the Apache License 2.0.