Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example applications

Run commands from the repository root. These small deterministic apps consume public SDK targets through the CMake consumer templates.

Build and run

cmake -S examples/fetch_content_consumer -B build-example \
  -DA2A_EXAMPLE_APP=hello_agent -DA2A_CPP_GIT_TAG=v0.5.2
cmake --build build-example --parallel
./build-example/a2a_example

Replace hello_agent with an app below. For an installed SDK, configure examples/installed_package_consumer with -DCMAKE_PREFIX_PATH=<install-prefix>. Multi-configuration Windows builds place the executable under RelWithDebInfo/.

Each app links a2a::client, a2a::server and a2a::core through the consumer templates, prints concise task/status/event or delivery output, and exits nonzero on an SDK error. Network streaming examples have their own client and server guides.

hello-agent

Smallest end-to-end in-process SDK example.

Source.

simple-client

Client-side request construction and task fetch flow.

Source.

rest-server

Server-side REST transport setup and in-process handling.

Source.

json-rpc-server

Server-side JSON-RPC transport setup.

Source.

grpc-server

gRPC service object setup and unary operation path.

Source.

push-notifications

Push notification configuration, store, and delivery abstraction.

Source.

auth-policy-server

Server-side auth metadata handling and policy shape.

Source.