Run an example agent
Run it locally
Section titled “Run it locally”git clone https://github.com/parivox/parivox-a2a-examples.gitcd parivox-a2a-examples/agents/research-specialist-sdkpython -m venv .venv && .venv/bin/pip install -r requirements.txtA2A_ALLOW_ANONYMOUS=1 .venv/bin/python -m app.mainThen fetch the card:
curl localhost:8080/.well-known/agent-card.jsonOr run it in a container, from the repository root:
docker compose up research-specialist-sdkWithout an OPENAI_API_KEY the agent serves deterministic canned content and still exercises the full protocol.
Configuration
Section titled “Configuration”Every agent is configured entirely through environment variables. See each agent’s .env.example.
| Variable | Meaning |
|---|---|
A2A_API_KEY |
Shared secret required in the X-API-Key header on RPC calls |
A2A_ALLOW_ANONYMOUS |
Set to 1 to run without an API key (local development and CI only) |
PORT |
Listen port, default 8080 |
An agent refuses to start unless one of A2A_API_KEY or A2A_ALLOW_ANONYMOUS is set, so an unauthenticated deployment has to be a deliberate act rather than an omission.
Protocol notes (A2A 1.0)
Section titled “Protocol notes (A2A 1.0)”Verified against a2a-sdk 1.1.2. These bite immediately if you’re used to 0.3:
A2A-Version: 1.0is a required request header. Omit it and the server assumes 0.3 and rejects the call with JSON-RPC error-32009.- Method names are gRPC-style, not slash-style:
SendMessage,SendStreamingMessage,GetTask,CancelTask,SubscribeToTask, notmessage/sendormessage/stream. - Event ordering is strict. A task stream must emit the
Taskfirst, then any number ofstatusUpdate/artifactUpdateevents, and end on a terminal status. A status update before theTaskfails with-32006. - The Agent Card lives at
/.well-known/agent-card.jsonand advertises its RPC endpoint undersupportedInterfaces, each with aurl,protocolBindingandprotocolVersion.
A streamed task looks like this on the wire (SSE data: frames, JSON-RPC envelopes):
data: {"result":{"task":{"id":"…","status":{"state":"TASK_STATE_SUBMITTED"}}},…}data: {"result":{"statusUpdate":{"status":{"state":"TASK_STATE_WORKING",…}}},…}data: {"result":{"artifactUpdate":{"artifact":{"name":"report.md","parts":[…]}}},…}data: {"result":{"statusUpdate":{"status":{"state":"TASK_STATE_COMPLETED"}}},…}Conformance
Section titled “Conformance”CI in the examples repository runs the official a2a-tck against each agent started as a local container:
./run_tck.py --sut-host http://localhost:8080 --transport jsonrpc --level mustIt enforces the protocol-level subset of the must tests (card discovery, task lifecycle, streaming order, error-code mapping and cancellation) and deliberately deselects the TCK’s scenario-fixture tests, which check for behavior specific to the TCK’s own reference agent. The reasoning is recorded in the repository’s ci.yml.