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/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>

Optional cache for the graph, useful for caching tasks.

property
callbacks: Callbacks
property
configurable: ContextType
property
context: ContextType

User provided context

property
debug: boolean

Whether to enable debug logging. Defaults to false.

property
durability: Durability

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.
property
encoding: TEncoding

The encoding to use for the stream.

  • undefined: Use the default format.
  • "text/event-stream": Use the Server-Sent Events format.
property
inputKeys: keyof Channels | keyof Channels[]

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.

property
interruptAfter: "*" | keyof Nodes[]

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

property
interruptBefore: "*" | keyof Nodes[]

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

property
maxConcurrency: number
property
metadata: Record<string, unknown>
property
outputKeys: keyof Channels | keyof Channels[]

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.

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

// Stream multiple channels
outputKeys: ["result", "intermediateState"]
property
recursionLimit: number
property
runId: string
property
runName: string
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
streamMode: TStreamMode

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
  • "debug": Streams events related to the execution of the graph - useful for tracing & debugging graph execution
property
subgraphs: TSubgraphs
property
tags: string[]
property
timeout: number
deprecatedproperty
checkpointDuring: boolean

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

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