LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
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
LangGraph SDK
ClientAuthReactLoggingReact UiServer
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/langgraphindexRuntime
Interface●Since v0.3

Runtime

Copy
interface Runtime

Used in Docs

  • Graph API overview
  • Persistence

Properties

property
configurable: ContextType
property
context: ContextType

User provided context

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
signal: AbortSignal

Abort signal to cancel the run.

property
store: BaseStore

Optional long-term memory store for the graph, allows for persistence & retrieval of data across threads

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