SendMessage — only the method name changes.
The response is text/event-stream instead of a JSON body.
Request
Response stream
Each SSE frame carries one complete JSON-RPC response envelope in itsdata: line. Frames have no event: name — read data: and parse it.
id echoes your request id.
The four event shapes
result is a field-presence union with exactly one key.
Errors mid-stream arrive as an ordinary frame carrying a JSON-RPC
error
instead of a result.
Reading the stream
Terminal states
The stream ends when the task reaches a terminal state. Task states areTASK_STATE_* strings — see Tasks for the full set and
which four are terminal.
TASK_STATE_INPUT_REQUIRED is not terminal. It means the run is parked
waiting on a human — most often an approval gate. Resume with a follow-up
SendMessage; see A2A overview.
Reconnecting
If the connection drops mid-run, useSubscribeToTask rather than resending the message. It
replays the current snapshot and then tails live updates.