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/langgraphindexLifecycleTransformerOptions
Interfaceā—Since v0.3

LifecycleTransformerOptions

Copy
interface LifecycleTransformerOptions

Properties

View source on GitHub
property
emitRootOnRegister: boolean
property
getGraphName: (ns: Namespace) => string
property
getTerminalStatusOverride: () => Promise<AgentStatus | undefined>
property
initialStatus: AgentStatus
property
rootGraphName: string
property
serializeError: (err: unknown) => string

Configuration knobs for createLifecycleTransformer.

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.

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").

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.

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

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

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