LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
  • Stream
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
WebChannelsPregelPrebuiltRemoteStream
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/langgraph-sdkstreamSubagentDiscoveryapplyExecutionNamespace
Methodā—Since v1.9

applyExecutionNamespace

Promote a discovered subagent to its execution namespace, derived from checkpoint history (see namespace-from-history).

Routes through the same guarded promotion machinery the live SSE replay uses (#recordTaskNamespaceCandidate + the #observedOwnNamespaces no-demote rule) so a getHistory-derived namespace and an SSE-derived one cannot disagree. A no-op when the subagent is unknown or already sits on the target namespace.

Copy
applyExecutionNamespace(toolCallId: string, executionSegment: string)

Parameters

NameTypeDescription
toolCallId*string

Parent task tool-call id (the subagent's discovery key).

executionSegment*string

Single execution namespace segment, e.g. tools:<uuid>.

View source on GitHub