with one click
a2a-java-sut
// Work with the a2a-java SUT (System Under Test). Use when the user wants to regenerate the Java SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
// Work with the a2a-java SUT (System Under Test). Use when the user wants to regenerate the Java SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
| name | a2a-java-sut |
| description | Work with the a2a-java SUT (System Under Test). Use when the user wants to regenerate the Java SUT from Gherkin scenarios, build it, run it, or test it with the TCK. |
| compatibility | Requires Python 3.11+, uv, Java 17+, and Maven |
| allowed-tools | Bash(make:*) Bash(mvn:*) Bash(java:*) Bash(curl:*) Bash(kill:*) Bash(lsof:*) Bash(uv:*) Read Edit Write Glob Grep Agent |
The a2a-java SUT is a Quarkus application that lives in the tck module of the a2a-java repository. The TCK code generator produces two CDI producer files (TckAgentCardProducer.java and TckAgentExecutorProducer.java) from Gherkin .feature files and copies them into the user's local clone of the a2a-java repo.
scenarios/*.feature → codegen (parser + steps + java_emitter) → $A2A_JAVA_DIR/tck/
scenarios/*.feature) define SUT behavior via messageId prefix matchingcodegen/) parses .feature files and emits Java sourcescodegen/a2a-java/*.j2) produce the two CDI producer filestck module of the user's local a2a-java clone| File | Template | Purpose |
|---|---|---|
TckAgentExecutorProducer.java | TckAgentExecutorProducer.java.j2 | CDI producer for AgentExecutor; routes by messageId prefix |
TckAgentCardProducer.java | TckAgentCardProducer.java.j2 | CDI producer for AgentCard with all three transports |
The generated AgentExecutor matches on the messageId prefix from incoming messages:
if (messageId.startsWith("tck-complete-task")) {
emitter.complete(A2A.toAgentMessage("Hello from TCK"));
return;
}
The TCK tests use tck_id("complete-task") which generates tck-complete-task-<session_hex>, matching the prefix.
The A2A_JAVA_DIR environment variable must point to the root of a local clone of the a2a-java repository.
Check if the clone already exists as a sibling directory:
ls -d ../a2a-java 2>/dev/null && echo "Found at ../a2a-java"
If it exists, set:
export A2A_JAVA_DIR=$(cd ../a2a-java && pwd)
If not, clone it:
git clone https://github.com/a2aproject/a2a-java.git ../a2a-java
export A2A_JAVA_DIR=$(cd ../a2a-java && pwd)
When Gherkin scenarios change, regenerate the Java producer files:
A2A_JAVA_DIR=/path/to/a2a-java make codegen-a2a-java-sut
This runs uv run python -m codegen.generator --target a2a-java --output $A2A_JAVA_DIR/tck which:
scenarios/*.feature filescodegen/steps.pyTckAgentCardProducer.java and TckAgentExecutorProducer.java using Jinja2 templates from codegen/a2a-java/$A2A_JAVA_DIR/tck/src/main/java/org/a2aproject/sdk/sut/To add new behaviors:
.feature file in scenarios/codegen/steps.py, add a new entrycodegen/model.py and handle it in codegen/java_emitter.pymake codegen-a2a-java-sutTemplates are in codegen/a2a-java/:
TckAgentExecutorProducer.java.j2 — handler routing and action codeTckAgentCardProducer.java.j2 — agent card with capabilities and interfacesAfter modifying templates, regenerate with make codegen-a2a-java-sut.
Build from the root of the a2a-java repository so the parent pom and SDK modules are installed first:
cd $A2A_JAVA_DIR && mvn clean install
cd $A2A_JAVA_DIR/tck && mvn quarkus:dev -Dquarkus.console.enabled=false
The -Dquarkus.console.enabled=false flag disables the interactive Quarkus console, which is required when running in the background or non-interactively.
The SUT listens on port 9999 and serves all three transports:
http://localhost:9999 (POST)localhost:9999 (same server, no separate port)http://localhost:9999 (REST routes)curl -s http://localhost:9999/.well-known/agent-card.json | python3 -m json.tool
The agent card should list all three supportedInterfaces (JSONRPC, GRPC, HTTP+JSON).
When sending manual requests to the SUT, use tck/requirements/base.py as the source of truth for method names and sample_input fields in requirement specs (e.g., tck/requirements/core_operations.py) for request payload format.
The A2A protocol uses protobuf enum naming conventions:
ROLE_USER, ROLE_AGENT (not user/USER)TASK_STATE_COMPLETED, TASK_STATE_WORKING, etc.{"text": "..."} (not {"kind": "text", "text": "..."} — the protobuf oneof uses the field name to indicate part type)SendMessage (JSON-RPC):
curl -s -X POST http://localhost:9999/ \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"SendMessage","params":{"message":{"messageId":"tck-complete-task-1234","role":"ROLE_USER","parts":[{"text":"Hello from TCK"}]}}}'
ListTasks (JSON-RPC):
curl -s -X POST http://localhost:9999/ \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"ListTasks","params":{"contextId":"<contextId>"}}'
GetTask (JSON-RPC):
curl -s -X POST http://localhost:9999/ \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":"1","method":"GetTask","params":{"id":"<taskId>"}}'
If port 9999 is already in use:
lsof -ti:9999 | xargs kill -9
Use the run-tck skill to run the TCK against this SUT with the host being http://localhost:9999.
Read reports/compatibility.json for structured results. For detailed diagnosis, use the diagnose-failure skill.
/.well-known/agent-card.jsontck_id() usage in tests vs prefix in .feature fileThe typical development cycle is:
scenarios/*.featureA2A_JAVA_DIR=/path/to/a2a-java make codegen-a2a-java-sutcd $A2A_JAVA_DIR && mvn clean installuv run ./run_tck.py --sut-host http://localhost:9999 -- -k "test_name" -vThe codegen has its own unit tests:
make unit-test
This runs tests in tests/unit/codegen/ covering the parser, step resolution, Java emitter, and generator CLI.
Work with the a2a-jakarta SUT (System Under Test). Use when the user wants to regenerate the Jakarta SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
Work with the a2a-python SUT (System Under Test). Use when the user wants to regenerate the Python SUT from Gherkin scenarios, build it, run it, or test it with the TCK.
Diagnose a TCK requirement failure and draft a GitHub issue with the requirement context, failure details, and a curl reproducer. Use when the user wants to report a failing requirement, understand why it failed, or create a bug report for an SUT implementor.
Help an SDK implementor run the A2A TCK against their System Under Test (SUT). Use when the user wants to validate their A2A agent implementation, debug TCK failures, or understand conformance results.
Interact with remote AI agents using the A2A (Agent-to-Agent) protocol as a client. Use this skill whenever the user wants to communicate with an A2A agent, send tasks to a remote agent, discover agent capabilities, check task status, or get results from an A2A-compatible service. Trigger on mentions of A2A, agent-to-agent, remote agents, agent cards, or when the user provides a URL to an A2A agent endpoint.
Learn about a specific TCK requirement. Use when the user asks about a requirement ID (e.g. CORE-SEND-001, GRPC-ERR-001), wants to understand what it tests, or needs to find the spec section, tests, and validators related to a requirement.