I sent an A2A agent a message with two parts: a line of text asking it to total an order, and the order lines themselves as JSON. It came back with TASK_STATE_COMPLETED, HTTP 200 and an artifact. Every signal a client usually checks said the job was done.
The artifact said: "Hello, World! I have received your request (Total these order lines and reply with the sum.)". The order lines weren't in it. The agent had read the text and dropped the JSON without saying so.
That agent was the official A2A Hello World sample, so this isn't a bug report. It's an echo agent doing what its code says. But it's a clean example of a problem that gets harder to see once a real model sits behind the agent: two agents can exchange messages without one of them reading what the other sent. An earlier piece, A2A in Plain English, walked through the Agent Card and one task. This one is about checking that the reply covers what you sent.
Everything below comes from a local run on 5 Dec 2026: Python 3.13.5, the a2a-sdk package version 1.4.0, the Hello World sample from a2aproject/a2a-samples at commit 81e5f1b, and a small stdlib client I wrote for the checks.
Why the JSON disappeared
An A2A message is a list of Parts. According to the A2A specification, a Part holds exactly one of text, raw (file bytes), url or data (structured JSON), plus an optional mediaType. My message had one text part and one data part with mediaType: application/json.
The sample's executor builds its request with get_message_text(context.message). In the SDK, that helper "extracts and joins all text content from a Message's parts". Data parts aren't text, so they never reach the agent's logic. Nothing failed, so nothing reported a problem.
The Agent Card had warned me. The sample's card sets defaultInputModes to ["text/plain"], and its one skill lists text/plain as its only input mode. The spec describes defaultInputModes as the media types the agent supports across all skills, with per-skill inputModes overriding them. So the card never claimed to accept JSON.
The spec does define an error for this case: ContentTypeNotSupportedError (JSON-RPC code -32005), for "a Media Type provided in the request's message parts" that the agent doesn't support. In my run, the sample didn't return it. It accepted the message, ran, and completed. You can't count on the other side to reject what it can't read, so the client has to check.
Check 1: compare your parts with the card before you send
The cheapest check runs before any request. Collect the input modes from the card (defaultInputModes plus every skill's inputModes), work out the media type of each part you're about to send, and flag anything the card doesn't list.
My script, check_send.py, does that and then sends one SendMessage request with the A2A-Version: 1.0 header. Here's the real output against the Hello World sample:
$ python3 check_send.py http://127.0.0.1:9999 order_message.json card: Hello World Agent | input modes: text/plain sending 2 parts: text/plain, application/json HTTP 200 task 218e6297… state: TASK_STATE_COMPLETED | status message: 'Request is completed!' artifact text: 'Hello, World! I have received your request (Total these order lines and reply with the sum.)' warnings: 2 PREFLIGHT card does not list application/json as an input mode NO RECEIPT completed, but nothing says which parts the agent read exit code: 1 The first warning would have caught the problem before the request was sent. A warning is enough for a demo. In a real pipeline, you'd decide in advance whether to stop, convert the data to text, or pick a different agent.
Checking the card has limits. A card is the agent describing itself, and the spec calls skills "largely a descriptive concept." An agent can list application/json and still ignore half of a data part. That's what the second check is for.
Check 2: "completed" is not a receipt
TASK_STATE_COMPLETED tells you the task is over. It doesn't tell you what the agent read. If you own the receiving agent, or can agree a format with whoever does, have it return a receipt next to the result: a small data part that says what it got.
To test this, I modified a copy of the Hello World sample. The card lists text/plain and application/json as input modes. The executor reads data parts as well as text parts. Along with a text artifact, it returns a data part with a received object that counts the parts it read. Same message, same client:
$ python3 check_send.py http://127.0.0.1:9998 order_message.json card: Receipt Agent (demo) | input modes: application/json, text/plain sending 2 parts: text/plain, application/json HTTP 200 task 34fad6b7… state: TASK_STATE_COMPLETED | status message: 'Done.' artifact text: 'Order total: 24.75' artifact data: {"lines_read": 3.0, "received": {"data_parts": 1.0, "parts": 2.0, "text_parts": 1.0}, "total": 24.75} receipt: agent read 2 of 2 parts warnings: 0 exit code: 0 The client now has something to compare: it sent two parts and the agent reports two. The receipt shape is my own convention, not part of the A2A spec. The spec gives you the building blocks (data parts, artifacts, acceptedOutputModes to say which media types you can take back), not a standard acknowledgment format.
Notice 3.0 where the agent wrote 3. Data parts in this SDK go through google.protobuf.Value, and the SDK's own docstring for get_data_parts warns that "whole numbers come back as floats". If your receipt carries counts or IDs, compare them as numbers, not as strings, or "3" and "3.0" will look like a mismatch.
A receipt isn't proof the work is correct. An agent that reads both parts can still add them up wrong. It closes one gap: "did my input arrive?" Checking the answer itself is a separate job.
Check 3: treat input-required as a question, not a failure
The modified agent has one more change. If the order lines are missing, it doesn't guess. It stops with TASK_STATE_INPUT_REQUIRED and says what it needs:
$ python3 check_send.py http://127.0.0.1:9998 text_only_message.json card: Receipt Agent (demo) | input modes: application/json, text/plain sending 1 parts: text/plain HTTP 200 task b5767e2a… state: TASK_STATE_INPUT_REQUIRED | status message: 'No order lines found. Send them as a data part: {"lines": [...]}' warnings: 1 STATE TASK_STATE_INPUT_REQUIRED is not completed: read the status message exit code: 1 The A2A docs on the life of a task recommend this: if there's ambiguity or not enough context, the agent should respond with input-required and ask the client to clarify. Clients can attach the taskId to a later message to continue that task. I did, and sent the order lines to the same task. It completed with the same receipt and the same total, 24.75, and kept its task ID.
For the client, this means input-required isn't an error to retry and isn't a finished task. It's a question, and the status message is where the question is. If your client only looks for "completed" or "failed", it'll treat a question as a hang.
Check 4: read the body, not the HTTP status
The last case surprises people who come from REST. I sent a follow-up to a task that was already completed:
$ python3 check_send.py http://127.0.0.1:9999 text_only_message.json --task-id c46add7a-12c9-48b5-9f60-b2124abfe374 card: Hello World Agent | input modes: text/plain sending 1 parts: text/plain HTTP 200 JSON-RPC error -32004: Task c46add7a-12c9-48b5-9f60-b2124abfe374 is in terminal state: TASK_STATE_COMPLETED warnings: 1 ERROR in response body (check the body, not only the HTTP status) exit code: 1 The request failed, which is correct. The spec says tasks in a terminal state can't accept more messages. But the HTTP status was 200, and the error was only in the JSON-RPC body. That's how this server behaved over the JSON-RPC binding in my run. A client that checks only for a 2xx status would have logged this as a delivered message. Always look for an error object before you look for a result.
What I tested and what I didn't
Tested on my machine: the official Hello World sample and a modified copy, both on localhost over plain HTTP, the JSON-RPC binding only, with SendMessage and no streaming. All output above is from that run.
Not tested: gRPC or REST bindings, streaming, push notifications, authentication, other SDKs, and any agent backed by a real model. The check_send.py checks are my own heuristics, not part of the spec or the SDK. A model-backed agent can fail in ways a part count won't catch, such as reading the JSON and misunderstanding it.
Checklist
- Fetch the Agent Card and collect
defaultInputModesplus each skill'sinputModes. - Before sending, flag any part whose media type the card doesn't list.
- Set
acceptedOutputModesto the media types your client can actually handle. - Check for a JSON-RPC
errorobject before readingresult, whatever the HTTP status. - Treat
TASK_STATE_COMPLETEDas "finished", not "understood". - If you control both sides, return a receipt that says which parts were read, and compare it with what you sent.
- Compare numbers in data parts as numbers.
- Handle input-required by answering on the same
taskId, not by retrying the original request.
Where to go next
The free A2A: Free Quick-Start — The Agent2Agent Protocol in 15 Minutes is 6 pages. Per its product page, it covers the problem A2A solves, what the protocol standardizes, the five building blocks (Agent Card, Task, Message, Parts, Artifact), and the task lifecycle and where MCP fits.
For the full reference, A2A: The Complete Guide to the Agent2Agent Protocol is a 42-page PDF, $9.90+. Its product page lists chapters on Agent Card discovery, messages with typed Parts and Artifacts, transport and streaming, security, building a first agent with the official SDK, orchestration patterns, five common pitfalls, and a worked example of two agents talking end to end, including the interactive and error paths.
If you're still deciding whether you need a second agent at all, Single Agent, Subagents or an Agent Team? is a good place to start.
When one of your agents hands work to another, how do you find out what actually arrived?
This article was written with the assistance of AI and reviewed by the author.
