R.3

Stream modes and event types

A LangGraph run streams in eight modes, in two chunk versions, and through one beta event protocol, and each one has a fixed shape at langgraph 1.2.22.

Every row of this page comes from the code of langgraph 1.2.22 or from a capture of the same agent run. That run makes two model calls and one tool call. Section 5.1 explains when to use each mode.

The modes of stream

The type StreamMode lists seven modes. The loop also accepts tools, which the type leaves out. The register of the sources page records that gap as D4.

ModeOne chunk in v1Chunks in our runCapture
valuesthe whole state after each step421-stream-updates-values.txt
updatesa dict from the node name to the update that the node returned321-stream-updates-values.txt
messagesa tuple of a message chunk and a metadata dict1322-stream-messages.txt
customthe value that a node or tool passed to stream_writer0, because no tool wrote one23-stream-tasks-custom-debug.txt
tasksa task start with id, name, input, and triggers, or a task result with error and result623-stream-tasks-custom-debug.txt
debuga dict with step, timestamp, a type of checkpoint, task, or task_result, and a payload6, with no checkpointer23-stream-tasks-custom-debug.txt
checkpointsa checkpoint in the shape of get_statenot in the kitnone
toolsa tool event, as the table below shows4, on the slow_sum agent26-stream-tools-mode.txt

A create_agent graph streams updates when you pass no mode. A plain Pregel object streams values. Inside another graph, a graph with no mode streams values too.

The metadata of a messages chunk holds langgraph_node, langgraph_step, langgraph_triggers, ls_provider, and ls_model_type, among other keys. Read langgraph_node to tell the model of an agent from a model inside a tool.

The shape of a chunk in v1

CallWhat stream yields
one modethe chunk
a list of modesa tuple (mode, chunk)
one mode with subgraphs=Truea tuple (namespace, chunk)
a list of modes with subgraphs=Truea tuple (namespace, mode, chunk)

StreamPart in v2

With version="v2", every chunk is a TypedDict with the keys type, ns, and data, whatever modes you ask for. The v2 value came in langgraph 1.1.0.

Typetype valueLine in types.py
ValuesStreamPartvalues274
UpdatesStreamPartupdates286
MessagesStreamPartmessages298
CustomStreamPartcustom311
CheckpointStreamPartcheckpoints322
TasksStreamParttasks330
DebugStreamPartdebug345

invoke(..., version="v2") returns a GraphOutput with value and interrupts. Access to it as a dict still works, and it warns LangGraphDeprecatedSinceV11, as capture 24-stream-v2.txt shows.

Tool events

The tools mode yields one dict for each tool event. Its event key names the kind:

eventOther keysIn our run
tool-startedtool_call_id, tool_name, input1
tool-output-deltatool_call_id, delta2, from runtime.emit_output_delta
tool-finishedtool_call_id, output, the ToolMessage1
tool-errordefined by the protocol0

stream_events v3

stream_events defaults to version="v2", and you must name v3. Version v3 is beta, and it warns LangChainBetaWarning: The v3 streaming protocol on Pregel is experimental.. It returns a GraphRunStream, whose public members in capture 25-stream-events-v3.txt are abort, extensions, interleave, interrupted, interrupts, lifecycle, messages, output, subagents, subgraphs, tool_calls, and values.

RuleWhere
stream_mode and subgraphs raise TypeError under v3.
A sync stream_events with v1 or v2 raises NotImplementedError. Use astream_events for those versions.
The kit pins the event shapes with langchain-protocol 0.0.21.capture/requirements.txt

Each raw event is a frame with type event, a method, params with namespace, timestamp, and data, and a seq number. Our run gave 23 frames: 4 values, 17 messages, and 2 tools.

methodWhat data holdsLine in protocol.py
lifecyclethe status of a graph or a subagent: started, running, completed, failed, or interrupted269, 462
messagesa message event and its metadata273
toolsa tool event277
input.requested, input.answeredan interrupt and its answer281, 285
values, updates, checkpoints, custom, tasksthe data of the v1 mode of the same name289 to 305

A messages frame carries one of these events for one model message:

EventKeysIn our run
message-startrole, id2
content-block-startindex, content2
content-block-deltaindex, delta, such as {"type": "text-delta", "text": "The"}9, of which 8 are text-delta and 1 is tool-call-delta
content-block-finishindex, content, the whole block2
message-finishnone in our run2
errordefined by the protocol0

A provider that streams the arguments of a tool call sends tool-call-delta deltas. ChatOllama sends each call whole on one chunk before the last. So the v3 run of the kit has one tool-call-delta, which carries the whole call.

LangChain (Python): langchain, langchain-core, langgraph, deepagents, langsmith 1.5.0 · c2f4036 · 2026-11-11 · Edition 2026.11