Stream modes: values, updates, messages, custom
Autonomy is invisible today: Impulse rolls a dice and you find out from a log later. This module streams a graph run node-by-node into a browser panel, the same SSE pattern cockpit already uses. You will watch a dice roll happen live from your phone.
Streaming turns one blocking call into a sequence of events. Instead of await graph.invoke(...) returning once at the end, graph.stream(...) yields chunks as the graph runs.
Stream modes decide what each chunk contains: values is the full state after each step; updates is only the delta each node returned (best for "which node just ran and what did it write"); messages is LLM tokens as they generate, for typewriter output; custom is arbitrary events you emit yourself from inside a node.
Pass an array to combine modes; chunks then arrive as [mode, chunk] tuples so you can tell them apart.
Try it yourself
values vs updates for lighting up nodes
You want to light up the node that just ran in a live panel. Which stream mode do you want?