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
  • Stream
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 UiUtilsServerStream
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/langgraph-sdk

@langchain/langgraph-sdk

Description

@langchain/langgraph-sdk

The JavaScript / TypeScript SDK for talking to a LangGraph API server. Use it to create and manage assistants, threads, runs, cron schedules, and the KV store — and, most importantly, to stream graph executions in real time.

📚 Full documentation

Install

pnpm add @langchain/langgraph-sdk
# or: npm install @langchain/langgraph-sdk
# or: yarn add @langchain/langgraph-sdk

Quick start

import { Client } from "@langchain/langgraph-sdk";

const client = new Client({ apiUrl: "http://localhost:2024" });

// Open a thread-centric stream (the recommended way to stream).
const thread = client.threads.stream({ assistantId: "my-agent" });

await thread.run.start({
  input: { messages: [{ role: "user", content: "hello" }] },
});

for await (const message of thread.messages) {
  for await (const token of message.text) {
    process.stdout.write(token);
  }
}

console.log(await thread.output);
await thread.close();

With no apiUrl, the SDK points at http://localhost:2024 (the default langgraph dev URL).

What's in the SDK

Sub-client Purpose Docs
client.threads Create threads, manage state, and stream runs. Threads · Streaming
client.assistants CRUD for assistants (schemas, graphs, versions). Assistants
client.runs Trigger / join / cancel runs without streaming. Runs (legacy)
client.crons Schedule recurring runs. Crons
client.store Namespaced KV + semantic store. Store

Streaming

client.threads.stream(...) returns a ThreadStream with typed, lazy projections for every aspect of a run:

  • thread.messages / thread.toolCalls — assembled chat output.
  • thread.values / thread.output — graph state and final answer.
  • thread.interrupts / thread.interrupted — human-in-the-loop.
  • thread.subgraphs / thread.subagents — nested / deep-agent work.
  • thread.extensions.<name> — typed custom server projections.
  • thread.audio / thread.images / thread.video / thread.files — media.

Deprecated. The generator-based streaming APIs on client.runs.* (stream, joinStream) and client.threads.joinStream are preserved for backwards compatibility only. New code should use client.threads.stream(...). See Runs (legacy) for migration guidance.

Transports

Streaming defaults to Server-Sent Events (SSE) over HTTP. You can switch to WebSocket per-call or globally, or plug in a custom AgentServerAdapter:

const thread = client.threads.stream({
  assistantId: "my-agent",
  transport: "websocket",
});

See Transports for full details.

Framework adapters

If you're building a UI, use the framework-specific packages that wrap this SDK:

  • @langchain/langgraph-sdk/react
  • @langchain/langgraph-sdk/vue
  • @langchain/langgraph-sdk/svelte
  • @langchain/langgraph-sdk/angular

Use the SDK directly when you need low-level control, run it from a non-browser environment (Node.js server, edge workers, scripts), or integrate into a framework that does not yet have a first-party adapter.

Architecture

The client code is organized into sub-client modules under src/client/:

Path Module
client/assistants/ AssistantsClient
client/threads/ ThreadsClient (includes the v2 stream(...) primitive)
client/runs/ RunsClient (legacy streaming + CRUD)
client/crons/ CronsClient
client/store/ StoreClient
client/stream/ ThreadStream, assemblers, transports
client/base.ts BaseClient, shared config & helpers
client/index.ts Main Client class & re-exports

Change log

See CHANGELOG.md.

Classes

Class

Auth

Class

HTTPException

Class

AssistantsClient

Class

BaseClient

Class

CronsClient

Class

RunsClient

Class

StoreClient

Class

ThreadsClient

Class

Client

Class

HttpAgentServerAdapter

Public v1 name for TransportAdapter plus optional high-level

Class

MediaAssembler

Class

MediaAssemblyError

Typed error thrown through media.stream / rejected from

Class

MessageAssembler

Incrementally assembles messages events into complete message objects.

Class

ProtocolError

Error wrapper for protocol-level error responses returned by the server.

Class

ProtocolSseTransportAdapter

Transport adapter that speaks the thread-centric protocol over HTTP

Class

ProtocolWebSocketTransportAdapter

Transport adapter that speaks the thread-centric protocol over a

Class

SubscriptionHandle

Async iterable handle for raw event subscriptions.

Class

ThreadStream

High-level wrapper around a protocol connection to a specific thread.

Class

Client

Class

HttpAgentServerAdapter

Public v1 name for TransportAdapter plus optional high-level

Class

MediaAssembler

Class

MediaAssemblyError

Typed error thrown through media.stream / rejected from

Class

MessageAssembler

Incrementally assembles messages events into complete message objects.

Class

ProtocolError

Error wrapper for protocol-level error responses returned by the server.

Class

ProtocolSseTransportAdapter

Transport adapter that speaks the thread-centric protocol over HTTP

Class

ProtocolWebSocketTransportAdapter

Transport adapter that speaks the thread-centric protocol over a

Class

StreamError

Class

SubscriptionHandle

Async iterable handle for raw event subscriptions.

Class

ThreadStream

High-level wrapper around a protocol connection to a specific thread.

Class

FetchStreamTransport

Transport used to stream the thread.

Class

SubagentManager

Manages subagent execution state.

Class

ChannelRegistry

Ref-counted, thread-aware projection registry.

Class

StreamController

Coordinates one thread's protocol-v2 stream and exposes stable

Class

StreamStore

Class

SubagentDiscovery

Class

SubgraphDiscovery

Class

MediaAssembler

Class

MediaAssemblyError

Typed error thrown through media.stream / rejected from

Class

CustomStreamOrchestrator

Framework-agnostic orchestrator for custom transport streams.

Class

FetchStreamTransport

Transport used to stream the thread.

Class

MessageTupleManager

Class

PendingRunsTracker

Tracks pending server-side runs created via multitaskStrategy: "enqueue".

Class

StreamManager

Class

StreamOrchestrator

Framework-agnostic orchestrator for LangGraph Platform streams.

Class

SubagentManager

Manages subagent execution state.

Class

StreamError

Class

IterableReadableStream

Functions

Function

isStudioUser

Check if the provided user was provided by LangGraph Studio.

Function

inferChannel

Maps a protocol event method to its subscription channel.

Function

matchesSubscription

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

Function

getApiKey

Get the API key from the environment.

Function

executeHeadlessTool

Function

filterOutHeadlessToolInterrupts

Strip headless-tool interrupts from a user-facing interrupt list.

Function

findHeadlessTool

Function

flushPendingHeadlessToolInterrupts

Execute and resume all newly seen headless-tool interrupts from a values

Function

getApiKey

Get the API key from the environment.

Function

handleHeadlessToolInterrupt

Function

headlessToolResumeCommand

Function

isHeadlessToolInterrupt

Function

overrideFetchImplementation

Overrides the fetch implementation used for LangSmith calls.

Function

parseHeadlessToolInterruptPayload

Parses a headless-tool interrupt value from the graph. Accepts both

Function

getLogger

Retrieves the global logger instance for LangGraph Platform.

Function

useStream

Function

calculateDepthFromNamespace

Calculates the depth of a subagent based on its namespace.

Function

executeHeadlessTool

Function

extractParentIdFromNamespace

Extracts the parent tool call ID from a namespace.

Function

extractToolCallIdFromNamespace

Extracts the tool call ID from a namespace path.

Function

filterOutHeadlessToolInterrupts

Strip headless-tool interrupts from a user-facing interrupt list.

Function

findHeadlessTool

Function

flushPendingHeadlessToolInterrupts

Execute and resume all newly seen headless-tool interrupts from a values

Function

handleHeadlessToolInterrupt

Function

headlessToolResumeCommand

Function

isHeadlessToolInterrupt

Function

isSubagentNamespace

Checks if a namespace indicates a subagent/subgraph message.

Function

parseHeadlessToolInterruptPayload

Parses a headless-tool interrupt value from the graph. Accepts both

Function

experimental_loadShare

Function

isRemoveUIMessage

Function

isUIMessage

Function

LoadExternalComponent

Function

uiMessageReducer

Function

useStreamContext

Function

typedUi

Helper to send and persist UI messages. Accepts a map of component names to React components

Function

uiMessageReducer

Function

assembledMessageToBaseMessage

Convenience: given the raw assembled message + the role captured

Function

assembledToBaseMessage

Produce a BaseMessage class instance from an in-progress or

Function

audioProjection

Function

channelProjection

Function

extensionProjection

Function

filesProjection

Function

imagesProjection

Function

messagesProjection

Function

toolCallsProjection

Function

valuesProjection

Function

videoProjection

Function

calculateDepthFromNamespace

Calculates the depth of a subagent based on its namespace.

Function

ensureHistoryMessageInstances

Converts plain message objects within each history state's values

Function

ensureMessageInstances

Ensures all messages in an array are BaseMessage class instances.

Function

extractInterrupts

Function

extractParentIdFromNamespace

Extracts the parent tool call ID from a namespace.

Function

extractToolCallIdFromNamespace

Extracts the tool call ID from a namespace path.

Function

filterStream

Function

findLast

Function

getBranchContext

Function

getMessagesMetadataMap

Function

isSubagentNamespace

Checks if a namespace indicates a subagent/subgraph message.

Function

normalizeHitlInterruptPayload

If value looks like a HITL request object, expose both the new camelCase

Function

normalizeInterruptForClient

Normalizes HITL interrupt payloads to expose camelCase fields plus deprecated

Function

normalizeInterruptsList

Applies normalizeInterruptForClient to each interrupt.

Function

onFinishRequiresThreadState

Returns true when onFinish declares at least one parameter and therefore

Function

toMessageClass

Identity converter that keeps @langchain/core class instances.

Function

toMessageDict

Function

unique

Function

userFacingInterruptsFromThreadTasks

Function

userFacingInterruptsFromValuesArray

Function

BytesLineDecoder

Function

getToolCallsWithResults

Function

SSEDecoder

Exports

Interfaces

Types

Module

auth

Module

client

Module

index

Module

logging

Module

react

Module

react-ui

Module

react-ui/server

Module

stream

Module

ui

Module

utils

Interface

AuthEventValueMap

Interface

InputModule

Interface

StateModule

Interface

ThreadModules

Modules exposed by the high-level ThreadStream wrapper.

Interface

AgentServerAdapter

Public v1 name for TransportAdapter plus optional high-level

Interface

AssembledMessage

Mutable view of a streamed message as message and content-block events are

Interface

AudioMedia

Shared surface across every media handle returned by

Interface

ClientConfig

Interface

EventSubscription

Interface

FileMedia

Shared surface across every media handle returned by

Interface

HttpAgentServerAdapterOptions

Interface

ImageMedia

Shared surface across every media handle returned by

Interface

MediaAssemblerCallbacks

Dispatch callbacks receive a freshly-started handle on its first

Interface

MediaAssemblerOptions

Dispatch callbacks receive a freshly-started handle on its first

Interface

MediaBase

Shared surface across every media handle returned by

Interface

MessageSubscription

Interface

ProtocolSseTransportOptions

Interface

ProtocolTransportPaths

Interface

ProtocolWebSocketTransportOptions

Interface

SessionOrderingState

Interface

ThreadExtension

Remote counterpart of an in-process run.extensions.<name> projection.

Interface

ThreadStreamOptions

Options for ThreadStream construction.

Interface

TransportAdapter

Transport abstraction implemented by concrete client transports such as

Interface

VideoMedia

Shared surface across every media handle returned by

Interface

AgentServerAdapter

Public v1 name for TransportAdapter plus optional high-level

Interface

AssembledMessage

Mutable view of a streamed message as message and content-block events are

Interface

Assistant

Interface

AssistantBase

Interface

AssistantGraph

Interface

AssistantsSearchResponse

Interface

AssistantVersion

Interface

AudioMedia

Shared surface across every media handle returned by

Interface

BaseStream

Base stream interface shared by all stream types.

Interface

ClientConfig

Interface

Command

Interface

Cron

Interface

CronCreateForThreadResponse

Interface

CronCreateResponse

Interface

EventSubscription

Interface

FileMedia

Shared surface across every media handle returned by

Interface

FlushPendingHeadlessToolInterruptsOptions

Interface

GraphSchema

Interface

HeadlessToolImplementation

Client-side implementation returned by headlessTool.implement(...).

Interface

HeadlessToolInterrupt

Represents a headless tool interrupt payload emitted by LangChain's

Interface

HttpAgentServerAdapterOptions

Interface

ImageMedia

Shared surface across every media handle returned by

Interface

Interrupt

An interrupt thrown inside a thread.

Interface

Item

Interface

ListNamespaceResponse

Interface

MediaAssemblerCallbacks

Dispatch callbacks receive a freshly-started handle on its first

Interface

MediaAssemblerOptions

Dispatch callbacks receive a freshly-started handle on its first

Interface

MediaBase

Shared surface across every media handle returned by

Interface

MessageSubscription

Interface

ProtocolSseTransportOptions

Interface

ProtocolTransportPaths

Interface

ProtocolWebSocketTransportOptions

Interface

Run

Interface

RunsInvokePayload

Interface

SearchItem

Interface

SearchItemsResponse

Interface

SessionOrderingState

Interface

Thread

Interface

ThreadExtension

Remote counterpart of an in-process run.extensions.<name> projection.

Interface

ThreadState

Interface

ThreadStreamOptions

Options for ThreadStream construction.

Interface

ThreadTask

Interface

ToolEvent

Interface

TransportAdapter

Transport abstraction implemented by concrete client transports such as

Interface

UseAgentStream

Stream interface for ReactAgent instances created with createAgent.

Interface

UseAgentStreamOptions

Options for configuring an agent stream.

Interface

UseDeepAgentStream

Stream interface for DeepAgent instances created with createDeepAgent.

Interface

UseDeepAgentStreamOptions

Options for configuring a deep agent stream.

Interface

VideoMedia

Shared surface across every media handle returned by

Interface

UseStream

Base interface for stream-like objects.

Interface

AgentTypeConfigLike

Minimal interface matching the structure of AgentTypeConfig from @langchain/langgraph.

Interface

BaseStream

Base stream interface shared by all stream types.

Interface

CompiledSubAgentLike

Minimal interface matching the structure of a CompiledSubAgent from deepagents.

Interface

DeepAgentTypeConfigLike

Minimal interface matching the structure of DeepAgentTypeConfig from deepagents.

Interface

FlushPendingHeadlessToolInterruptsOptions

Interface

HeadlessToolImplementation

Client-side implementation returned by headlessTool.implement(...).

Interface

HeadlessToolInterrupt

Represents a headless tool interrupt payload emitted by LangChain's

Interface

SubAgentLike

Minimal interface matching the structure of a SubAgent from deepagents.

Interface

SubagentStreamInterface

Base interface for a single subagent stream.

Interface

SubagentToolCall

Represents a tool call that initiated a subagent.

Interface

ToolEvent

Interface

UseAgentStream

Stream interface for ReactAgent instances created with createAgent.

Interface

UseAgentStreamOptions

Options for configuring an agent stream.

Interface

UseDeepAgentStream

Stream interface for DeepAgent instances created with createDeepAgent.

Interface

UseDeepAgentStreamOptions

Options for configuring a deep agent stream.

Interface

UseStreamOptions

Interface

UseStreamThread

Interface

UseStreamTransport

Transport used to stream the thread.

Interface

RemoveUIMessage

Interface

UIMessage

Interface

RemoveUIMessage

Interface

UIMessage

Interface

AcquiredProjection

Handle returned by ChannelRegistry.acquire. Framework bindings

Interface

AgentServerOptions

Agent-server branch: caller points useStream at an assistant on a

Interface

AssembledToMessageInput

Interface

AssembledToolCall

Assembled view of a single tool call lifecycle (tool-started →

Interface

ChannelProjectionOptions

Interface

CustomAdapterOptions

Custom-adapter branch: caller brings their own

Interface

MediaProjectionOptions

Interface

MessageMetadata

Metadata tracked per message id. Surfaced to applications via

Interface

ProjectionRuntime

Interface

ProjectionSpec

A projection spec describes a single logical subscription managed

Interface

RootEventBus

Read-only fan-out of the StreamController's always-on root

Interface

RootSnapshot

Always-on root snapshot surfaced by StreamController.rootStore.

Interface

StreamControllerOptions

Interface

StreamSubmitOptions

Interface

SubagentDiscoverySnapshot

Lightweight discovery record for a subagent running inside the thread.

Interface

SubgraphDiscoverySnapshot

Lightweight discovery record for a subgraph running inside the thread.

Interface

SubmissionQueueEntry

Queued submission entry mirrored from the server-side run queue.

Interface

UseStreamCommonOptions

Options common to both transport branches of framework useStream APIs.

Interface

AgentServerAdapter

Public v1 name for TransportAdapter plus optional high-level

Interface

AgentTypeConfigLike

Minimal interface matching the structure of AgentTypeConfig from @langchain/langgraph.

Interface

AudioMedia

Shared surface across every media handle returned by

Interface

CompiledSubAgentLike

Minimal interface matching the structure of a CompiledSubAgent from deepagents.

Interface

DeepAgentTypeConfigLike

Minimal interface matching the structure of DeepAgentTypeConfig from deepagents.

Interface

FileMedia

Shared surface across every media handle returned by

Interface

ImageMedia

Shared surface across every media handle returned by

Interface

MediaAssemblerCallbacks

Dispatch callbacks receive a freshly-started handle on its first

Interface

MediaAssemblerOptions

Dispatch callbacks receive a freshly-started handle on its first

Interface

MediaBase

Shared surface across every media handle returned by

Interface

SubAgentLike

Minimal interface matching the structure of a SubAgent from deepagents.

Interface

SubagentToolCall

Represents a tool call that initiated a subagent.

Interface

TransportAdapter

Transport abstraction implemented by concrete client transports such as

Interface

VideoMedia

Shared surface across every media handle returned by

Interface

AgentMiddlewareLike

Minimal interface to structurally match AgentMiddleware from langchain.

Interface

AgentTypeConfigLike

Minimal interface matching the structure of AgentTypeConfig from @langchain/langgraph.

Interface

CompiledSubAgentLike

Minimal interface matching the structure of a CompiledSubAgent from deepagents.

Interface

DeepAgentTypeConfigLike

Minimal interface matching the structure of DeepAgentTypeConfig from deepagents.

Interface

OrchestratorAccessors

Callbacks for resolving dynamic/reactive option values.

Interface

QueueEntry

A single queued submission entry representing a server-side pending run.

Interface

QueueInterface

Reactive interface exposed to framework consumers for observing

Interface

RunCallbackMeta

Interface

Sequence

Interface

StreamBase

Base interface for stream-like objects.

Interface

SubagentApi

Subagent API surface parameterised by the subagent interface type.

Interface

SubAgentLike

Minimal interface matching the structure of a SubAgent from deepagents.

Interface

SubagentStreamInterface

Base interface for a single subagent stream.

Interface

SubagentToolCall

Represents a tool call that initiated a subagent.

Interface

SubmitOptions

Interface

UseStreamOptions

Interface

UseStreamThread

Interface

UseStreamTransport

Transport used to stream the thread.

Interface

UseStreamTransportPayload

Payload for the stream method of the UseStreamTransport interface.

Interface

BaseStream

Base stream interface shared by all stream types.

Interface

UseAgentStream

Stream interface for ReactAgent instances created with createAgent.

Interface

UseAgentStreamOptions

Options for configuring an agent stream.

Interface

UseDeepAgentStream

Stream interface for DeepAgent instances created with createDeepAgent.

Interface

UseDeepAgentStreamOptions

Options for configuring a deep agent stream.

Type

AuthFilters

Type

EventForChannel

Type

EventForChannels

Type

EventMethodByChannel

Type

HeaderValue

Type

MessageAssemblyUpdate

Emitted by MessageAssembler.consume() to describe how a message changed in

Type

ProtocolHeaderValue

Type

SubscribeOptions

Type

ThreadStreamTransport

Accepted values for ThreadStreamOptions["transport"].

Type

ThreadStreamTransportKind

Built-in wire transport used by ThreadStream.

Type

AnyMediaHandle

Type

MediaAssemblyErrorKind

Kinds of failure that can terminate a media handle prematurely.

Type

MediaBlockType

Block types this assembler knows how to reassemble into media handles.

Type

ProtocolRequestHook

Type

RequestHook

Type

ThreadExtensions

Keyed map of ThreadExtension handles, typed off a declared

Type

UnwrapExtension

Unwrap a single in-process projection value to its observable payload

Type

AIMessage

AI message type that can be parameterized with custom tool call types.

Type

AnyHeadlessToolImplementation

Type

AnyMediaHandle

Type

BagTemplate

Template for the bag type.

Type

Checkpoint

Type

Config

Type

CustomStreamEvent

Streaming custom data from inside the nodes.

Type

DebugStreamEvent

Stream event with detailed debug information.

Type

DefaultToolCall

Default tool call type when no specific tool definitions are provided.

Type

DefaultValues

Type

ErrorStreamEvent

Stream event with error information.

Type

EventsStreamEvent

Stream event with events occurring during execution.

Type

FeedbackStreamEvent

Stream event with a feedback key to signed URL map. Set feedbackKeys in

Type

FunctionMessage

Type

HumanMessage

Type

InferBag

Infer the Bag type from an agent, defaulting to the provided Bag.

Type

InferNodeNames

Infer the node names from a compiled graph.

Type

InferNodeReturnTypes

Infer the per-node return types from a compiled graph.

Type

InferStateType

Infer the state type from an agent, graph, or direct state type.

Type

InferSubagentStates

Infer subagent state map from a DeepAgent.

Type

InferToolCalls

Infer tool call types from an agent.

Type

MediaAssemblyErrorKind

Kinds of failure that can terminate a media handle prematurely.

Type

MediaBlockType

Block types this assembler knows how to reassemble into media handles.

Type

Message

Union of all message types.

Type

MessagesTupleStreamEvent

Stream event with message chunks coming from LLM invocations inside nodes.

Type

Metadata

Type

MetadataStreamEvent

Metadata stream event with information about the run and thread

Type

OnConflictBehavior

Type

OnToolCallback

Type

ProtocolRequestHook

Type

RemoveMessage

Type

RequestHook

Type

ResolveStreamInterface

Resolves the appropriate stream interface based on the agent/graph type.

Type

ResolveStreamOptions

Resolves the appropriate options interface based on the agent/graph type.

Type

StateRecord

Type

StreamEvent

Type

StreamMode

import type { SubgraphCheckpointsStreamEvent } from "./types.stream.subgraph.js";

Type

SystemMessage

Type

ThreadExtensions

Keyed map of ThreadExtension handles, typed off a declared

Type

ThreadStatus

Type

ToolCallFromTool

Infer a tool call type from a single tool.

Type

ToolCallsFromTools

Infer a union of tool call types from an array of tools.

Type

ToolCallState

The lifecycle state of a tool call.

Type

ToolCallWithResult

Represents a tool call paired with its result.

Type

ToolMessage

Type

ToolProgress

Type

ToolsStreamEvent

Type

UnwrapExtension

Unwrap a single in-process projection value to its observable payload

Type

UpdatesStreamEvent

Stream event with updates to the state after each step.

Type

ValuesStreamEvent

Stream event with values after completion of each step.

Type

UseStreamCustom

Type

AnyHeadlessToolImplementation

Type

BaseSubagentState

Base state type for subagents.

Type

DefaultSubagentStates

Default subagent state map used when no specific subagent types are provided.

Type

DefaultToolCall

Default tool call type when no specific tool definitions are provided.

Type

ExtractAgentConfig

Extract the AgentTypeConfig from an agent-like type.

Type

ExtractDeepAgentConfig

Extract the DeepAgentTypeConfig from a DeepAgent-like type.

Type

ExtractSubAgentMiddleware

Helper type to extract middleware from a SubAgent definition.

Type

GetToolCallsType

Extract the tool call type from a StateType's messages property.

Type

InferAgentToolCalls

Extract tool calls type from an agent's tools.

Type

InferBag

Infer the Bag type from an agent, defaulting to the provided Bag.

Type

InferDeepAgentSubagents

Extract the Subagents array type from a DeepAgent.

Type

InferNodeNames

Infer the node names from a compiled graph.

Type

InferStateType

Infer the state type from an agent, graph, or direct state type.

Type

InferSubagentByName

Helper type to extract a subagent by name from a DeepAgent.

Type

InferSubagentNames

Extract all subagent names as a string union from a DeepAgent.

Type

InferSubagentState

Infer the state type for a specific subagent by extracting and merging

Type

InferSubagentStates

Infer subagent state map from a DeepAgent.

Type

InferToolCalls

Infer tool call types from an agent.

Type

IsAgentLike

Check if a type is agent-like (has ~agentTypes phantom property).

Type

IsDeepAgentLike

Check if a type is a DeepAgent (has ~deepAgentTypes phantom property).

Type

MessageMetadata

Type

OnToolCallback

Type

ResolveStreamInterface

Resolves the appropriate stream interface based on the agent/graph type.

Type

ResolveStreamOptions

Resolves the appropriate options interface based on the agent/graph type.

Type

SubagentStateMap

Create a map of subagent names to their state types.

Type

SubagentStatus

The execution status of a subagent.

Type

SubagentStream

Represents a single subagent stream.

Type

ToolCallFromTool

Infer a tool call type from a single tool.

Type

ToolCallsFromTools

Infer a union of tool call types from an array of tools.

Type

ToolCallState

The lifecycle state of a tool call.

Type

ToolCallWithResult

Represents a tool call paired with its result.

Type

UseStreamCustomOptions

Type

ExtendedMessageRole

Type

InferStateType

Unwrap the state shape from a compiled graph, a create-agent brand,

Type

InferSubagentStates

Infer the subagent → state map from a DeepAgent brand. Non-brands

Type

InferToolCalls

Infer the discriminated union of tool call shapes from an input that

Type

MessageMetadataMap

Read-only map exposed via MessageMetadataTracker.store.

Type

StoreListener

Minimal observable store backing every framework binding.

Type

SubagentMap

Type

SubgraphByNodeMap

Type

SubgraphMap

Type

SubmissionQueueSnapshot

Read-only snapshot of the queue. The queue store hands this out

Type

Target

Anything with a namespace can be passed to selector hooks as a

Type

ToolCallStatus

High-level outcome of a single tool call.

Type

UseStreamOptions

Options accepted by framework useStream APIs. Discriminated on the

Type

WidenUpdateMessages

Widen an update type so its messages field also accepts

Type

AnyMediaHandle

Type

DefaultSubagentStates

Default subagent state map used when no specific subagent types are provided.

Type

DefaultToolCall

Default tool call type when no specific tool definitions are provided.

Type

ExtractAgentConfig

Extract the AgentTypeConfig from an agent-like type.

Type

ExtractDeepAgentConfig

Extract the DeepAgentTypeConfig from a DeepAgent-like type.

Type

ExtractSubAgentMiddleware

Helper type to extract middleware from a SubAgent definition.

Type

InferAgentToolCalls

Extract tool calls type from an agent's tools.

Type

InferBag

Infer the Bag type from an agent, defaulting to the provided Bag.

Type

InferDeepAgentSubagents

Extract the Subagents array type from a DeepAgent.

Type

InferNodeNames

Infer the node names from a compiled graph.

Type

InferSubagentByName

Helper type to extract a subagent by name from a DeepAgent.

Type

InferSubagentNames

Extract all subagent names as a string union from a DeepAgent.

Type

InferSubagentState

Infer the state type for a specific subagent by extracting and merging

Type

IsAgentLike

Check if a type is agent-like (has ~agentTypes phantom property).

Type

IsDeepAgentLike

Check if a type is a DeepAgent (has ~deepAgentTypes phantom property).

Type

MediaAssemblyErrorKind

Kinds of failure that can terminate a media handle prematurely.

Type

MediaBlockType

Block types this assembler knows how to reassemble into media handles.

Type

SubagentStateMap

Create a map of subagent names to their state types.

Type

ToolCallFromTool

Infer a tool call type from a single tool.

Type

AcceptBaseMessages

Widens an update type so that its messages field also accepts

Type

BaseSubagentState

Base state type for subagents.

Type

ClassSubagentStreamInterface

Subagent stream interface with messages typed as BaseMessage[]

Type

ClassToolCallWithResult

Remaps an SDK ToolCallWithResult so that the toolMessage and

Type

CustomSubmitOptions

Type

DefaultSubagentStates

Default subagent state map used when no specific subagent types are provided.

Type

EventStreamEvent

Type

ExtractAgentConfig

Extract the AgentTypeConfig from an agent-like type.

Type

ExtractDeepAgentConfig

Extract the DeepAgentTypeConfig from a DeepAgent-like type.

Type

ExtractSubAgentMiddleware

Helper type to extract middleware from a SubAgent definition.

Type

ExtractToolCallsFromState

Extract the tool call type from a StateType's messages property.

Type

GetConfigurableType

Type

GetCustomEventType

Type

GetInterruptType

Type

GetToolCallsType

Extract the tool call type from a StateType's messages property.

Type

GetUpdateType

Type

HistoryWithBaseMessages

Maps a ThreadState<StateType>[] so that the messages field inside

Type

InferAgentState

Type

InferAgentToolCalls

Extract tool calls type from an agent's tools.

Type

InferDeepAgentSubagents

Extract the Subagents array type from a DeepAgent.

Type

InferMiddlewareStatesFromArray

Helper type to extract and merge states from an array of middleware.

Type

InferSubagentByName

Helper type to extract a subagent by name from a DeepAgent.

Type

InferSubagentNames

Extract all subagent names as a string union from a DeepAgent.

Type

InferSubagentState

Infer the state type for a specific subagent by extracting and merging

Type

IsAgentLike

Check if a type is agent-like (has ~agentTypes phantom property).

Type

IsDeepAgentLike

Check if a type is a DeepAgent (has ~deepAgentTypes phantom property).

Type

MessageMetadata

Type

SubagentStateMap

Create a map of subagent names to their state types.

Type

SubagentStatus

The execution status of a subagent.

Type

SubagentStream

Represents a single subagent stream.

Type

UseStreamCustomOptions

Type

WithClassMessages

Maps a stream interface to use @langchain/core BaseMessage

Type

InferBag

Infer the Bag type from an agent, defaulting to the provided Bag.

Type

InferNodeNames

Infer the node names from a compiled graph.

Type

InferNodeReturnTypes

Infer the per-node return types from a compiled graph.

Type

InferStateType

Infer the state type from an agent, graph, or direct state type.

Type

InferSubagentStates

Infer subagent state map from a DeepAgent.

Type

InferToolCalls

Infer tool call types from an agent.

Type

ResolveStreamInterface

Resolves the appropriate stream interface based on the agent/graph type.

Type

ResolveStreamOptions

Resolves the appropriate options interface based on the agent/graph type.

Type

StateRecord

Type

MessagesStreamEvent

deprecated

Message stream event specific to LangGraph Server.

Type

StateOf

deprecated

Legacy alias shared by the framework bindings.