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-sdkindexProtocolWebSocketTransportAdapter
Class●Since v2.0

ProtocolWebSocketTransportAdapter

Transport adapter that speaks the thread-centric protocol over a bidirectional WebSocket. Bound to a specific threadId — the socket connects to ws://.../threads/:thread_id/stream/events.

Copy
class ProtocolWebSocketTransportAdapter

Constructors

constructor
constructor

Properties

property
threadId: string

Thread ID this transport is bound to.

Methods

method
close→ Promise<void>

Shuts down the transport and releases any underlying resources.

method
events→ AsyncIterable<Message>

Streams incoming protocol messages from the remote peer. Used by WebSocket transports where all events share one connection.

method
open→ Promise<void>

Opens the underlying connection (e.g. WebSocket handshake). For HTTP/SSE transports this is a no-op.

method
send→ Promise<void | ErrorResponse | CommandResponse>

Sends a command and optionally returns an immediate response.

View source on GitHub