class StreamManagerWhether the stream is currently running.
true while streaming, false when idle or completed.
Fetch and restore internal messages for reconstructed subagents from their
subgraph checkpoints. Should be called after reconstructSubagents to
restore the full subagent conversation after a page refresh.
Subagent messages are persisted in the LangGraph checkpointer under a
subgraph-specific checkpoint_ns (e.g. tools:<uuid>). This method
discovers the correct namespace by inspecting the main thread's intermediate
history checkpoints, where each pending task's checkpoint.checkpoint_ns
identifies the subgraph. Tasks are matched to tool calls by their Send index
(task.path[1]), which corresponds to the order of tool calls in the AI
message ā no deepagent-specific metadata required.
Get all currently running subagents.
Look up a single subagent stream by its tool call ID.
Get all subagents as a Map.
Retrieve all subagent streams associated with a specific AI message.
Retrieve all subagent streams matching a given tool name / type.
Check if any subagents are currently tracked.
Reconstruct subagent state from historical messages.
This method should be called when loading thread history to restore subagent visualization after:
Disconnect the client from the active run and mark the controller
idle. By default also cancels the run server-side; pass
{ cancel: false } or call disconnect to keep the agent
running (join/rejoin).
Subscribe to raw wire channels and receive protocol events.
For assembled projections, use the lazy getters instead:
thread.messages, thread.values, thread.toolCalls,
thread.subgraphs, thread.subagents, thread.output.