Type identifier:
stream:collectCategory: Stream Operations
The Stream - Collect node consumes an asynchronous stream (such as LLM streaming responses) and processes each chunk as it arrives. It enables accumulator patterns where results build up incrementally, useful for streaming text aggregation, real-time processing, or tracking stream progress.
Handle | Type | Description |
|---|---|---|
| async iterable | An async iterator/stream to consume. |
| any | (Per-iteration) The accumulated result after processing each chunk. |
Handle | Type | Description |
|---|---|---|
| control | Triggered when stream processing begins. |
| control | Triggered for each chunk received from the stream. |
| control | Triggered when the stream is fully consumed. |
| any | The current chunk from the stream (available during |
| any | The accumulated result so far. |
| any | The final accumulated data after stream completion. |
This node has no additional configuration options.
start control handle when processing beginsaccumulated value to nullFor each chunk in the stream:
chunk valueprocess control handleresult input to update the accumulatoraccumulated with the new valueWhen the stream ends:
data to the final accumulated valuedone control handleEach chunk creates a processing cycle:
chunk becomes available with the current stream valueprocess fires to allow handlingresultaccumulated updates with that resultThe input must be a stream. The only current source is LLM streaming responses.
Use case: Collect an LLM's streaming response into a complete string.
Flow:
streamStream - Collect:
process: Concatenate chunk with accumulatedresultdata contains the complete responseUse case: Count items in a stream and update progress.
Flow:
streamStream - Collect:
start triggers progress initialisationprocess increments counter and updates UIdone triggers completion notificationUse case: Process and store each chunk independently while tracking totals.
Flow:
streamStream - Collect:
process → Database insert for each chunkresult → Running count/statisticsdata contains final statistics