You built an A2A agent. It connects, it runs, and sometimes it returns the wrong thing. Now what? You open the console and see JSON-RPC envelopes with the fields you need buried several levels deep. You cannot tell whether the bug is in the transport, the request payload, authentication, or the agent logic. That is the gap an Agent2Agent (A2A) debugger fills.
This guide explains what an A2A debugger is, why debugging agent-to-agent traffic is difficult without one, and how to use one to isolate bugs faster. If you need the protocol background first, start with what Agent2Agent (A2A) is.
What is an A2A debugger?
An A2A debugger is a tool for connecting to an Agent2Agent agent, sending test messages, and inspecting the full request and response without writing client code.
Think of it like a REST client, but for A2A:
- You provide an Agent Card URL.
- The debugger reads the agent metadata.
- You send messages manually.
- The debugger wraps them in the correct A2A / JSON-RPC structure.
- You inspect the response as rendered content and raw data.
A2A is an open protocol for communication between AI agents. It defines the Agent Card, task lifecycle, messages, parts, and artifacts that agents exchange. An A2A debugger gives you a manual workbench for testing those pieces before wiring the agent into a production workflow.
The core question it answers is:
Given this Agent Card, what does the agent actually do when I send this message?
Why debugging A2A is hard without a debugger
Agent-to-agent traffic is structured, nested, and often hidden behind SDK abstractions. Standard debugging tools only show part of the picture.
Console logs omit important fields
SDK logs usually show what the SDK author decided to print. You might see:
Task completed
But not the fields you need:
{
"taskId": "task_123",
"artifacts": [],
"metadata": {
"tenantId": "acme"
}
}
If the task ID, artifacts, message parts, or metadata are missing from logs, you cannot verify what actually happened.
Browser network tools are too low-level
A browser network panel can show the raw HTTP body, but A2A payloads are nested JSON-RPC. Finding whether an agent returned a text part, a file part, or a structured artifact can mean scrolling through a large JSON blob.
Throwaway test scripts become stale
A common fallback is a quick curl command or Python script:
curl -X POST http://localhost:3000/a2a \
-H "Content-Type: application/json" \
-d '{ "...": "..." }'
That works until:
- the Agent Card changes,
- auth moves to a different header,
- the message schema changes,
- metadata is added,
- streaming is enabled.
Then the script silently stops representing real traffic.
Transport bugs and logic bugs look the same
When an agent returns the wrong result, the cause might be:
- malformed request payload,
- missing header,
- auth failure,
- wrong metadata,
- broken connection,
- incorrect prompt or model behavior.
Without seeing the exact wire payload, all of these look like “the agent is broken.”
An A2A debugger removes that ambiguity by showing:
- the request you sent,
- the response you received,
- the exact field that is missing or incorrect.
What an A2A debugger should do
A useful A2A debugger covers four main workflows.
1. Connect to the Agent Card
The first step is discovery. You paste the Agent Card URL, and the debugger fetches and validates it.
For local development, the URL might look like:
http://localhost:3000/.well-known/agent.json
A good debugger should show:
- agent name,
- description,
- protocol version,
- capabilities,
- declared skills,
- supported input types,
- authentication requirements.
If the Agent Card is malformed, the debugger should fail clearly and point to the missing or invalid field. That lets you fix the manifest instead of debugging the wrong layer.
2. Send test messages
Next, you compose a message like you would in a chat UI.
A practical test flow is:
- Start with plain text.
- Confirm the expected skill is triggered.
- Add metadata.
- Add file attachments if the agent supports them.
- Repeat the same message after each agent-side change.
The debugger should handle the A2A message structure and JSON-RPC envelope for you. You should not need to manually build payloads while debugging basic behavior.
3. Inspect responses in multiple views
Response inspection is the main value of an A2A debugger.
A2A responses can include:
- plain text,
- structured message parts,
- artifacts,
- file references,
- metadata,
- streamed chunks.
Raw JSON alone is useful, but it is not enough. A debugger should show the same response through multiple views.
Apidog’s A2A Debugger, for example, provides:
- Preview: renders structured fields as a readable tree.
- Content: shows the human-readable output.
- Raw Data: displays the full JSON-RPC payload.
This makes debugging faster.
For example, if Preview contains a valid artifact but Content is empty, the issue may not be the agent response. The agent may have returned a typed artifact that the content renderer does not flatten into text.
With separate views, you can confirm that in seconds.
4. Configure authentication and headers
Production agents usually sit behind authentication. A debugger should support common auth patterns without requiring custom scripts.
Look for support for:
- Bearer Token,
- Basic Auth,
- API key headers,
- arbitrary custom headers.
Custom headers are useful for:
- gateways,
- tenant IDs,
- request signatures,
- environment routing,
- internal tracing.
A good debugger should also make the distinction between HTTP headers and A2A metadata clear.
Headers are read by gateways, proxies, and middleware. A2A metadata is passed into the agent task handler. If you put a per-message instruction in a header but your agent only reads metadata, the agent will ignore it.
The Apidog A2A Debugger workflow
Apidog includes an A2A Debugger in its standard client.
A typical local debugging loop looks like this:
- Open the A2A Debugger.
- Paste the Agent Card URL.
http://localhost:3000/.well-known/agent.json
- Click Connect.
- Confirm the status changes to Connected.
- Review the agent metadata.
- Open the Messages tab.
- Send a minimal text prompt.
- Inspect the response in Preview, Content, and Raw Data.
- Add metadata or files only after the simple text case works.
Apidog handles:
- JSON-RPC envelope creation,
- Agent Card discovery,
- response parsing,
- server-sent event streaming when supported,
- message history,
- auth and custom headers.
Session history is especially useful during agent development because you often send the same prompt repeatedly after changing code, prompts, metadata, or model configuration.
Apidog’s debugger runs as a local client. Traffic goes directly between your machine and the agent, not through Apidog’s servers.
For a full walkthrough, see the Apidog A2A Debugger guide. Apidog also provides an AI agent debugger for broader agent-testing workflows.
What to look for in an A2A debugger
When comparing A2A debugging tools, check for these capabilities.
Agent Card validation
The debugger should explain why an Agent Card failed validation.
Bad:
Invalid Agent Card
Better:
Missing required field: skills[0].name
You want actionable validation errors, not generic failures.
Multiple response views
You need both high-level and low-level visibility.
At minimum, the debugger should provide:
- readable preview,
- user-facing content view,
- raw JSON-RPC payload.
This lets you debug rendering issues separately from protocol or agent issues.
Authentication support
The debugger should support:
- Bearer Token,
- Basic Auth,
- API key,
- custom headers.
If you need to manually encode credentials or rewrite scripts for every auth change, debugging slows down.
File and metadata support
Real A2A traffic is often more than plain text.
A debugger should let you test:
- text messages,
- file attachments,
- structured metadata,
- per-message context.
A text-only debugger misses important parts of the protocol surface.
Streaming support
If the agent uses server-sent events, the debugger should show chunks as they arrive and then display the final assembled payload.
This matters when debugging:
- partial responses,
- long-running tasks,
- incremental status updates,
- stream termination errors.
Session history
You will usually send the same message multiple times while debugging. Session history makes it easier to compare outputs across agent changes.
Useful history features include:
- previous messages,
- previous responses,
- raw payloads,
- replay support.
Local-first traffic
For local development and sensitive payloads, the debugger should talk directly to your agent rather than routing requests through a third-party server.
This is important when testing:
- internal agents,
- private files,
- customer data,
- staging environments,
- localhost endpoints.
These checks turn A2A debugging into a repeatable “confirm the wire first” process. The same discipline applies at the API layer, as covered in how to test AI agents that call your APIs. If you also run MCP servers, the MCP server vs A2A guide explains why you often need protocol-specific debugging tools.
A practical A2A debugging loop
When an A2A agent misbehaves, use this loop.
Step 1: Connect and validate the Agent Card
Confirm the debugger can fetch the Agent Card.
Check that the card shows:
- the expected agent name,
- the expected skill,
- supported input types,
- correct auth requirements,
- correct protocol version.
If the skill is missing from the Agent Card, fix discovery before testing messages.
Step 2: Send the smallest possible message
Start with a minimal prompt that should trigger the skill.
Example:
Summarize this sentence: A2A lets agents communicate using a shared protocol.
Avoid files, metadata, and complex prompts until this works.
Step 3: Inspect Raw Data first
Before looking at rendered content, inspect the raw payload.
Check:
- task ID,
- message role,
- parts,
- artifacts,
- metadata,
- error fields,
- status.
This tells you what the agent actually emitted.
Step 4: Add metadata only after text works
Once the plain text path works, add metadata.
Example metadata:
{
"tenantId": "acme",
"priority": "debug",
"traceId": "local-test-001"
}
Then confirm the metadata appears in the request and reaches the agent-side handler.
Step 5: Add files last
If the agent supports file input, add files after text and metadata are confirmed.
Check whether the response includes the expected:
- file reference,
- artifact,
- content type,
- metadata,
- status.
Step 6: Separate transport bugs from logic bugs
Use the response shape to decide where to debug next.
If the response is malformed, missing fields, or contains protocol errors, investigate the agent implementation or transport layer.
If the response is well-formed but semantically wrong, the transport is probably fine. Debug the prompt, model behavior, tool calls, or agent reasoning.
Common questions
What is an A2A debugger in one sentence?
An A2A debugger connects to an Agent2Agent agent, sends test messages, and shows the full request and response so you can debug agent integrations without writing client code.
How is an A2A debugger different from an API client?
An API client tests HTTP endpoints. An A2A debugger understands the A2A layer on top of HTTP, including Agent Cards, task lifecycle, message parts, artifacts, and metadata.
Instead of leaving you with only a raw response body, it parses and renders A2A-specific structures.
Do I need an A2A debugger if I already have logs?
Yes, if you need to verify exact wire traffic.
Logs show what the agent author chose to log. They often omit structured fields such as message parts, artifacts, task IDs, and metadata. A debugger shows the actual request and response, which helps you separate transport bugs from agent-logic bugs.
For protocol context, see what Agent2Agent (A2A) is.
Is the Apidog A2A Debugger free?
Yes. It is bundled with the standard Apidog client. Download Apidog, and the A2A Debugger appears in the side panel on a recent version.
Can an A2A debugger test agents built with any framework?
Yes, as long as the agent exposes a valid A2A Agent Card.
The protocol is framework-agnostic, so agents built with LangGraph, CrewAI, AutoGen, or custom implementations can be tested if they implement A2A correctly.
Does an A2A debugger handle streaming responses?
A good one does.
When the agent supports server-sent events, the debugger should read chunks as they arrive, update the response view in real time, and show the assembled payload once the stream closes.


Top comments (0)