Glossary · A2A concepts

Streaming (A2A)

A2A's real-time update mode: SendStreamingMessage or SubscribeToTask opens a stream of task, status and artifact events over SSE or gRPC.

Streaming in A2A is the delivery mode in which the agent pushes a task’s status and artifact updates to the client over an open connection as they happen, started with SendStreamingMessage or SubscribeToTask.

Requirements. The agent must declare capabilities.streaming: true. If it does not, both operations fail with UnsupportedOperationError (JSON-RPC -32004).

What a stream contains. Each event is a StreamResponse holding exactly one of task, message, statusUpdate or artifactUpdate. Section 3.1.2 allows two patterns:

  • Message-only: exactly one Message, then the stream closes.
  • Task lifecycle: a Task first, then any number of status and artifact update events. The stream closes when the task reaches a terminal state.

Section 11.7 and the A2A streaming guide also close the stream at an interrupted state such as TASK_STATE_INPUT_REQUIRED, so clients should handle either behaviour. Artifact updates can arrive in chunks, marked with append and lastChunk.

On the wire. JSON-RPC and HTTP+JSON use Server-Sent Events with Content-Type: text/event-stream. In JSON-RPC each data: line is a full JSON-RPC response whose result is a StreamResponse. In HTTP+JSON the data: line is the StreamResponse itself. gRPC uses server-streaming RPCs. One JSON-RPC event, illustrative:

data: {"jsonrpc": "2.0", "id": 1, "result": {"statusUpdate": {"taskId": "task-uuid", "contextId": "context-uuid", "status": {"state": "TASK_STATE_COMPLETED"}}}}

Guarantees. Events must arrive in the order they were generated. An agent may serve several streams for one task, and each must receive the same events in the same order. Closing one stream does not affect the task or other streams. After a dropped connection, a client reopens with SubscribeToTask, which starts with a fresh Task snapshot. Messages are not a reliable delivery channel, so critical results belong in artifacts.

Version notes. v0.3 named the operations message/stream and tasks/resubscribe, tagged events with kind values such as status-update, and marked the last event with a final flag. Version 1.0 removed both kind and final.

Neighbouring terms. Push notifications suit long tasks and clients that cannot hold a connection open.

Sources

  1. A2A Protocol Specification, section 3.1.2: Send Streaming Message (accessed )
  2. A2A Protocol Specification, section 3.5: Task Update Delivery Mechanisms (accessed )
  3. A2A Protocol Specification, section 9.4.2: SendStreamingMessage (JSON-RPC) (accessed )
  4. A2A Protocol Specification, section 11.7: Streaming (HTTP+JSON) (accessed )
  5. A2A documentation: Streaming and Asynchronous Operations (accessed )
  6. A2A v0.3.0 type definitions (types.ts): TaskStatusUpdateEvent (accessed )