AI Agent Assurance for Your Agent Deployments

Agent Assurance Tests How Your Agent Actually Behaves across Workflows, Tools, and Actions to Catch Failures and Vulnerabilities.

npm install -g @testmuai/rook

AIAI Testing

Agent-to-Agent Protocol Testing: How to Verify Your A2A Implementation

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.

Last Updated on:

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

To test agent-to-agent (A2A) workflows before production, verify two things separately: that each agent speaks the protocol correctly, which the official A2A Technology Compatibility Kit (TCK) checks, and that the workflow does its job, which Agent Assurance from TestMu AI checks by running the agents for real and grading what they changed. Most teams only run one of the two.

What Do You Actually Test?

  • Agent card discovery: The A2A agent card at /.well-known/agent-card.json is public and needs no authentication to fetch, so it is the cheapest thing to test. A2A version 1.0.0 marks eight card fields as required, including skills and supported interfaces.
  • Task lifecycle: A2A defines nine task states. Four are terminal (completed, failed, canceled, rejected) and two are interrupted states that expect the client to act (input-required, auth-required).
  • Transport conformance: A2A version 1.0.0 defines three protocol bindings - JSON-RPC, gRPC, and HTTP+JSON. An A2A agent must return equivalent data structures on every binding it advertises.
  • Behavior evaluation: Protocol tests never check answer quality. A conformant agent can still hallucinate, leak data, or ignore policy, which needs a separate evaluation layer.

Does Passing the TCK Mean the Agent Works?

  • What a passing TCK run proves: The wire contract holds - a valid agent card, legal task state transitions, and equivalent responses across every binding the A2A agent advertises.
  • What it leaves untested: Behavior. A conformant A2A agent can still invent policy, leak data, or report work it never did, which is what TestMu AI's Agent Assurance tests through its rook CLI.

What Agent-to-Agent Protocol Testing Covers

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.

For a quick visual walkthrough of this concept, watch the video below from TestMu AI.

Youtube thumbnail

Subscribe to the TestMu AI YouTube channel for more tutorials on testing and automation.

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.

The Two Layers You Have to Test Separately

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.

LayerWhat it provesWhat it cannot prove
Protocol conformanceThe 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 behaviorThe 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.

Start With the Agent Card

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. The full list of changes since v0.3 is in our guide to A2A protocol v1.

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          : 5

Neither 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

Note: Agents that pass every schema check can still report work they never did or follow an instruction injected by a peer agent. TestMu AI's Agent Assurance grades what an agent's run changed rather than what the agent reported, and it runs from your terminal as rook. Try the rook CLI

Task Lifecycle Assertions

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 groupStatesWhat to assert
Terminalcompleted, failed, canceled, rejectedNo further updates arrive after the state is reached, and the task ID cannot be resumed.
Interruptedinput-required, auth-requiredThe agent stops and waits. Your client must supply input or credentials before work resumes.
In flightsubmitted, workingThe 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.

Testing Streaming and Push Notifications

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.

  • Undeclared capability - Call the streaming operations against an agent that does not advertise streaming and assert it refuses cleanly rather than half-supporting the call.
  • Event ordering - The specification requires operations to maintain event ordering in streaming delivery, so assert that status changes and artifact chunks arrive in sequence, not just that they all arrive.
  • Webhook delivery - Push notifications are HTTP POSTs to a client-registered endpoint. Stand up a real receiver in the test and assert the payload lands, rather than trusting the registration call returning 200.
  • Config lifecycle - Push notification configurations support create, get, list, and delete. A deleted config that still fires is a leak worth catching before production.
  • Disconnect and resume - Long-running tasks are the reason push notifications exist. Drop the client mid-task and assert the update still arrives at the 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.

Auth and Transport Conformance

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.

Running the Official A2A TCK

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, which also publishes the A2A Integration Test Kit (ITK) for checking that agents built on different A2A SDKs work together.

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 grpc
  • MUST - Absolute requirements. A failure here is a hard failure and is the correct level to block a release on.
  • SHOULD - Expected unless you have a valid reason to differ. Failures are recorded as expected failures rather than breaking the run.
  • MAY - Genuinely optional. These tests skip when the agent has not declared the matching capability.

Every 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 vs MCP: What Changes When You Test Them

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.

DimensionA2AMCP
ConnectsAn agent to another agent, across vendors and frameworks.An agent to tools, data sources, and APIs it calls directly.
Discovery unitAgent card at a well-known URL declaring skills and interfaces.Tool and resource listings exposed by the server to its client.
Core testTask state transitions and cross-binding equivalence.Tool schema correctness and whether the model picks the right tool.
Failure to huntA 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. If one of your MCP servers is moving to stateless MCP, capture a baseline on the legacy spec first and diff the migrated output against it.

Testing What the Protocol Cannot See

Every check so far proves the wire contract holds. None of them checks what the agent did with the work it accepted. An agent can pass the entire MUST tier and still invent a refund policy, report a task as done that it never finished, or hand a peer agent data it should never have shared. In an A2A system, a message from a peer agent is content the receiving agent reads, so it is also a route for agent goal hijack, the first risk (ASI01) in OWASP's Top 10 for Agentic Applications 2026.

Agent Assurance from TestMu AI covers that second layer for agents that act: agents that take a delegated task and call tools, change records, or return artifacts. It derives scenarios from your agent's code or spec, functional and adversarial by default, invokes the real agent, and grades each acceptance criterion as Pass, Fail, or Unable to Verify against evidence rather than the agent's own account of its work.

Agent Assurance runs from your terminal and CI as rook. Rook reaches an agent through a profile, and an A2A agent that serves JSON-RPC or HTTP+JSON is an HTTP endpoint: the profile sends SendMessage, returns the reply's text parts as the answer to judge, and passes contextId back as the conversation handle for multi-turn scenarios.

  • Effect over account - a claimed action never counts as proof. Where you approve a read-only check, such as a database query exposed as a tool on a stdio MCP server, a judge confirms the record the agent says it changed.
  • Adversarial by default - generated suites include prompt injection, data exfiltration, PII leakage, and policy violation scenarios, which matter more when instructions arrive from another organization's agent.
  • Orchestrated agents - a downstream agent reachable only through an orchestrator is tested through it, and a handoff is checkable only when the profile returns the calls that show it.

The opacity covered at the start of this guide sets the ceiling. A remote agent's internal tool calls are visible only when it returns them, so Rook grades the replies, artifacts, and any calls or trace links the agent exposes, and reports the rest as Unable to Verify instead of guessing.

Agent Assurance is self-serve: install the Rook CLI with npm install -g @testmuai/rook@latest, Homebrew, or a shell installer, and start a 14-day free trial with 4,000 credits. The A2A protocol v1 guide walks through a complete profile for an A2A endpoint.

Start a 14-day free trial of Agent Assurance by TestMu AI, with 4,000 credits, to test how your AI agents behave across workflows, tools, and actions

Wiring Both Suites Into CI

Both suites run headless in the same pipeline stage. 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 - run the reviewed Agent Assurance suite with rook
export ROOK_ENV=prod   # LT_USERNAME and LT_ACCESS_KEY come from CI secrets
rook project use <project-id>
rook agent use <agent-id>
rook profile use a2a-staging
rook sync
rook run --only <reviewed-scenario-ids> --profile a2a-staging --concurrency 1 \
  --name a2a-release-gate --allow '<exact-reviewed-rule>' --json > rook-run.json
node check-rook-result.cjs   # fail unless every planned scenario ran and passed

Rook authenticates in CI from LT_USERNAME and LT_ACCESS_KEY, and an unattended run cannot answer permission prompts, so pass the exact --allow rule Rook requested during a local rehearsal. A finished run exits 0 whether its scenarios passed or failed, so the Agent Assurance CI/CD guide gates on the run's JSON totals instead, with a check script that fails the job unless every planned scenario executed and passed and nothing was left unverifiable. The walkthrough on how to gate GitHub Actions on Rook CLI verdicts builds that kind of check into a workflow and writes the totals to the job summary.

Point the behavior stage at a staging endpoint when your agent calls real external systems. Rook invokes the agent for real and cannot roll back what it writes, 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 AI agent observability and AI agent testing methodology cover trace-based monitoring and how simulation compares with LLM-as-a-judge scoring. To pick a platform for that monitoring, compare how AI agent observability tools follow one run across MCP servers and sub-agents.

Conclusion

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 run an Agent Assurance suite with rook against a staging endpoint, so what the agent does with each task is tested as deliberately as the schema it speaks.

Shipping agents that other agents use? Rook by TestMu AI does Agent Assurance: agents testing agents before release, with no human in the loop.

To run your first test, install Agent Assurance with npm install -g @testmuai/rook@latest command, or
for a full walkthrough of the product.

Author

...

Samyak Goyal

Blogs: 35

  • Linkedin

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

Reviewer

  • Linkedin

Sirajuddin Khan is Vice President of Product Management at TestMu AI, 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.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

A2A Protocol Testing FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests