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

LangChain Assistant

Ask a question to get started

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

@langchain/langgraph

Description

LangGraph Logo LangGraph Logo

Low-level orchestration framework for building stateful agents.

Docs Version npm - Downloads Open Issues

LangGraph — used by Replit, Uber, LinkedIn, GitLab and more — is a low-level orchestration framework for building controllable agents. While langchain provides integrations and composable components to streamline LLM application development, the LangGraph library enables agent orchestration — offering customizable architectures, long-term memory, and human-in-the-loop to reliably handle complex tasks.

npm install @langchain/langgraph @langchain/core

[!TIP] If you're looking to quickly build agents, check out Deep Agents — a higher-level package built on LangGraph for agents that can plan, use subagents, and leverage file systems for complex tasks.

For an equivalent Python library, check out LangGraph and the Python docs.

Why use LangGraph?

LangGraph provides low-level supporting infrastructure for any long-running, stateful workflow or agent:

  • Durable execution — Build agents that persist through failures and can run for extended periods, automatically resuming from exactly where they left off.
  • Human-in-the-loop — Seamlessly incorporate human oversight by inspecting and modifying agent state at any point during execution.
  • Comprehensive memory — Create truly stateful agents with both short-term working memory for ongoing reasoning and long-term persistent memory across sessions.
  • Debugging with LangSmith — Gain deep visibility into complex agent behavior with visualization tools that trace execution paths, capture state transitions, and provide detailed runtime metrics.
  • Production-ready deployment — Deploy sophisticated agent systems confidently with scalable infrastructure designed to handle the unique challenges of stateful, long-running workflows.

[!TIP] For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.

LangGraph’s ecosystem

While LangGraph can be used standalone, it also integrates seamlessly with any LangChain product, giving developers a full suite of tools for building agents. To improve your LLM application development, pair LangGraph with:

  • Deep Agents (JS) — Build agents that can plan, use subagents, and leverage file systems for complex tasks. A higher-level package built on top of LangGraph.
  • LangChain – Provides integrations and composable components to streamline LLM application development.
  • LangSmith — Helpful for agent evals and observability. Debug poor-performing LLM app runs, evaluate agent trajectories, gain visibility in production, and improve performance over time.

Additional resources

  • LangChain Forum: Connect with the community and share all of your technical questions, ideas, and feedback.
  • LangChain Academy: Learn the basics of LangGraph in our free, structured course.
  • Streaming Cookbook: Documentation and examples around LangGraphs's streaming capabilities.
  • API Reference: Detailed reference on core classes, methods, how to use the graph and checkpointing APIs, and higher-level prebuilt components.
  • Built with LangGraph: Hear how industry leaders use LangGraph to ship powerful, production-ready AI applications.

Acknowledgements

LangGraph is inspired by Pregel and Apache Beam. The public interface draws inspiration from NetworkX. LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain.

Classes

Class

LastValueAfterFinish

Stores the last value received, but only made available after finish(). Once made available, clears the value.

Class

BinaryOperatorAggregate

Stores the result of applying a binary operator to the current value and each new value.

Class

DeltaChannel

Reducer channel that stores only a sentinel in checkpoint blobs and reconstructs state by replaying ancestor writes through the reducer.

DeltaChannel avoids re-serializing the full accumulated valu

Class

LanggraphZodMetaRegistry

A Zod v4-compatible meta registry that extends the base registry.

This registry allows you to associate and retrieve metadata for Zod schemas, leveraging the base registry for storage. It is compatib

Class

SchemaMetaRegistry

A registry for storing and managing metadata associated with schemas. This class provides methods to get, extend, remove, and check metadata for a given schema.

Class

AsyncBatchedStore

Abstract base class for persistent key-value stores.

Stores enable persistence and memory that can be shared across threads, scoped to user IDs, assistant IDs, or other arbitrary namespaces.

Feature

Class

BaseCheckpointSaver

Class

BaseLangGraphError

Class

BaseStore

Abstract base class for persistent key-value stores.

Stores enable persistence and memory that can be shared across threads, scoped to user IDs, assistant IDs, or other arbitrary namespaces.

Feature

Class

BinaryOperatorAggregate

Stores the result of applying a binary operator to the current value and each new value.

Class

Command

One or more commands to update the graph's state and send messages to nodes. Can be used to combine routing logic with state updates in lieu of conditional edges

Class

CompiledStateGraph

Final result from building and compiling a StateGraph. Should not be instantiated directly, only using the StateGraph .compile() instance method.

Class

DeltaChannel

Reducer channel that stores only a sentinel in checkpoint blobs and reconstructs state by replaying ancestor writes through the reducer.

DeltaChannel avoids re-serializing the full accumulated valu

Class

DeltaValue

Represents a state field backed by a DeltaChannel.

Unlike ReducedValue (which stores the full accumulated value in every checkpoint blob via BinaryOperatorAggregate), a DeltaValue field persists

Class

EmptyChannelError

Class

EmptyInputError

Class

EventLog

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remot

Class

Graph

Class

GraphBubbleUp

Class

GraphCallbackHandler

Extend this class and pass an instance through callbacks to observe graph interrupts and resumes. Lifecycle methods are always awaited, including when other callbacks run in the background. Set `rai

Class

GraphDrained

Raised when a graph run exits early due to a drain request.

This indicates the graph stopped cooperatively at a superstep boundary because RunControl#requestDrain was called (e.g., in response to SIG

Class

GraphInterrupt

Class

GraphRecursionError

Class

GraphRunStream

Primary run stream for a LangGraph execution.

Implements AsyncIterable over ProtocolEvent and exposes ergonomic projections for values, messages, subgraphs, output, and interrupts. Created by createG

Class

GraphValueError

Class

InMemoryStore

In-memory key-value store with optional vector search.

A lightweight store implementation using JavaScript Maps. Supports basic key-value operations and vector search when configured with embeddings.

Class

InvalidUpdateError

Class

MemorySaver

Class

NodeError

Failure context passed to a node-level error handler.

A node-level error handler is registered via StateGraph.addNode(name, fn, { errorHandler }). The handler runs ONLY after the failing node's Ret

Class

NodeInterrupt

Raised by a node to interrupt execution.

Class

NodeTimeoutError

Raised when a node invocation exceeds one of its configured timeouts.

Does not extend GraphBubbleUp (so it flows through the normal node error path) and is intentionally treated as retryable by t

Class

Overwrite

Bypass a reducer and write the wrapped value directly to a BinaryOperatorAggregate channel.

Receiving multiple Overwrite values for the same channel in a single super-step will raise an InvalidUpda

Class

ParentCommand

Class

ReducedValue

Represents a state field whose value is computed and updated using a reducer function.

ReducedValue allows you to define accumulators, counters, aggregators, or other fields whose value is determined

Class

RemoteException

Exception raised when an error occurs in the remote graph.

Class

RunControl

Run-scoped control surface for cooperative draining.

Intended for a single graph run. Create a fresh RunControl per run; reusing a control after RunControl#requestDrain leaves it drained.

Safe to us

Class

Send

A message or packet to send to a specific node in the graph.

The Send class is used within a StateGraph's conditional edges to dynamically invoke a node with a custom state at the next step.

Imp

Class

StateGraph

A graph whose nodes communicate by reading and writing to a shared state. Each node takes a defined State as input and returns a Partial<State>.

Each state key can optionally be annotated with a

Class

StateGraphInputError

Error thrown when invalid input is provided to a StateGraph.

This typically means that the input to the StateGraph constructor or builder did not match the required types. A valid input should be a S

Class

StateSchema

StateSchema provides a unified API for defining LangGraph state schemas.

Class

SubgraphRunStream

A run stream for a child subgraph within a parent graph execution.

Extends GraphRunStream with a parsed name and index extracted from the last segment of the namespace path. The segment is expected t

Class

UnreachableNodeError

Class

UntrackedValue

Represents a state field whose value is transient and never checkpointed.

Use UntrackedValue for state fields that should be tracked for the lifetime of the process, but should not participate in dur

Class

Pregel

The Pregel class is the core runtime engine of LangGraph, implementing a message-passing graph computation model inspired by [Google's Pregel system](https://research.google/pubs/pregel-a-system-for-l

Class

StreamChannel

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remot

Class

ToolNode

A node that runs the tools requested in the last AIMessage. It can be used either in StateGraph with a "messages" key or in MessageGraph. If multiple tool calls are requested, they will be run in para

Class

Channel

Utility class for working with channels in the Pregel system. Provides static methods for subscribing to channels and writing to them.

Channels are the communication pathways between nodes in a Prege

Class

Pregel

The Pregel class is the core runtime engine of LangGraph, implementing a message-passing graph computation model inspired by [Google's Pregel system](https://research.google/pubs/pregel-a-system-for-l

Class

RemoteGraph

The RemoteGraph class is a client implementation for calling remote APIs that implement the LangGraph Server API specification.

For example, the RemoteGraph class can be used to call APIs from de

Class

EventLog

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remot

Class

StreamChannel

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remot

Class

AsyncBatchedStore

Abstract base class for persistent key-value stores.

Stores enable persistence and memory that can be shared across threads, scoped to user IDs, assistant IDs, or other arbitrary namespaces.

Feature

Class

BaseCheckpointSaver

Class

BaseLangGraphError

Class

BaseStore

Abstract base class for persistent key-value stores.

Stores enable persistence and memory that can be shared across threads, scoped to user IDs, assistant IDs, or other arbitrary namespaces.

Feature

Class

BinaryOperatorAggregate

Stores the result of applying a binary operator to the current value and each new value.

Class

ChatModelStreamImpl

The main stream object returned by chat model streaming.

Implements AsyncIterable<ChatModelStreamEvent> for raw event access and PromiseLike<AIMessage> for simple await usage.

Class

Command

One or more commands to update the graph's state and send messages to nodes. Can be used to combine routing logic with state updates in lieu of conditional edges

Class

CompiledStateGraph

Final result from building and compiling a StateGraph. Should not be instantiated directly, only using the StateGraph .compile() instance method.

Class

DeltaChannel

Reducer channel that stores only a sentinel in checkpoint blobs and reconstructs state by replaying ancestor writes through the reducer.

DeltaChannel avoids re-serializing the full accumulated valu

Class

DeltaValue

Represents a state field backed by a DeltaChannel.

Unlike ReducedValue (which stores the full accumulated value in every checkpoint blob via BinaryOperatorAggregate), a DeltaValue field persists

Class

EmptyChannelError

Class

EmptyInputError

Class

EventLog

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remot

Class

Graph

Class

GraphBubbleUp

Class

GraphCallbackHandler

Extend this class and pass an instance through callbacks to observe graph interrupts and resumes. Lifecycle methods are always awaited, including when other callbacks run in the background. Set `rai

Class

GraphDrained

Raised when a graph run exits early due to a drain request.

This indicates the graph stopped cooperatively at a superstep boundary because RunControl#requestDrain was called (e.g., in response to SIG

Class

GraphInterrupt

Class

GraphRecursionError

Class

GraphRunStream

Primary run stream for a LangGraph execution.

Implements AsyncIterable over ProtocolEvent and exposes ergonomic projections for values, messages, subgraphs, output, and interrupts. Created by createG

Class

GraphValueError

Class

InMemoryStore

In-memory key-value store with optional vector search.

A lightweight store implementation using JavaScript Maps. Supports basic key-value operations and vector search when configured with embeddings.

Class

InvalidUpdateError

Class

MemorySaver

Class

NodeError

Failure context passed to a node-level error handler.

A node-level error handler is registered via StateGraph.addNode(name, fn, { errorHandler }). The handler runs ONLY after the failing node's Ret

Class

NodeInterrupt

Raised by a node to interrupt execution.

Class

NodeTimeoutError

Raised when a node invocation exceeds one of its configured timeouts.

Does not extend GraphBubbleUp (so it flows through the normal node error path) and is intentionally treated as retryable by t

Class

Overwrite

Bypass a reducer and write the wrapped value directly to a BinaryOperatorAggregate channel.

Receiving multiple Overwrite values for the same channel in a single super-step will raise an InvalidUpda

Class

ParentCommand

Class

Pregel

The Pregel class is the core runtime engine of LangGraph, implementing a message-passing graph computation model inspired by [Google's Pregel system](https://research.google/pubs/pregel-a-system-for-l

Class

ReducedValue

Represents a state field whose value is computed and updated using a reducer function.

ReducedValue allows you to define accumulators, counters, aggregators, or other fields whose value is determined

Class

RemoteException

Exception raised when an error occurs in the remote graph.

Class

RunControl

Run-scoped control surface for cooperative draining.

Intended for a single graph run. Create a fresh RunControl per run; reusing a control after RunControl#requestDrain leaves it drained.

Safe to us

Class

Send

A message or packet to send to a specific node in the graph.

The Send class is used within a StateGraph's conditional edges to dynamically invoke a node with a custom state at the next step.

Imp

Class

StateGraph

A graph whose nodes communicate by reading and writing to a shared state. Each node takes a defined State as input and returns a Partial<State>.

Each state key can optionally be annotated with a

Class

StateGraphInputError

Error thrown when invalid input is provided to a StateGraph.

This typically means that the input to the StateGraph constructor or builder did not match the required types. A valid input should be a S

Class

StateSchema

StateSchema provides a unified API for defining LangGraph state schemas.

Class

StreamChannel

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remot

Class

SubgraphRunStream

A run stream for a child subgraph within a parent graph execution.

Extends GraphRunStream with a parsed name and index extracted from the last segment of the namespace path. The segment is expected t

Class

UnreachableNodeError

Class

UntrackedValue

Represents a state field whose value is transient and never checkpointed.

Use UntrackedValue for state fields that should be tracked for the lifetime of the process, but should not participate in dur

Class

MultipleSubgraphsError

deprecated
Class

ToolExecutor

deprecated
Class

MultipleSubgraphsError

deprecated

Functions

Function

channelsFromCheckpoint

Hydrate channels from a checkpoint, reconstructing any DeltaChannel whose value is absent from channel_values by replaying ancestor writes.

For most channels (and for delta channels with a DeltaSna

Function

createCheckpoint

Function

deltaChannelsToSnapshot

Return the set of DeltaChannel names that should snapshot now.

A channel snapshots when EITHER its accumulated update count reaches snapshotFrequency OR the total supersteps since its last snapshot

Function

empty

Function

exitDeltaTaskId

Synthetic task id for exit-mode DeltaChannel writes.

Embeds the superstep in the first UUID group so ORDER BY task_id, idx preserves chronological order while remaining a valid RFC UUID (required b

Function

isDeltaChannel

Structural check for a DeltaChannel without importing it (avoids an import cycle: delta.ts imports base.ts).

Function

withLangGraph

Function

getConfigTypeSchema

Get the config schema for a graph.

Function

getInputTypeSchema

Get the input schema for a graph.

Function

getOutputTypeSchema

Get the output schema for a graph.

Function

getStateTypeSchema

Get the state schema for a graph.

Function

getUpdateTypeSchema

Get the update schema for a graph.

Function

convertToProtocolEvent

Function

createGraphRunStream

Creates a GraphRunStream with built-in transformers and kicks off the background pump that feeds raw stream chunks through the transformer pipeline.

Built-in transformers are registered in this order

Function

createLifecycleTransformer

Create the built-in lifecycle transformer.

Marked as a NativeStreamTransformer so the run stream factory can expose _lifecycleLog via a dedicated getter (run.lifecycle) rather than through `run.e

Function

createMessagesTransformer

Creates a StreamTransformer that groups messages channel events into per-message ChatModelStream instances.

A new ChatModelStream is created on message-start and closed on message-finish. Con

Function

createSubgraphDiscoveryTransformer

Create the subgraph discovery transformer.

Registering this transformer against a mux replaces the legacy inline behavior that previously lived in StreamMux.push. The mux no longer knows about the su

Function

createValuesTransformer

Creates a StreamTransformer that captures values channel events into a local StreamChannel. Only events whose namespace exactly matches path are recorded; events from child or sibling namespaces are

Function

entrypoint

Define a LangGraph workflow using the entrypoint function.

Function signature

The wrapped function must accept at most two parameters. The first parameter is the input to the function. The

Function

filterLifecycleEntries

Filter a lifecycle StreamChannel to only the entries whose namespace lies within the subtree rooted at path.

Returns an AsyncIterable whose iterator yields every entry whose namespace either equals

Function

filterSubgraphHandles

Filter a SubgraphDiscovery channel to only the direct children of a given namespace.

Returns an AsyncIterable whose iterator yields stream handles for discoveries whose namespace is exactly one seg

Function

getConfig

A helper utility function that returns the LangGraphRunnableConfig that was set when the graph was initialized.

Note: This only works when running in an environment that supports node:async_hooks and

Function

getCurrentTaskInput

A helper utility function that returns the input for the currently executing task.

Note: When called without arguments, this relies on node:async_hooks / AsyncLocalStorage, which is available in

Function

getJsonSchemaFromSchema

Get the JSON schema from a SerializableSchema.

Function

getPreviousState

A helper utility function for use with the functional API that returns the previous state from the checkpoint from the last invocation of the current thread.

This function allows workflows to access

Function

getSchemaDefaultGetter

Detect if a schema has a default value by validating undefined.

Uses the Standard Schema ~standard.validate API to detect defaults. If the schema accepts undefined and returns a value, that val

Function

getStore

A helper utility function that returns the BaseStore that was set when the graph was initialized

Function

getSubgraphsSeenSet

Used for subgraph detection.

Function

getWriter

A helper utility function that returns the LangGraphRunnableConfig#writer if "custom" stream mode is enabled, otherwise undefined.

Function

interrupt

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 inte

Function

isCheckpointEnvelope

True when payload is a lightweight checkpoint envelope (not a full-state Pregel checkpoints debug payload).

Function

isCommand

A type guard to check if the given value is a Command.

Useful for type narrowing when working with the Command object.

Function

isGraphBubbleUp

Function

isGraphDrained

Function

isGraphInterrupt

Function

isInterrupted

Checks if the given graph invoke / stream chunk contains interrupt.

Function

isNativeTransformer

Type guard that tests whether a transformer is a NativeStreamTransformer.

Function

isNodeError

Type guard that checks whether a value is a NodeError.

Function

isNodeTimeoutError

Function

isParentCommand

Function

isSerializableSchema

Type guard to check if a given value is a SerializableSchema, i.e. both a Standard Schema and a Standard JSON Schema object.

Function

isStandardSchema

Type guard to check if a given value is a Standard Schema V1 object.

Function

messagesDeltaReducer

Experimental. Batch reducer for use with DeltaChannel.

Processes all writes in one pass — dedup by ID and RemoveMessage tombstoning — without calling messagesStateReducer.

This reducer is ba

Function

messagesStateReducer

Reducer function for combining two sets of messages in LangGraph's state system.

This reducer handles several tasks:

  1. Normalizes both left and right message inputs to arrays.
  2. Coerces any mes
Function

pushMessage

Manually push a message to a message stream.

This is useful when you need to push a manually created message before the node has finished executing.

When a message is pushed, it will be automaticall

Function

task

Define a LangGraph task using the task function.

Tasks can only be called from within an entrypoint or from within a StateGraph. A task can be called like a regular function with the following diff

Function

writer

Function

addMessages

Reducer function for combining two sets of messages in LangGraph's state system.

This reducer handles several tasks:

  1. Normalizes both left and right message inputs to arrays.
  2. Coerces any mes
Function

createReactAgentAnnotation

Function

toolsCondition

A conditional edge function that determines whether to route to a tools node or end the graph.

This function is designed to be used as a conditional edge in a LangGraph state graph to implement the c

Function

inferChannel

Maps a protocol event method to its subscription Channel.

Returns undefined for unrecognized methods so that new server-side channels (e.g. from extension transformers) don't break existing subscri

Function

isPrefixMatch

Whether namespace starts with prefix.

Segments are compared literally first; if the prefix segment itself contains no :, the candidate segment is also compared after its dynamic suffix is strip

Function

isStreamChannel

@langchain/langgraph/stream — backend toolkit for the v2 streaming protocol.

This entrypoint collects the primitives needed to build a custom transport or server on top of the Agent Streaming Proto

Function

isSupportedChannel

Whether value names a protocol subscription channel — either a base channel ("messages", "values", …) or a named custom channel ("custom:<name>"). Unknown/future method names return false, m

Function

matchesSubscription

Returns whether an event should be delivered for a subscription definition.

When the definition carries a since replay cursor, events at or before that sequence number are excluded — letting the sa

Function

normalizeNamespaceSegment

Strip dynamic suffixes (after :) from a namespace segment.

Server-emitted namespaces contain runtime-generated suffixes like "fetcher:abc-uuid", while user-supplied subscription filters are typic

Function

convertToProtocolEvent

Function

isCheckpointEnvelope

True when payload is a lightweight checkpoint envelope (not a full-state Pregel checkpoints debug payload).

Function

addMessages

Reducer function for combining two sets of messages in LangGraph's state system.

This reducer handles several tasks:

  1. Normalizes both left and right message inputs to arrays.
  2. Coerces any mes
Function

convertToProtocolEvent

Function

createGraphRunStream

Creates a GraphRunStream with built-in transformers and kicks off the background pump that feeds raw stream chunks through the transformer pipeline.

Built-in transformers are registered in this order

Function

createLifecycleTransformer

Create the built-in lifecycle transformer.

Marked as a NativeStreamTransformer so the run stream factory can expose _lifecycleLog via a dedicated getter (run.lifecycle) rather than through `run.e

Function

createMessagesTransformer

Creates a StreamTransformer that groups messages channel events into per-message ChatModelStream instances.

A new ChatModelStream is created on message-start and closed on message-finish. Con

Function

createSubgraphDiscoveryTransformer

Create the subgraph discovery transformer.

Registering this transformer against a mux replaces the legacy inline behavior that previously lived in StreamMux.push. The mux no longer knows about the su

Function

createValuesTransformer

Creates a StreamTransformer that captures values channel events into a local StreamChannel. Only events whose namespace exactly matches path are recorded; events from child or sibling namespaces are

Function

entrypoint

Define a LangGraph workflow using the entrypoint function.

Function signature

The wrapped function must accept at most two parameters. The first parameter is the input to the function. The

Function

filterLifecycleEntries

Filter a lifecycle StreamChannel to only the entries whose namespace lies within the subtree rooted at path.

Returns an AsyncIterable whose iterator yields every entry whose namespace either equals

Function

filterSubgraphHandles

Filter a SubgraphDiscovery channel to only the direct children of a given namespace.

Returns an AsyncIterable whose iterator yields stream handles for discoveries whose namespace is exactly one seg

Function

getConfig

A helper utility function that returns the LangGraphRunnableConfig that was set when the graph was initialized.

Note: This only works when running in an environment that supports node:async_hooks and

Function

getCurrentTaskInput

A helper utility function that returns the input for the currently executing task.

Note: When called without arguments, this relies on node:async_hooks / AsyncLocalStorage, which is available in

Function

getJsonSchemaFromSchema

Get the JSON schema from a SerializableSchema.

Function

getPreviousState

A helper utility function for use with the functional API that returns the previous state from the checkpoint from the last invocation of the current thread.

This function allows workflows to access

Function

getSchemaDefaultGetter

Detect if a schema has a default value by validating undefined.

Uses the Standard Schema ~standard.validate API to detect defaults. If the schema accepts undefined and returns a value, that val

Function

getStore

A helper utility function that returns the BaseStore that was set when the graph was initialized

Function

getSubgraphsSeenSet

Used for subgraph detection.

Function

getWriter

A helper utility function that returns the LangGraphRunnableConfig#writer if "custom" stream mode is enabled, otherwise undefined.

Function

interrupt

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 inte

Function

isCheckpointEnvelope

True when payload is a lightweight checkpoint envelope (not a full-state Pregel checkpoints debug payload).

Function

isCommand

A type guard to check if the given value is a Command.

Useful for type narrowing when working with the Command object.

Function

isGraphBubbleUp

Function

isGraphDrained

Function

isGraphInterrupt

Function

isInterrupted

Checks if the given graph invoke / stream chunk contains interrupt.

Function

isNativeTransformer

Type guard that tests whether a transformer is a NativeStreamTransformer.

Function

isNodeError

Type guard that checks whether a value is a NodeError.

Function

isNodeTimeoutError

Function

isParentCommand

Function

isSerializableSchema

Type guard to check if a given value is a SerializableSchema, i.e. both a Standard Schema and a Standard JSON Schema object.

Function

isStandardSchema

Type guard to check if a given value is a Standard Schema V1 object.

Function

messagesDeltaReducer

Experimental. Batch reducer for use with DeltaChannel.

Processes all writes in one pass — dedup by ID and RemoveMessage tombstoning — without calling messagesStateReducer.

This reducer is ba

Function

messagesStateReducer

Reducer function for combining two sets of messages in LangGraph's state system.

This reducer handles several tasks:

  1. Normalizes both left and right message inputs to arrays.
  2. Coerces any mes
Function

pushMessage

Manually push a message to a message stream.

This is useful when you need to push a manually created message before the node has finished executing.

When a message is pushed, it will be automaticall

Function

task

Define a LangGraph task using the task function.

Tasks can only be called from within an entrypoint or from within a StateGraph. A task can be called like a regular function with the following diff

Function

writer

Function

createFunctionCallingExecutor

deprecated
Function

createReactAgent

deprecated
Function

withAgentName

deprecated

Attach formatted agent names to the messages passed to and from a language model.

This is useful for making a message history with multiple agents more coherent.

Exports

Interfaces

Types

Module

channels

Module

index

Module

prebuilt

Module

pregel

Module

remote

Module

stream

Module

web

Interface

AnyValue

Stores the last value received, assumes that if multiple values are received, they are all equal.

Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values will be

Interface

DynamicBarrierValue

A channel that switches between two states

  • in the "priming" state it can't be read from.
    • if it receives a WaitForNames update, it switches to the "waiting" state.
  • in the "waiting" state it
Interface

EphemeralValue

Stores the value received in the step immediately preceding, clears after.

Interface

NamedBarrierValue

A channel that waits until all named values are received before making the value available.

This ensures that if node N and node M both write to channel C, the value of C will not be updated until N

Interface

Topic

A configurable PubSub Topic.

Interface

WaitForNames

Interface

SchemaMeta

Interface

AnnotationRoot

Should not be instantiated directly. See Annotation.

Interface

AnyValue

Stores the last value received, assumes that if multiple values are received, they are all equal.

Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values will be

Interface

Checkpoint

Interface

CheckpointTuple

Interface

CompiledGraph

The Pregel class is the core runtime engine of LangGraph, implementing a message-passing graph computation model inspired by [Google's Pregel system](https://research.google/pubs/pregel-a-system-for-l

Interface

ConditionalEdgeRouterTypes

Type bag for ConditionalEdgeRouter that accepts schema types. Unlike GraphNodeTypes, conditional edges don't have separate input/output - they just read state and return routing decisions.

Interface

ConvertToProtocolEventOptions

Interface

CreateGraphRunStreamOptions

Options accepted by createGraphRunStream.

Interface

DynamicBarrierValue

A channel that switches between two states

  • in the "priming" state it can't be read from.
    • if it receives a WaitForNames update, it switches to the "waiting" state.
  • in the "waiting" state it
Interface

EphemeralValue

Stores the value received in the step immediately preceding, clears after.

Interface

ExecutionInfo

Read-only execution info/metadata for the execution of current thread/run/node.

Interface

GetOperation

Operation to retrieve an item by namespace and ID.

Interface

GraphInterruptEvent

The root graph paused. Static interrupts can have an empty payload list.

Interface

GraphNodeTypes

Type bag for GraphNode that accepts schema types. All fields are optional - unspecified fields use defaults.

This enables separate input/output schemas for nodes, which is useful when a node receives

Interface

GraphResumeEvent

A graph execution resumed from a checkpoint.

Interface

InterruptOptions

Interface

InterruptPayload

Human-in-the-loop interrupt: stable id plus opaque payload for resume UIs.

Interface

Item

Represents a stored item with metadata.

Interface

LangGraphRunnableConfig

Interface

LifecycleEntry

Single lifecycle entry surfaced by the in-process GraphRunStream.lifecycle projection. Combines the CDDL LifecycleData payload with the namespace it applies to so consumers can filter or correlate w

Interface

LifecycleProjection

Projection returned from the lifecycle transformer's init().

The local StreamChannel is closed automatically when the transformer finalizes or fails. _lifecycleLog is intentionally underscore-p

Interface

LifecycleTransformerOptions

Configuration knobs for createLifecycleTransformer.

Interface

ListNamespacesOperation

Operation to list and filter namespaces in the store.

Interface

MatchCondition

Interface

NamedBarrierValue

A channel that waits until all named values are received before making the value available.

This ensures that if node N and node M both write to channel C, the value of C will not be updated until N

Interface

NativeStreamTransformer

Marker interface for transformers provided by internal LangChain products (e.g. ReactAgent's ToolCallTransformer, DeepAgent's SubagentTransformer).

Native transformers differ from user-defined extens

Interface

OverwriteValue

An object representing a direct overwrite of a value for a channel. Used to signal that the channel value should be replaced with the given value, bypassing any reducer or binary operator logic.

Interface

PregelNode

Interface

PregelOptions

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

Interface

ProtocolEvent

Single envelope for a streaming protocol emission: sequence, channel (method), and payload (params).

Interface

PutOperation

Operation to store, update, or delete an item.

Interface

Runtime

Interface

SearchOperation

Operation to search for items within a namespace prefix.

Interface

ServerInfo

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

Interface

StateDefinition

Interface

StateGraphArgs

Interface

StateSnapshot

Interface

StreamEmitter

Narrow capability handle passed to StreamTransformer.onRegister. Exposes only the minimal mux surface required for synthetic event emission — intentionally does not expose close/fail/register/etc. to

Interface

StreamTransformer

Observes ProtocolEvents during a graph run and builds typed derived projections (secondary event logs, promises, etc.).

Data is surfaced to consumers through projections returned from init().

Interface

SubgraphDiscoveryProjection

Projection returned by createSubgraphDiscoveryTransformer.

Interface

SubgraphDiscoveryTransformerOptions

Configuration for createSubgraphDiscoveryTransformer.

Interface

TaskOptions

Options for the task function

Interface

ToolCallStream

Stable handle for one tool call: name, arguments, and async results.

Emitted when content-block-finish delivers a finalized tool_call block.

Interface

Topic

A configurable PubSub Topic.

Interface

UntrackedValueInit

Initialization options for UntrackedValue.

Interface

WaitForNames

Interface

ActionRequest

Represents a request for human action within the graph execution. Contains the action type and any associated arguments needed for the action.

Interface

HumanInterrupt

Represents an interrupt triggered by the graph that requires human intervention. This is passed to the interrupt function when execution is paused for human input.

Interface

HumanInterruptConfig

Configuration interface that defines what actions are allowed for a human interrupt. This controls the available interaction options when the graph is paused for human input.

Interface

ToolInvocationInterface

Interface for invoking a tool

Interface

PregelOptions

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

Interface

MatchableEvent

Minimal protocol-event shape consumed by inferChannel and matchesSubscription.

Both the core ProtocolEvent and the wire-level Event from @langchain/protocol structurally satisfy this contract, so

Interface

ConvertToProtocolEventOptions

Interface

ProtocolEvent

Single envelope for a streaming protocol emission: sequence, channel (method), and payload (params).

Interface

AnnotationRoot

Should not be instantiated directly. See Annotation.

Interface

AnyValue

Stores the last value received, assumes that if multiple values are received, they are all equal.

Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values will be

Interface

Checkpoint

Interface

CheckpointTuple

Interface

CompiledGraph

The Pregel class is the core runtime engine of LangGraph, implementing a message-passing graph computation model inspired by [Google's Pregel system](https://research.google/pubs/pregel-a-system-for-l

Interface

ConditionalEdgeRouterTypes

Type bag for ConditionalEdgeRouter that accepts schema types. Unlike GraphNodeTypes, conditional edges don't have separate input/output - they just read state and return routing decisions.

Interface

ConvertToProtocolEventOptions

Interface

CreateGraphRunStreamOptions

Options accepted by createGraphRunStream.

Interface

DynamicBarrierValue

A channel that switches between two states

  • in the "priming" state it can't be read from.
    • if it receives a WaitForNames update, it switches to the "waiting" state.
  • in the "waiting" state it
Interface

EphemeralValue

Stores the value received in the step immediately preceding, clears after.

Interface

ExecutionInfo

Read-only execution info/metadata for the execution of current thread/run/node.

Interface

GetOperation

Operation to retrieve an item by namespace and ID.

Interface

GraphInterruptEvent

The root graph paused. Static interrupts can have an empty payload list.

Interface

GraphNodeTypes

Type bag for GraphNode that accepts schema types. All fields are optional - unspecified fields use defaults.

This enables separate input/output schemas for nodes, which is useful when a node receives

Interface

GraphResumeEvent

A graph execution resumed from a checkpoint.

Interface

InterruptOptions

Interface

InterruptPayload

Human-in-the-loop interrupt: stable id plus opaque payload for resume UIs.

Interface

Item

Represents a stored item with metadata.

Interface

LangGraphRunnableConfig

Interface

LifecycleData

Interface

LifecycleEntry

Single lifecycle entry surfaced by the in-process GraphRunStream.lifecycle projection. Combines the CDDL LifecycleData payload with the namespace it applies to so consumers can filter or correlate w

Interface

LifecycleProjection

Projection returned from the lifecycle transformer's init().

The local StreamChannel is closed automatically when the transformer finalizes or fails. _lifecycleLog is intentionally underscore-p

Interface

LifecycleTransformerOptions

Configuration knobs for createLifecycleTransformer.

Interface

ListNamespacesOperation

Operation to list and filter namespaces in the store.

Interface

MatchCondition

Interface

NamedBarrierValue

A channel that waits until all named values are received before making the value available.

This ensures that if node N and node M both write to channel C, the value of C will not be updated until N

Interface

NativeStreamTransformer

Marker interface for transformers provided by internal LangChain products (e.g. ReactAgent's ToolCallTransformer, DeepAgent's SubagentTransformer).

Native transformers differ from user-defined extens

Interface

OverwriteValue

An object representing a direct overwrite of a value for a channel. Used to signal that the channel value should be replaced with the given value, bypassing any reducer or binary operator logic.

Interface

PregelNode

Interface

PregelOptions

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

Interface

ProtocolEvent

Single envelope for a streaming protocol emission: sequence, channel (method), and payload (params).

Interface

PutOperation

Operation to store, update, or delete an item.

Interface

Runtime

Interface

SearchOperation

Operation to search for items within a namespace prefix.

Interface

ServerInfo

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

Interface

StateDefinition

Interface

StateGraphArgs

Interface

StateSnapshot

Interface

StreamEmitter

Narrow capability handle passed to StreamTransformer.onRegister. Exposes only the minimal mux surface required for synthetic event emission — intentionally does not expose close/fail/register/etc. to

Interface

StreamTransformer

Observes ProtocolEvents during a graph run and builds typed derived projections (secondary event logs, promises, etc.).

Data is surfaced to consumers through projections returned from init().

Interface

SubgraphDiscoveryProjection

Projection returned by createSubgraphDiscoveryTransformer.

Interface

SubgraphDiscoveryTransformerOptions

Configuration for createSubgraphDiscoveryTransformer.

Interface

TaskOptions

Options for the task function

Interface

ToolCallStream

Stable handle for one tool call: name, arguments, and async results.

Emitted when content-block-finish delivers a finalized tool_call block.

Interface

Topic

A configurable PubSub Topic.

Interface

UntrackedValueInit

Initialization options for UntrackedValue.

Interface

WaitForNames

Interface

AgentState

deprecated
Interface

ToolExecutorArgs

deprecated
Type

BinaryOperator

Type

DeltaReducer

A batch reducer for use with DeltaChannel.

Receives the current accumulated value and a batch of writes in one call, returning the new accumulated value: `reducer(state, [write1, write2, ...]) -> new

Type

UpdateType

Type

AddNodeOptions

Type

AnyStateSchema

Type

BaseLangGraphErrorFields

Type

BinaryOperator

Type

CachePolicy

Configuration for caching nodes.

Type

ChatModelStream

Type

CheckpointMetadata

Additional details about the checkpoint, including the source, step, writes, and parents.

Type

CommandParams

Type

CompiledGraphType

Convenience type for referencing a compiled graph by named type slots.

Type

ConditionalEdgeRouter

Type for conditional edge routing functions.

Use this to type functions passed to addConditionalEdges for full type safety on state, runtime context, and return values.

Supports two patterns:

Type

DeltaReducer

A batch reducer for use with DeltaChannel.

Receives the current accumulated value and a batch of writes in one call, returning the new accumulated value: `reducer(state, [write1, write2, ...]) -> new

Type

DeltaValueInit

Initialization options for DeltaValue.

Two forms are supported:

  1. Provide only a reducer (and optionally snapshotFrequency / jsonSchemaExtra) — the reducer's inputs are validated using the va
Type

EntrypointOptions

Options for the entrypoint function

Type

ExtractStateType

Extract the State type from any supported schema type.

Supports:

  • StateSchema
  • AnnotationRoot
  • StateDefinition (internal channel definitions)
  • InteropZodObject (Zod v3/v4 object schemas)
Type

ExtractUpdateType

Extract the Update type from any supported schema type.

The Update type represents what a node can return to update the state. All fields are optional since nodes only need to return the fields they

Type

GetStateOptions

Options for getting the state of the graph.

Type

GraphLifecycleEvent

Type

GraphLifecycleStatus

Loop status at a graph lifecycle transition.

Type

GraphNode

Strongly-typed utility for authoring graph nodes outside of the StateGraph builder, supporting inference for both state (from Schema) and config context (from Context type).

This type enables you to

Type

GraphNodeReturnValue

Return value type for GraphNode functions. Nodes can return an update object, a Command, or a Promise of either.

Type

InferExtensions

Infers the merged extensions type from a tuple of transformer factory functions.

Given [() => StreamTransformer<{ a: number }>, () => StreamTransformer<{ b: string }>], produces `{ a: number } & {

Type

InferInterruptInputType

Type

InferInterruptResumeType

Type

InferStateSchemaUpdate

Infer the Update type from a StateSchemaFields. This is the type for partial updates to state.

  • ReducedValue<Value, Input> → Input (the reducer input type)
  • UntrackedValue → Value
  • Serializ
Type

InferStateSchemaValue

Infer the State type from a StateSchemaFields. This is the type of the full state object.

  • ReducedValue<Value, Input> → Value (the stored type)
  • UntrackedValue → Value
  • SerializableSchema<I
Type

InferWriterType

Type

Interrupt

Type

Messages

Type that represents an acceptable input for the messages state reducer.

  • Can be a single BaseMessage or BaseMessageLike.
  • Can be an array of BaseMessage or BaseMessageLike.
Type

MultipleChannelSubscriptionOptions

Options for subscribing to multiple channels.

Type

Namespace

Hierarchical path identifying a position in the agent tree.

Each element is one segment; longer arrays mean deeper nesting (e.g. subgraph or multi-agent scopes).

Type

NamespaceMatchType

Type

NameSpacePath

Type

NodePolicyOptions

Retry and cache policies configurable on graph nodes.

Use with StateGraph.addNode for per-node overrides, or with StateGraph.setNodeDefaults for graph-wide defaults applied at compile() time. Per-n

Type

NodeSpec

Type

NodeType

Type

Operation

Type

OperationResults

Type

ReducedValueInit

Initialization options for ReducedValue.

Two forms are supported:

  1. Provide only a reducer (and optionally jsonSchemaExtra)—in this case, the reducer's inputs are validated using the output value
Type

RetryPolicy

Type

SendOptions

Keyword options for Send.

Type

SingleChannelSubscriptionOptions

Options for subscribing to a single channel.

Type

SingleReducer

Type

StateGraphAddNodeOptions

Options for StateGraph.addNode() method.

Type

StateGraphArgsWithInputOutputSchemas

Type

StateGraphArgsWithStateSchema

Type

StateGraphInit

Initialization options for StateGraph. Accepts any combination of schema types for state/input/output.

Supports both state and stateSchema as aliases for backward compatibility. If only input i

Type

StateGraphNodeSpec

Type

StateSchemaField

Valid field types for StateSchema. Either a LangGraph state value type or a raw schema (e.g., Zod schema).

Type

StateSchemaFields

Init object for StateSchema constructor. Uses any to allow variance in generic types (e.g., ReducedValue<string, string[]>).

Type

StateSchemaFieldsToStateDefinition

Converts StateSchema fields into a strongly-typed State Definition object, where each field is mapped to its channel type.

This utility type is used internally to create the shape of the state channe

Type

StateSchemaFieldToChannel

Maps a single StateSchema field definition to its corresponding Channel type.

This utility type inspects the type of the field and returns an appropriate BaseChannel type, parameterized with the st

Type

StateType

Type

StreamMode

Selects the type of output you'll receive when streaming from the graph. See Streaming for more details.

Type

StreamOutputMap

Type

TimeoutPolicy

Configuration for timing out node attempts.

A timeout applies to a single attempt of a node/task. When a node has a RetryPolicy, the timer resets for each retry attempt.

Timeouts are expressed in **

Type

ToolCallStatus

High-level outcome of a single tool call for UI or aggregators.

Type

UpdateType

Type

AgentNameMode

Type

HumanResponse

The response provided by a human to an interrupt, which is returned when graph execution resumes.

Type

ToolNodeOptions

Type

PregelInputType

Type

PregelOutputType

Type

RemoteGraphParams

Type

ProtocolMethod

Channels that can appear on a protocol event. Beyond the raw StreamMode channels emitted by the Pregel stream, the v2 protocol layer synthesizes additional channels (e.g. lifecycle, input) via bu

Type

Namespace

Hierarchical path identifying a position in the agent tree.

Each element is one segment; longer arrays mean deeper nesting (e.g. subgraph or multi-agent scopes).

Type

AddNodeOptions

Type

AgentStatus

Type

AnyStateSchema

Type

BaseLangGraphErrorFields

Type

BinaryOperator

Type

CachePolicy

Configuration for caching nodes.

Type

ChatModelStream

Type

CheckpointMetadata

Additional details about the checkpoint, including the source, step, writes, and parents.

Type

CommandParams

Type

CompiledGraphType

Convenience type for referencing a compiled graph by named type slots.

Type

ConditionalEdgeRouter

Type for conditional edge routing functions.

Use this to type functions passed to addConditionalEdges for full type safety on state, runtime context, and return values.

Supports two patterns:

Type

DeltaReducer

A batch reducer for use with DeltaChannel.

Receives the current accumulated value and a batch of writes in one call, returning the new accumulated value: `reducer(state, [write1, write2, ...]) -> new

Type

DeltaValueInit

Initialization options for DeltaValue.

Two forms are supported:

  1. Provide only a reducer (and optionally snapshotFrequency / jsonSchemaExtra) — the reducer's inputs are validated using the va
Type

EntrypointOptions

Options for the entrypoint function

Type

ExtractStateType

Extract the State type from any supported schema type.

Supports:

  • StateSchema
  • AnnotationRoot
  • StateDefinition (internal channel definitions)
  • InteropZodObject (Zod v3/v4 object schemas)
Type

ExtractUpdateType

Extract the Update type from any supported schema type.

The Update type represents what a node can return to update the state. All fields are optional since nodes only need to return the fields they

Type

GetStateOptions

Options for getting the state of the graph.

Type

GraphLifecycleEvent

Type

GraphLifecycleStatus

Loop status at a graph lifecycle transition.

Type

GraphNode

Strongly-typed utility for authoring graph nodes outside of the StateGraph builder, supporting inference for both state (from Schema) and config context (from Context type).

This type enables you to

Type

GraphNodeReturnValue

Return value type for GraphNode functions. Nodes can return an update object, a Command, or a Promise of either.

Type

InferExtensions

Infers the merged extensions type from a tuple of transformer factory functions.

Given [() => StreamTransformer<{ a: number }>, () => StreamTransformer<{ b: string }>], produces `{ a: number } & {

Type

InferInterruptInputType

Type

InferInterruptResumeType

Type

InferStateSchemaUpdate

Infer the Update type from a StateSchemaFields. This is the type for partial updates to state.

  • ReducedValue<Value, Input> → Input (the reducer input type)
  • UntrackedValue → Value
  • Serializ
Type

InferStateSchemaValue

Infer the State type from a StateSchemaFields. This is the type of the full state object.

  • ReducedValue<Value, Input> → Value (the stored type)
  • UntrackedValue → Value
  • SerializableSchema<I
Type

InferWriterType

Type

Interrupt

Type

LifecycleCause

Type

Messages

Type that represents an acceptable input for the messages state reducer.

  • Can be a single BaseMessage or BaseMessageLike.
  • Can be an array of BaseMessage or BaseMessageLike.
Type

MessagesEventData

Type

MultipleChannelSubscriptionOptions

Options for subscribing to multiple channels.

Type

Namespace

Hierarchical path identifying a position in the agent tree.

Each element is one segment; longer arrays mean deeper nesting (e.g. subgraph or multi-agent scopes).

Type

NamespaceMatchType

Type

NameSpacePath

Type

NodePolicyOptions

Retry and cache policies configurable on graph nodes.

Use with StateGraph.addNode for per-node overrides, or with StateGraph.setNodeDefaults for graph-wide defaults applied at compile() time. Per-n

Type

NodeSpec

Type

NodeType

Type

Operation

Type

OperationResults

Type

ReducedValueInit

Initialization options for ReducedValue.

Two forms are supported:

  1. Provide only a reducer (and optionally jsonSchemaExtra)—in this case, the reducer's inputs are validated using the output value
Type

RetryPolicy

Type

SendOptions

Keyword options for Send.

Type

SingleChannelSubscriptionOptions

Options for subscribing to a single channel.

Type

SingleReducer

Type

StateGraphAddNodeOptions

Options for StateGraph.addNode() method.

Type

StateGraphArgsWithInputOutputSchemas

Type

StateGraphArgsWithStateSchema

Type

StateGraphInit

Initialization options for StateGraph. Accepts any combination of schema types for state/input/output.

Supports both state and stateSchema as aliases for backward compatibility. If only input i

Type

StateGraphNodeSpec

Type

StateSchemaField

Valid field types for StateSchema. Either a LangGraph state value type or a raw schema (e.g., Zod schema).

Type

StateSchemaFields

Init object for StateSchema constructor. Uses any to allow variance in generic types (e.g., ReducedValue<string, string[]>).

Type

StateSchemaFieldsToStateDefinition

Converts StateSchema fields into a strongly-typed State Definition object, where each field is mapped to its channel type.

This utility type is used internally to create the shape of the state channe

Type

StateSchemaFieldToChannel

Maps a single StateSchema field definition to its corresponding Channel type.

This utility type inspects the type of the field and returns an appropriate BaseChannel type, parameterized with the st

Type

StateType

Type

StreamMode

Selects the type of output you'll receive when streaming from the graph. See Streaming for more details.

Type

StreamOutputMap

Type

TimeoutPolicy

Configuration for timing out node attempts.

A timeout applies to a single attempt of a node/task. When a node has a RetryPolicy, the timer resets for each retry attempt.

Timeouts are expressed in **

Type

ToolCallStatus

High-level outcome of a single tool call for UI or aggregators.

Type

ToolsEventData

Type

UpdatesEventData

Type

UpdateType

Type

UsageInfo

Type

CreateReactAgentParams

deprecated
Type

FunctionCallingExecutorState

deprecated