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-sdkindexClientConfig
Interface●Since v0.0

ClientConfig

Configuration for BaseClient and the exported LangGraph SDK Client.

Copy
interface ClientConfig

Properties

property
apiKey: string | null

API key for authentication.

  • If a string is provided, that key will be used
  • If undefined (default), the key will be auto-loaded from environment variables (LANGGRAPH_API_KEY, LANGSMITH_API_KEY, or LANGCHAIN_API_KEY)
  • If null, no API key will be set (skips auto-loading)
property
apiUrl: string

Base URL of the LangGraph API server.

Defaults to http://localhost:8123, unless the runtime provides a langgraph_api:url global override.

property
callerOptions: AsyncCallerParams

Options forwarded to the internal AsyncCaller, such as retry, concurrency, or custom fetch behavior.

property
defaultHeaders: Record<string, HeaderValue>

Headers applied to every request.

The configured API key, when present, is added as the x-api-key header after these defaults are initialized.

property
onRequest: RequestHook

Hook for inspecting or mutating a request before it is sent.

Receives the resolved URL and prepared RequestInit; return the original init or a replacement object to continue the request.

property
streamProtocol: StreamProtocol

Streaming protocol used by stream-capable endpoints.

Defaults to "legacy" for backwards compatibility.

property
timeoutMs: number

Default timeout, in milliseconds, applied to client requests.

Per-request timeoutMs values override this default. Passing null at the request level disables the configured timeout for that request.

View source on GitHub