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/langgraphwebLifecycleTransformerOptions
Interface●Since v0.3

LifecycleTransformerOptions

Configuration knobs for createLifecycleTransformer.

Copy
interface LifecycleTransformerOptions

Properties

property
emitRootOnRegister: boolean

When true, the transformer emits the root lifecycle.started (or .running) event synchronously from onRegister and emits the terminal root event from finalize/fail. Set to false when an outer authority (e.g. RunProtocolSession) is responsible for root lifecycle emission; in that case the transformer still tracks root status internally for cascade purposes but does not write to the wire.

property
getGraphName: (ns: Namespace) => string

Resolves a human-readable graph name for a non-root namespace. The default uses the last segment of the namespace, stripping any :suffix (e.g. ["tools:abc"] -> "tools").

property
getTerminalStatusOverride: () => Promise<AgentStatus | undefined>

Optional async hook consulted by finalize() to override the computed terminal status. Returning a status here wins over the pending-interrupt heuristic. Useful for carriers (like the API session) that have authoritative knowledge of thread state.

property
initialStatus: AgentStatus

Lifecycle status emitted for the root namespace when LifecycleTransformerOptions.emitRootOnRegister is true.

property
rootGraphName: string

Human-readable name for the root graph. Used as graph_name for the root lifecycle event.

property
serializeError: (err: unknown) => string

Converts an unknown failure value to a string for the lifecycle.failed error field.

View source on GitHub