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/langgraphindexfilterLifecycleEntries
Function●Since v0.3

filterLifecycleEntries

Filter a lifecycle StreamChannel to only the entries whose namespace lies within the subtree rooted at path.

Returns an AsyncIterable whose iterator yields every entry whose namespace either equals path or is a descendant of it. Iteration begins at startAt, so callers can capture the log's current size at construction time to skip entries emitted before the caller existed (e.g. a subgraph stream discovered mid-run shouldn't replay the root's started).

Copy
filterLifecycleEntries(
  log: EventLog<LifecycleEntry>,
  path: Namespace,
  startAt: number = 0
): AsyncIterable<LifecycleEntry>

Parameters

NameTypeDescription
log*EventLog<LifecycleEntry>

The shared lifecycle log owned by the transformer.

path*Namespace

Namespace prefix to scope entries by (use [] for the root subtree, i.e. everything).

startAtnumber
Default:0

Zero-based index into the log to begin from.

View source on GitHub