Skip to content
MisterVVPPublic

About

C++20 SDK for the Agent2Agent (A2A) Protocol: build A2A clients and servers with REST, JSON-RPC, gRPC/protobuf, streaming, auth hooks, CMake, vcpkg.

Topics

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a2a-cpp: C++20 Agent2Agent (A2A) SDK

CI TCK conformance Documentation License

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.

Highlights

  • 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.

Requirements

  • 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.

Quick start

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_agent

hello_agent runs a deterministic in-process client/server flow. The quickstart covers macOS, Windows, transport, streaming, push-notification, and authentication examples.

Use with CMake FetchContent

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.

Use an installed CMake package

cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
cmake --install build --prefix /tmp/a2a-cpp-install
find_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.

Examples

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

Development

cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build --parallel
ctest --test-dir build --output-on-failure

Contributors should read CONTRIBUTING.md and AGENTS.md, then run:

./scripts/verify_changes.sh

See microbenchmark guide for microbenchmarks and workload testing guide for workload tests.

Production tutorials

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.

Repository policies

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.

License

Licensed under the Apache License 2.0.

About

C++20 SDK for the Agent2Agent (A2A) Protocol: build A2A clients and servers with REST, JSON-RPC, gRPC/protobuf, streaming, auth hooks, CMake, vcpkg.

Topics

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages