https://github.com/MisterVVP/a2a-cpp
C++20 SDK for the Agent2Agent (A2A) Protocol: build A2A clients and servers with REST, JSON-RPC, gRPC/protobuf, streaming, auth hooks, CMake, vcpkg.
https://github.com/MisterVVP/a2a-cpp
a2a a2a-agent a2a-client a2a-protocol a2a-server agent-to-agent agentic-ai agents ai ai-agents cmake cpp multi-agent-systems multiagent-systems sdk
Last synced: 8 days ago
JSON representation
C++20 SDK for the Agent2Agent (A2A) Protocol: build A2A clients and servers with REST, JSON-RPC, gRPC/protobuf, streaming, auth hooks, CMake, vcpkg.
- Host: GitHub
- URL: https://github.com/MisterVVP/a2a-cpp
- Owner: MisterVVP
- License: apache-2.0
- Created: 2026-04-15T19:44:58.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-06-08T14:15:49.000Z (9 days ago)
- Last Synced: 2026-06-08T15:24:27.072Z (9 days ago)
- Topics: a2a, a2a-agent, a2a-client, a2a-protocol, a2a-server, agent-to-agent, agentic-ai, agents, ai, ai-agents, cmake, cpp, multi-agent-systems, multiagent-systems, sdk
- Language: C++
- Homepage:
- Size: 505 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Support: SUPPORT.md
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-a2a - a2a-cpp - cpp?style=social)](https://github.com/MisterVVP/a2a-cpp) - C++20 SDK for the Agent2Agent (A2A) Protocol with client/server APIs, discovery, REST/JSON-RPC/gRPC transports, streaming, authentication hooks, and CMake/vcpkg/Conan build integration. (⚙️ Implementations & Libraries)
README
# a2a-cpp: C++20 Agent2Agent (A2A) SDK
[](https://github.com/mistervvp/a2a-cpp/actions/workflows/tck.yml?query=branch%3Amain+job%3Amandatory-conformance)
**a2a-cpp** is a modern C++ SDK for building Agent2Agent protocol clients and servers.
It supports core A2A workflows including client/server APIs, discovery, REST/JSON-RPC/gRPC transports, streaming, authentication hooks, and CMake/vcpkg/Conan build integration.
## TCK Compliance Level
[MUST](https://github.com/a2aproject/a2a-tck/blob/1.0-dev/README.md#compatibility-levels) (validated in CI via `--level must --transport grpc,jsonrpc,http_json` in `.github/workflows/tck.yml`).
## Documentation
- Documentation website (GitHub Pages): `https://mistervvp.github.io/a2a-cpp/`
- Documentation home source: [`book/src/README.md`](book/src/README.md)
- Project docs and engineering notes: [`docs/`](docs/)
- Build and validation guide: [`docs/build.md`](docs/build.md)
## Repository layout
- `include/` public headers
- `src/` library implementation
- `tests/` unit and integration tests
- `proto/` protocol definitions
- `scripts/` local tooling and CI helpers
- `benchmarks/` optional Google Benchmark performance suite
- `tools/bench_runner/` Go benchmark threshold/report utility
## Performance benchmarks
The SDK includes C++ microbenchmarks for core hot paths. Benchmarks are run in CI with threshold checks to catch performance regressions.
Google Benchmark measures SDK internals directly, including proto/JSON serialization, task store operations, task lifecycle logic, transport routing, server transport handling, UUIDv7 task ID generation, Agent Card generation, and HTTP adapter parsing/serialization. A Go-based benchmark runner parses Google Benchmark JSON output, compares fixed thresholds from `benchmarks/thresholds.json`, and generates CI summaries.
Benchmarks are optional and should be run in Release mode:
```bash
cmake -S . -B build-bench \
-DCMAKE_BUILD_TYPE=Release \
-DA2A_BUILD_BENCHMARKS=ON
cmake --build build-bench --target a2a_benchmarks -j"$(nproc)"
./build-bench/benchmarks/a2a_benchmarks
```
To run the CI-style threshold check locally:
```bash
./build-bench/benchmarks/a2a_benchmarks \
--benchmark_out=benchmark-results.json \
--benchmark_out_format=json \
--benchmark_repetitions=5 \
--benchmark_report_aggregates_only=true
go run ./tools/bench_runner/cmd/a2a-bench-runner \
--results benchmark-results.json \
--thresholds benchmarks/thresholds.json \
--summary benchmark-summary.md
```
See [`benchmarks/README.md`](benchmarks/README.md) for threshold strategy, Release-mode guidance, and instructions for adding benchmarks.