A2A Dummy
a2a/standalone
Deterministic A2A agent for testing A2A clients, proxies and gateways
Deploys a small agent built on the official A2A Python SDK into a local Kind cluster, for testing anything that talks to or sits in front of an Agent2Agent agent: clients, orchestrators, proxies, gateways. It has no LLM behind it. The text of each message decides what the agent does, so every run gives the same result.
- Agent card:
http://localhost:30803/.well-known/agent-card.json. - JSON-RPC at
http://localhost:30803/and HTTP+JSON athttp://localhost:30803/restfrom the host;http://a2a-agent:8000from inside the cluster. - Protocol: A2A 1.0, with A2A 0.3 accepted on the same endpoints.
- Capabilities: streaming (SSE) and push notifications.
- Authentication is off by default; set the
authTokenvariable to require a static bearer token.
Install gck#
go install github.com/gravitee-io-labs/gck@latest
For other installation methods, see Installation .
Usage#
Create#
gck create --from a2a/standalone
Cleanup#
gck delete
Quick Start#
Fetch the agent card:
curl -s http://localhost:30803/.well-known/agent-card.json
Send a message:
curl -s http://localhost:30803/ \
-H 'Content-Type: application/json' \
-H 'A2A-Version: 1.0' \
-d '{"jsonrpc":"2.0","id":1,"method":"SendMessage","params":{"message":{"role":"ROLE_USER","messageId":"1","parts":[{"text":"hello"}]}}}'
The reply is a TASK_STATE_COMPLETED task with an echo: hello artifact.
The
A2A-Version: 1.0header selects the protocol version. Without it the agent assumes A2A 0.3 and expects 0.3 method names such asmessage/send.
Stream the reply over SSE:
curl -sN http://localhost:30803/ \
-H 'Content-Type: application/json' \
-H 'A2A-Version: 1.0' \
-d '{"jsonrpc":"2.0","id":1,"method":"SendStreamingMessage","params":{"message":{"role":"ROLE_USER","messageId":"1","parts":[{"text":"stream 3"}]}}}'
Message keywords#
The first word of the message picks the behaviour:
| Message | Behaviour |
|---|---|
message <text> | Replies with a message and creates no task |
stream <n> | Streams n artifact chunks, 200 ms apart, then completes (default 3) |
slow <seconds> | Stays WORKING for that long, then completes (default 30). Use it for GetTask and CancelTask |
ask | Goes INPUT_REQUIRED; the next message on the same taskId completes the task |
fail | Goes FAILED |
| anything else | Completes with an echo: <text> artifact |
To get a task back before it finishes, set "configuration":{"returnImmediately":true}
in SendMessage. To receive push notifications, add a
"taskPushNotificationConfig":{"url":"...","token":"..."} to the same
configuration. The agent accepts any URL, including in-cluster ones.
Authentication#
Deploy with a token and every request without Authorization: Bearer <token>
gets a 401. The agent card and /health stay public, and the card
declares the bearer scheme:
gck create --from a2a/standalone --set authToken=my-secret
Behind a gateway#
The agent card advertises publicUrl as the address of its interfaces.
When clients reach the agent through a gateway, set publicUrl to the
gateway’s URL so the card points at it. Compose the agent with an APIM
context and point the API’s endpoint at
http://a2a-agent.default.svc.cluster.local:8000:
gck create --from gravitee-io/apim --from a2a/standalone --use-mongodb
Testing push notifications? Compose with MockServer and use it as the webhook receiver:
gck create --from a2a/standalone --from mockserver/standalone
Endpoints
Services this context exposes on your machine after gck create, including the ones it inherits from the contexts it composes. Rows marked with a flag only exist when you pass it; rows marked with an alternative only exist when it is selected, and rows marked not with one disappear when it is.
| Service | URL | Notes | From |
|---|---|---|---|
| A2A Agent | http://localhost:30803 | JSON-RPC at /, HTTP+JSON at /rest | a2a/standalone |
Variables
Template variables overridable with --set. Use --set path.segments.var=value to target a specific context in the composition chain.
| Variable | Default | Origin | Description |
|---|---|---|---|
clusterName | a2a-standalone | a2a/standalone | Name of the Kind cluster |
imageRepository | python | a2a/standalone | Python Docker image repository used to run the agent |
imageTag | 3.14-slim | a2a/standalone | Python Docker image tag |
a2aSdkVersion | 1.1.5 | a2a/standalone | A2A Python SDK version the agent is built on, installed at startup |
agentName | echo-agent | a2a/standalone | Agent name advertised in the agent card |
publicUrl | http://localhost:30803 | a2a/standalone | Base URL the agent card advertises for its interfaces; set it to the gateway or in-cluster URL when clients reach the agent another way |
authToken | (empty) | a2a/standalone | Static bearer token callers must present; empty disables authentication |