LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
  • Stream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServerStream
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraphindexSubgraphRunStream
Class●Since v0.3

SubgraphRunStream

A run stream for a child subgraph within a parent graph execution.

Extends GraphRunStream with a parsed name and index extracted from the last segment of the namespace path. The segment is expected to follow the "name:index" convention; when no numeric suffix is present, index defaults to 0.

Copy
class SubgraphRunStream

Bases

GraphRunStream<TValues, TExtensions>

Constructors

constructor
constructor

Properties

property
extensions: TExtensions

Merged projections from user-supplied StreamTransformer factories. Each transformer's init() return value is spread into this object.

property
index: number

The invocation index parsed from the "name:N" suffix of the last namespace segment. Defaults to 0 when no numeric suffix is present.

property
name: string

The node name extracted from the last segment of the namespace path (everything before the final colon, or the full segment if no colon).

property
path: Namespace

Namespace path identifying this stream's position in the agent tree. An empty array for the root stream.

property
interrupted: boolean
property
interrupts: Interrupt[]
property
lifecycle: AsyncIterable<LifecycleEntry>
property
messages: AsyncIterable<ChatModelStreamHandle>
property
output: Promise<TValues>
property
signal: AbortSignal
property
subgraphs: AsyncIterable<SubgraphRunStream<Record<string, unknown>, Record<string, unknown>>>
property
values: AsyncIterable<TValues, any, any> & PromiseLike<TValues>

Methods

method
[asyncIterator]→ AsyncIterator<T>
method
abort

Programmatically abort this run. Equivalent to calling signal.abort(reason).

method
messagesFrom→ AsyncIterable<ChatModelStreamHandle>

Messages produced by a specific graph node. Use when the run has multiple model-calling nodes and you only want messages from one.

Inherited fromGraphRunStream

Properties

Pextensions: TExtensions
—

Merged projections from user-supplied StreamTransformer factories.

Ppath: Namespace
—

Namespace path identifying this stream's position in the agent tree.

Pinterrupted: booleanPinterrupts: Interrupt[]Plifecycle: AsyncIterable<LifecycleEntry>Pmessages: AsyncIterable<ChatModelStreamHandle>Poutput: Promise<TValues>Psignal: AbortSignalPsubgraphs: AsyncIterable<SubgraphRunStream<Record<string, unknown>, Record<string, unknown>>>Pvalues: AsyncIterable<TValues, any, any> & PromiseLike<TValues>

Methods

Mabort
—

Programmatically abort this run. Equivalent to calling

MmessagesFrom→ AsyncIterable<ChatModelStreamHandle>
—

Messages produced by a specific graph node. Use when the run has

View source on GitHub