Summary
When deserializing v0.3 task responses, A2A.V0_3.AgentMessage requires kind and messageId properties to be present. However, real-world v0.3 agents return status.message without these fields, causing System.Text.Json to throw "missing required properties including: 'kind', 'messageId'".
Root Cause
The v0.3.0 specification was inconsistent in its requirements due to discrepancies between the .proto schema and the JSON Schema. Some agents implemented against one schema and not the other, resulting in status.message payloads like:
{
"role": "agent",
"parts": [{"kind": "text", "text": "..."}]
}
which omit the kind: "message" discriminator and messageId that the .NET SDK's AgentMessage type requires.
Failing Payload
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"id": "63b2861e-...",
"contextId": "2c727c41-...",
"kind": "task",
"status": {
"state": "completed",
"message": {
"role": "agent",
"parts": [{"kind": "text", "text": "Skill completed."}]
},
"timestamp": "2026-05-17T15:59:43.401Z"
},
"artifacts": [...]
}
}
The "kind": "task" discriminator on the outer response is handled correctly (deserialized as AgentTask). The failure is deeper AgentTask.Status.Message tries to deserialize into AgentMessage which requires kind and messageId.
Suggested Fix
Relax the AgentMessage deserialization in the v0.3 models to:
- Make
kind optional (default to "message" if absent)
- Make
messageId optional (generate a UUID if absent)
This would allow the SDK to handle payloads from agents that implemented against either the .proto or JSON Schema definition of v0.3, without breaking agents that do include these fields.
Affected Packages
A2A.V0_3 (1.0.0-preview2)
A2A.V0_3Compat (1.0.0-preview2) conversion to v1 types never runs because deserialization fails first
Reproduction
Use a2a-ask v1.3.0 with --a2a-version 0.3 against any v0.3 agent that returns status.message without kind/messageId:
a2a-ask send <v0.3-agent-url> -m "test" --a2a-version 0.3
Summary
When deserializing v0.3 task responses,
A2A.V0_3.AgentMessagerequireskindandmessageIdproperties to be present. However, real-world v0.3 agents returnstatus.messagewithout these fields, causingSystem.Text.Jsonto throw "missing required properties including: 'kind', 'messageId'".Root Cause
The v0.3.0 specification was inconsistent in its requirements due to discrepancies between the
.protoschema and the JSON Schema. Some agents implemented against one schema and not the other, resulting instatus.messagepayloads like:{ "role": "agent", "parts": [{"kind": "text", "text": "..."}] }which omit the
kind: "message"discriminator andmessageIdthat the .NET SDK'sAgentMessagetype requires.Failing Payload
{ "jsonrpc": "2.0", "id": "1", "result": { "id": "63b2861e-...", "contextId": "2c727c41-...", "kind": "task", "status": { "state": "completed", "message": { "role": "agent", "parts": [{"kind": "text", "text": "Skill completed."}] }, "timestamp": "2026-05-17T15:59:43.401Z" }, "artifacts": [...] } }The
"kind": "task"discriminator on the outer response is handled correctly (deserialized asAgentTask). The failure is deeperAgentTask.Status.Messagetries to deserialize intoAgentMessagewhich requireskindandmessageId.Suggested Fix
Relax the
AgentMessagedeserialization in the v0.3 models to:kindoptional (default to"message"if absent)messageIdoptional (generate a UUID if absent)This would allow the SDK to handle payloads from agents that implemented against either the
.protoor JSON Schema definition of v0.3, without breaking agents that do include these fields.Affected Packages
A2A.V0_3(1.0.0-preview2)A2A.V0_3Compat(1.0.0-preview2) conversion to v1 types never runs because deserialization fails firstReproduction
Use
a2a-askv1.3.0 with--a2a-version 0.3against any v0.3 agent that returnsstatus.messagewithoutkind/messageId: