World’s largest virtual agentic engineering & quality conference
How to test an agent-to-agent (A2A) protocol implementation: agent card checks, task lifecycle assertions, the official TCK, and agent behavior testing in CI.

Samyak Goyal
Author

Sirajuddin Khan
Reviewer
Published on: August 20, 2026
An A2A agent can return a perfectly valid response and still be broken. Google published the Agent2Agent protocol on April 9, 2025 with more than 50 technology partners. The Linux Foundation launched the Agent2Agent project on June 23, 2025, announcing support from more than 100 leading technology companies. The specification arrived fast. The testing practice did not.
This guide covers what to assert against an A2A implementation, which checks the official tooling already automates, and where protocol conformance stops being enough.
TL;DR
Testing an agent-to-agent (A2A) implementation means verifying two separate things: that the agent speaks the protocol correctly, and that it does its job correctly. The official Technology Compatibility Kit covers the first. Behavior evaluation covers the second. Most teams only run one of the two.
What Do You Actually Test?
Does Passing the TCK Mean the Agent Works?
Agent-to-agent protocol testing is the practice of verifying that an agent implementing the A2A specification correctly advertises what it can do, accepts work through a supported transport, moves tasks through valid states, and authenticates callers the way its own agent card claims it does.
That scope matters because A2A is deliberately opaque about internals. The protocol treats a remote agent as a black box, so the only contract you can test from the outside is the one the agent publishes. Everything you assert has to come from the card, the transport, and the task stream.
The A2A specification is at version 1.0.0, and it defines three protocol bindings: JSON-RPC, gRPC, and HTTP+JSON. Every field name and task state quoted below is taken from the protocol definition the project publishes in the open.
Teams that ship A2A agents usually test one layer and assume it covers the other. It does not. A schema-perfect agent can return confidently wrong answers, and a genuinely helpful agent can fail every conformance check in the suite.
| Layer | What it proves | What it cannot prove |
|---|---|---|
| Protocol conformance | The agent speaks A2A: valid card, correct states, supported bindings, enforced auth. | Whether any answer it returns is accurate, on-policy, or safe to show a customer. |
| Agent behavior | The agent completes the job correctly across normal, edge, and adversarial inputs. | Whether a second agent from a different vendor can actually connect to it. |
Sections three through seven below cover the conformance layer. Section nine covers behavior. Both belong in the same pipeline, and the rest of this guide treats them as two suites rather than one. For the wider problem of verifying what a group of agents actually does once they are working together, see our guide to multi agent testing.
The agent card is a JSON document served at /.well-known/agent-card.json. It is public, unauthenticated, and machine-readable, which makes it the highest-value first test in any A2A suite: one HTTP GET tells you whether an agent is discoverable at all.
The version 1.0.0 schema marks eight card fields as required: name, description, supportedInterfaces, version, capabilities, defaultInputModes, defaultOutputModes, and skills. Provider details, documentation URL, security schemes, and signatures are optional.
The single biggest change from the 0.3.x era is that supportedInterfaces replaced the older url and preferredTransport pair. Each interface entry carries its own URL, protocol binding, and protocol version, so one agent can advertise several bindings at once.
We ran a discovery check against two agents publishing public cards on August 20, 2026. Both returned HTTP 200 and both still use the pre-1.0 card shape, which is exactly the version drift a conformance test is meant to surface:
A2A agent-card discovery check (spec v1.0.0 required fields)
run: 2026-08-20
GET https://perkoon.com/.well-known/agent-card.json
HTTP 200 (1387 ms)
declared protocolVersion : 0.3.0
supportedInterfaces : (field absent - pre-1.0 shape)
v1.0.0 required missing : supportedInterfaces
skills declared : 4
GET https://openstoa.xyz/.well-known/agent-card.json
HTTP 200 (615 ms)
declared protocolVersion : (field absent)
supportedInterfaces : (field absent - pre-1.0 shape)
v1.0.0 required missing : supportedInterfaces, defaultInputModes, defaultOutputModes
skills declared : 5Neither agent is broken. Both were built against 0.3.x, which was current when they shipped. The point is that a client written against 1.0.0 cannot rely on supportedInterfaces being present in the wild, so your test suite needs to assert the version it targets rather than assume the ecosystem has caught up.
For interactive checks, the A2A Inspector is a web tool that fetches an agent card, runs specification compliance checks against it, and exposes a debug console showing the raw JSON-RPC 2.0 messages exchanged with the agent.
Note: Agents that pass every schema check can still hallucinate policy, leak PII, or mishandle an angry user. TestMu AI deploys autonomous evaluators against your chat, voice, and phone agents to score exactly those failures. Try it free!
A task is A2A's unit of work. It carries a unique ID and moves through defined states, which makes the lifecycle the most testable part of the protocol: every transition is either legal or it is not.
Version 1.0.0 defines nine task states. The distinction that matters for testing is terminal versus interrupted, because they demand opposite client behavior.
| State group | States | What to assert |
|---|---|---|
| Terminal | completed, failed, canceled, rejected | No further updates arrive after the state is reached, and the task ID cannot be resumed. |
| Interrupted | input-required, auth-required | The agent stops and waits. Your client must supply input or credentials before work resumes. |
| In flight | submitted, working | The task is acknowledged and progressing, and status updates keep arriving in order. |
The state most implementations get wrong is rejected. It is terminal and it means the agent decided not to do the work, which is different from failed, where the agent tried and could not. A client that retries a rejected task will loop forever, so assert that your client treats the two differently.
Test auth-required explicitly as well. It is an interrupted state rather than an error, so an agent that returns a transport-level 401 instead of moving the task to auth-required is not conformant even though the caller was, correctly, refused.
Interrupted states are also where delegation breaks in practice, because the work is now split across two agents and neither owns the whole outcome. Our guide to agent handoff testing covers the failure modes and test cases for work passing between agents.
Both streaming and push notifications are optional capabilities, and that is the first thing to assert. An agent must declare capabilities.streaming as true before a client may call the streaming operations, and capabilities.pushNotifications as true before registering a webhook.
Webhook tests are where most A2A suites stay shallow, because asserting a callback needs a reachable endpoint during the test run. Treat it as a real integration test with a real listener, the same way you would test any other async callback.
A2A servers must verify client identity through the security schemes they declare on their own card, and must reject invalid credentials with an appropriate error response. That gives you a precise negative test: read the declared schemes, then call the agent without them.
The specification supports API keys, HTTP auth, OAuth2, OpenID Connect, and mutual TLS. Whichever the card declares is the one your test must exercise, because an agent that advertises OAuth2 but silently accepts anonymous calls is the failure mode worth catching.
On transport, version 1.0.0 defines three bindings: JSON-RPC, gRPC, and HTTP+JSON. All implementations must provide functionally equivalent representations of the same data structures across every binding they support.
That single rule is the most useful cross-binding test you can write. Send the same task over each advertised binding and diff the results. If an agent returns richer artifacts over gRPC than over HTTP+JSON, it is not conformant, and any client that picked the wrong binding gets a degraded experience with no error to explain it.
The A2A Technology Compatibility Kit is a compatibility test suite that validates A2A Protocol implementations across gRPC, JSON-RPC, and HTTP+JSON transports. It is pytest-based and maintained in the open by the a2aproject organization.
Its most useful design decision is that tests are organized by RFC 2119 requirement level rather than by feature area, so you can gate a pipeline on absolute requirements while still seeing where you fall short of recommendations.
# Run only absolute (MUST) requirements against a running agent
./run_tck.py --sut-host http://localhost:9999 --level must
# Scope a run to a single transport binding
./run_tck.py --sut-host http://localhost:9999 --transport grpcEvery run writes four report formats to a reports directory: a machine-readable compatibility JSON, a compatibility HTML summary, a pytest HTML report, and JUnit XML. The JUnit output is what makes the suite drop straight into an existing CI reporting setup.
A2A and MCP get compared constantly and they are not alternatives. MCP connects one agent to tools and data. A2A connects agents to each other. A single system commonly runs both, and each needs a different test suite.
| Dimension | A2A | MCP |
|---|---|---|
| Connects | An agent to another agent, across vendors and frameworks. | An agent to tools, data sources, and APIs it calls directly. |
| Discovery unit | Agent card at a well-known URL declaring skills and interfaces. | Tool and resource listings exposed by the server to its client. |
| Core test | Task state transitions and cross-binding equivalence. | Tool schema correctness and whether the model picks the right tool. |
| Failure to hunt | A remote agent that accepts work and never reaches a terminal state. | Schema drift between the declared tool and its real implementation. |
If you are building the tool-facing half of this stack, our guide to testing MCP servers covers schema drift and tool-selection evaluation in depth. For how the two protocols sit inside a wider architecture, see our explainer on multi-agent AI systems.
Every check so far proves the wire contract holds. None of them read a single answer. An agent can pass the entire MUST tier and still invent a refund policy, treat two callers differently, or hand a customer information it should never have surfaced.
TestMu AI Agent Testing covers that second layer. You give it the agent's intended role and any supporting documentation, and it generates 60 to 100 or more test scenarios spanning happy paths, edge cases, adversarial inputs, and compliance situations, then runs them against the live endpoint.

More than 15 specialized evaluator agents run those scenarios in parallel, each owning one dimension: a hallucination hunter for invented facts, a bias detector for differential treatment, a data privacy guardian for PII exposure, an escalation handler for correct human handoff. Chat and voice agents score against 9 quality metrics, phone agents against more than 30 call metrics.
Results roll up to a production readiness verdict of green, yellow, or red, and every verdict cites the conversation turns that produced it. That evidence trail is what makes a behavior failure actionable rather than a score you have to interpret. For the scoring methods that sit underneath metrics like these, see our guide to LLM evaluation.
Two limits are worth knowing before you plan a run. Agents that stream partial responses are evaluated on the complete response rather than on streaming behavior itself, so token-level streaming quality needs your protocol suite instead. Agents in highly specialized domains such as medical diagnosis or legal analysis usually need custom validation criteria, because generic hallucination metrics miss domain-specific error modes.
One naming note, since A2A is an overloaded acronym. The testmu-a2a-cli documentation covers running these evaluations from the terminal, where the a2a refers to agent-to-agent testing, meaning our evaluator agents testing your agent. It is not an implementation of the Agent2Agent protocol described in this article.
Both layers emit JUnit XML and standard exit codes, so they compose into one pipeline stage without custom reporting glue. Run conformance first, because a broken card or transport makes behavior results meaningless. Our guide to continuous AI agent testing covers the wider pattern, from CI gate through to a production loop.
# 1. Protocol conformance - block the build on MUST-level failures
./run_tck.py --sut-host "$AGENT_URL" --level must
# 2. Agent behavior - evaluate answers, fail below the score threshold
testmu-a2a test \
--agent "$AGENT_URL" \
--spec "Support agent that handles billing and account questions" \
--count 25 \
--threshold 0.85 \
--format junit \
--output results/behavior.xmlUse environment variables rather than interactive login in CI. The behavior stage reads TESTMU_USERNAME and TESTMU_ACCESS_KEY, and the threshold flag converts a score into a pass or fail so the stage gates like any other test.
Point the behavior stage at a staging endpoint when your agent calls real external systems. An evaluation run drives real conversations, so an agent wired to a live payment processor will produce real side effects.
Once both suites are green in CI, the gap that remains is production drift. Our guides to agent observability and AI agent testing methodology cover trace-based monitoring and how simulation compares with LLM-as-a-judge scoring.
Start by fetching your own agent card and diffing it against the eight required fields for version 1.0.0. It takes one HTTP GET, and the two live agents checked for this article both failed that comparison, which tells you how common the gap is.
From there, add the official TCK at the MUST level to block releases on real conformance failures, then layer behavior evaluation on top so answer quality is tested as deliberately as schema shape. The protocol tells you the agents can talk. Only the second suite tells you they should be trusted to.
Author
Samyak Goyal is a Senior Member of Technical Staff at TestMu AI engineering Kane CLI, the command-line tool that runs browser automation from the terminal, where a flow described in natural language executes in a real Chrome browser and returns pass or fail with shareable proof. He is a backend engineer with 4+ years of experience, previously an SDE at Innovaccer, where he built APIs, introduced Kafka, and cut deployment from weeks to hours. Samyak also builds multi-agent systems, skill-orchestration frameworks, and a personal copilot that indexes 200+ microservice repositories.
Reviewer
Sirajuddin Khan is Vice President of Product Management at TestMu AI (formerly LambdaTest), where he drives the company's agentic AI product strategy, building a suite of autonomous agents that includes Agentic Browsers and Agentic Visual Testing and shifting the unit of work from test execution to autonomous outcomes. One of the company's earliest product leaders, he has owned the roadmap for the high-performance execution cloud and grew the cross-browser testing products from early adoption to market leadership. He brings over a decade of experience across SaaS, B2B, and eCommerce, with earlier product roles at Wydr and ShopClues, where his catalog and search work cut delivery SLAs and lifted seller activity. Sirajuddin holds an MBA in Information Technology from Sikkim Manipal University and a B.Tech in Computer Science Engineering from Maharshi Dayanand University.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance