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

Chat LangChain

What can I help with?

Enter to send·Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemoteStream
LangGraph SDK
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
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/langgraphindexRuntime
Interface●Since v1.0

Runtime

Copy
interface Runtime

Used in Docs

  • Graph API overview
  • Stores

Properties

property
configurable: ContextType
property
context: ContextType

User provided context

property
control: RunControl

Run-scoped control plane for cooperative draining.

Populated automatically during graph runs. Nodes can read runtime.control.drainRequested / drainReason, or call runtime.control.requestDrain() to ask the graph to stop at the next superstep boundary. Undefined outside an active graph runtime.

property
executionInfo: ExecutionInfo

Read-only execution information/metadata for the current node run. Undefined before task preparation.

property
heartbeat: () => void

Manually signal that the node is still making progress, resetting the idleTimeout of the node's TimeoutPolicy (if configured).

This is a no-op when the node has no idleTimeout configured. It is the only progress signal when refreshOn is "heartbeat", and is useful for long-running work that doesn't otherwise emit writes, stream events, child tasks, or callback events.

property
interrupt: IsEqual<InterruptType, unknown> extends true ? (value: unknown) => unknown : InterruptType

Interrupts the execution of a graph node.

This function can be used to pause execution of a node, and return the value of the resume input when the graph is re-invoked using Command. Multiple interrupts can be called within a single node, and each will be handled sequentially.

When an interrupt is called:

  1. If there's a resume value available (from a previous Command), it returns that value.
  2. Otherwise, it throws a GraphInterrupt with the provided value
  3. The graph can be resumed by passing a Command with a resume value

Because the interrupt function propagates by throwing a special GraphInterrupt error, you should avoid using try/catch blocks around the interrupt function, or if you do, ensure that the GraphInterrupt error is thrown again within your catch block.

property
serverInfo: ServerInfo

Metadata injected by LangGraph Server. Undefined when running open-source LangGraph without LangSmith deployments.

property
signal: AbortSignal

Abort signal to cancel the run.

property
store: BaseStore

Persistent key-value store

property
writer: IsEqual<WriterType, unknown> extends true ? (chunk: unknown) => void : WriterType

Callback to send custom data chunks via the custom stream mode

View source on GitHub