The state type of the stream
The tool call type for messages (inferred from agent tools)
Type configuration bag for interrupts, configurable, updates, etc.
The ID of the assistant to use.
The current branch of the thread. Used for navigating between different conversation branches.
LangGraph SDK client used to send requests and receive responses.
Last seen error from the stream, if any.
Reset to undefined when a new stream starts.
Experimentalexperimental_Tree of all branches for the thread. This API is experimental and subject to change.
Get the metadata for a message, such as first thread state the message was seen in and branch information.
The metadata for the message, or undefined if not found
Flattened history of thread states of a thread. Contains all states in the current branch's history.
Current interrupt, if the stream is interrupted.
Convenience alias for interrupts[0].
For workflows with multiple concurrent interrupts, use interrupts instead.
All current interrupts from the stream. When using Send() fan-out with per-task interrupt() calls, multiple interrupts may be pending simultaneously.
Whether the stream is currently running.
true while streaming, false when idle or completed.
Whether the thread is currently being loaded.
true during initial thread data fetch.
Join an active stream that's already running.
The ID of the run to join
OptionallastEventId: stringOptional last event ID for resuming from a specific point
Optionaloptions: {Optional configuration for the stream
Messages accumulated during the stream. Includes both human and AI messages. AI messages include typed tool calls based on the agent's tools.
Set the branch of the thread.
The branch identifier to switch to
Stops the currently running stream.
A promise that resolves when the stream is stopped.
Create and stream a run to the thread.
The current state values of the stream. Updated as streaming events are received.
Base stream interface shared by all stream types.
Contains core properties for state management, messaging, and stream control that are common to CompiledStateGraph, ReactAgent, and DeepAgent streams.
This interface provides the foundation that all stream types build upon:
values,isLoading,error)messages)interrupt)submit,stop)branch,history)Example