LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsstreamSubagentRunStream
Interface●Since v1.10

SubagentRunStream

Copy
interface SubagentRunStream

Properties

property
cause: LifecycleCause | undefined
property
messages: AsyncIterable<Omit<ChatModelStream$1, "then">>
property
name: string
property
output: Promise<TValues>
property
subagents: AsyncIterable<SubagentRunStream<Record<string, unknown>, readonly ClientTool | ServerTool[]>>
property
toolCalls: AsyncIterable<ToolCallStreamUnion<TTools>>

A nested named-agent execution surfaced on run.subagents.

A subagent is a nested createAgent run whose lc_agent_name differs from its parent's — e.g. a createAgent({ name }) invoked inside a tool body. The handle exposes scoped projections (messages, toolCalls, nested subagents) plus the resolved name, the cause that triggered it, and the subagent's final output state.

This is a self-contained handle (no subclass of SubgraphRunStream): its projections are produced by per-subagent transformer instances that createSubagentTransformer drives directly.

Error name for instanceof checks and logging

Combined stdout and stderr output of the executed command

A list of additional subagents to provide to the agent