LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Getting started
  • useStream
  • Selectors
  • Interrupts & headless tools
  • Subagents & subgraphs
  • Fork & edit from a checkpoint
  • Submission queue
  • Multimodal media
  • Transports
  • Suspense
  • StreamProvider & context
  • Type safety
  • Migrating to v1
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

OverviewGetting starteduseStreamSelectorsInterrupts & headless toolsSubagents & subgraphsFork & edit from a checkpointSubmission queueMultimodal mediaTransportsSuspenseStreamProvider & contextType safetyMigrating to v1
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/reactHttpAgentServerAdapterOptions
Interfaceā—Since v1.0

HttpAgentServerAdapterOptions

Copy
interface HttpAgentServerAdapterOptions

Properties

property
apiUrl: string
property
asyncCaller: AsyncCaller

Retries and concurrency for SSE/command HTTP. When omitted, requests use raw fetch with no automatic retries (same as constructing ProtocolSseTransportAdapter without this option).

property
defaultHeaders: Record<string, HeaderValue>

Auth / tenant / diagnostic headers applied to every request.

property
fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

Optional fetch override, forwarded to the SSE transport. Useful for auth proxies, Next.js route handlers, or tests with injected mocks. Ignored when webSocketFactory is also supplied.

property
onRequest: ProtocolRequestHook

Per-request hook for last-mile header mutation.

property
paths: ProtocolTransportPaths

Override the default /threads/:threadId/... protocol paths.

property
threadId: string

Thread this adapter targets. Optional: omit to construct an unbound adapter and let the framework bind it via HttpAgentServerAdapter.setThreadId (client.threads.stream does this) — e.g. lazy thread creation, where the id is only known after the first submit().

property
webSocketFactory: (url: string) => WebSocket

Optional WebSocket factory. Supplying it flips the adapter into WebSocket mode — SSE is bypassed entirely.

View source on GitHub