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

PregelOptions

Copy
interface PregelOptions

Bases

RunnableConfig<ContextType>

Properties

Inherited fromRunnableConfig(langchain_core)

Attributes

Arun_nameAmax_concurrencyArecursion_limitArun_id
View source on GitHub
property
cache: BaseCache<unknown>
property
callbacks: Callbacks
property
configurable: ContextType
property
context: ContextType
property
debug: boolean
property
durability: Durability
property
encoding: TEncoding
property
inputKeys: keyof Channels | keyof Channels[]
property
interruptAfter: "*" | keyof Nodes[]
property
interruptBefore: "*" | keyof Nodes[]
property
maxConcurrency: number
property
metadata: Record<string, unknown>
property
outputKeys: keyof Channels | keyof Channels[]
property
recursionLimit: number
property
runId: string
property
runName: string
property
signal: AbortSignal
property
store: BaseStore
property
streamMode: TStreamMode
property
subgraphs: TSubgraphs
property
tags: string[]
property
timeout: number
deprecatedproperty
checkpointDuring: boolean

Configuration options for executing a Pregel graph. These options control how the graph executes, what data is streamed, and how interrupts are handled.

Optional cache for the graph, useful for caching tasks.

User provided context

Whether to enable debug logging. Defaults to false.

Whether to checkpoint during the run (or only at the end/interruption).

  • "async": Save checkpoint asynchronously while the next step executes (default).
  • "sync": Save checkpoint synchronously before the next step starts.
  • "exit": Save checkpoint only when the graph exits.

The encoding to use for the stream.

  • undefined: Use the default format.
  • "text/event-stream": Use the Server-Sent Events format.

Specifies which channel keys to retrieve from the checkpoint when resuming execution. This is an advanced option that you generally don't need to set manually. The graph will automatically determine the appropriate input keys based on its configuration.

Optional array of node names or "all" to interrupt after executing these nodes. Used for implementing human-in-the-loop workflows.

Optional array of node names or "all" to interrupt before executing these nodes. Used for implementing human-in-the-loop workflows.

Specifies which channel keys to include in the output stream and final result. Use this to filter which parts of the graph state you want to observe.

The run ID for the current execution. Undefined when runId is not provided in the config.

Abort signal to cancel the run.

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

The streaming modes enabled for this graph. Defaults to ["values"]. Supported modes:

  • "values": Streams the full state after each step
  • "updates": Streams state updates after each step
  • "messages": Streams messages from within nodes
  • "custom": Streams custom events from within nodes
  • "tools": Streams tool-call lifecycle events (on_tool_start, on_tool_event, on_tool_end, on_tool_error) from LLM tool execution
  • "debug": Streams events related to the execution of the graph - useful for tracing & debugging graph execution

Whether to checkpoint intermediate steps, defaults to true. If false, only the final checkpoint is saved.

Copy
// Stream only the 'result' channel
outputKeys: "result"

// Stream multiple channels
outputKeys: ["result", "intermediateState"]