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 at http://localhost:30803/rest from the host; http://a2a-agent:8000 from 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 authToken variable 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.0 header selects the protocol version. Without it the agent assumes A2A 0.3 and expects 0.3 method names such as message/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:

MessageBehaviour
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
askGoes INPUT_REQUIRED; the next message on the same taskId completes the task
failGoes FAILED
anything elseCompletes 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.

ServiceURLNotesFrom
A2A Agenthttp://localhost:30803JSON-RPC at /, HTTP+JSON at /resta2a/standalone

Variables

Template variables overridable with --set. Use --set path.segments.var=value to target a specific context in the composition chain.

VariableDefaultOriginDescription
clusterNamea2a-standalonea2a/standaloneName of the Kind cluster
imageRepositorypythona2a/standalonePython Docker image repository used to run the agent
imageTag3.14-slima2a/standalonePython Docker image tag
a2aSdkVersion1.1.5a2a/standaloneA2A Python SDK version the agent is built on, installed at startup
agentNameecho-agenta2a/standaloneAgent name advertised in the agent card
publicUrlhttp://localhost:30803a2a/standaloneBase 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/standaloneStatic bearer token callers must present; empty disables authentication