LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
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 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-sdkclientRunsClient
Class●Since v0.0

RunsClient

Copy
class RunsClient

Bases

BaseClient

Constructors

constructor
constructor→ RunsClient<TStateType, TUpdateType, TCustomEventType>

Properties

property
apiUrl: string
property
asyncCaller: AsyncCaller
property
defaultHeaders: Record<string, HeaderValue>
property
onRequest: RequestHook
property
timeoutMs: number | undefined

Methods

method
cancel→ Promise<void>

Cancel a run.

method
create→ Promise<Run>

Create a run.

method
createBatch→ Promise<Run[]>

Create a batch of stateless background runs.

method
delete→ Promise<void>

Delete a run.

method
fetch→ Promise<[T, Response]>
method
get→ Promise<Run>

Get a run by ID.

method
join→ Promise<TStateType>

Block until a run is done.

method
joinStream→ AsyncGenerator<__type>

Stream output from a run in real-time, until the run is done.

method
list→ Promise<Run[]>

List all runs for a thread.

method
prepareFetchOptions→ [URL, RequestInit]
method
stream→ TypedAsyncGenerator<TStreamMode, TSubgraphs, TStateType, TUpdateType, TCustomEventType>

Create a run and stream the results.

method
streamWithRetry→ AsyncGenerator<T>

Protected helper for streaming with automatic retry logic. Handles both initial requests and reconnections with SSE.

method
wait→ Promise<DefaultValues>

Create a run and wait for it to complete.

View source on GitHub