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/langgraphindexEventLog
Class●Since v0.3

EventLog

A projection channel for StreamTransformers.

Implements AsyncIterable<T> so it can be iterated directly by in-process consumers via run.extensions.<key>. Channels created with StreamChannel.remote or new StreamChannel(name) are also auto-forwarded to remote clients.

Copy
class EventLog

Constructors

constructor
constructor

Properties

property
channelName: string

Protocol channel name used for auto-forwarded events, if remote.

property
done: boolean
property
size: number

Methods

method
[asyncIterator]→ AsyncIterator<T>
method
close

Mark the channel as complete after all buffered items are consumed.

method
fail

Mark the channel as failed after all buffered items are consumed.

method
get→ Value

Return the current value of the channel.

method
iterate→ AsyncIterator<T>

Returns an async iterator starting at position startAt. Each call returns an independent cursor so multiple consumers can iterate the same channel concurrently.

method
push

Append an item to the channel. If this is a remote channel wired to a mux, the item is also injected into the main protocol event stream under channelName.

method
toAsyncIterable→ AsyncIterable<T>

Creates an AsyncIterable backed by this channel, starting from startAt.

method
toEventStream→ ReadableStream<Uint8Array<ArrayBufferLike>>

Creates a web ReadableStream that emits channel items as Server-Sent Events. Useful for returning a channel directly from new Response(channel.toEventStream()).

method
isInstance→ value is EventLog<unknown>

Brand-based type guard that recognises any StreamChannel instance, even ones originating from a different copy of this package. Prefer this over instanceof StreamChannel when code may observe channels that were constructed elsewhere.

method
local→ EventLog<T>

Create an in-process-only channel. Values remain available through run.extensions.<key> but are not forwarded to remote clients.

method
remote→ EventLog<T>

Create a channel whose pushes are forwarded to remote clients under the given protocol channel name.

View source on GitHub