LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
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
LangGraph SDK
ClientAuthReactLoggingReact UiServer
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/langgraphchannels
Module●Since v0.3

channels

Copy
import { ... } from "@langchain/langgraph/channels";

Functions

function
createCheckpoint→ Checkpoint
function
empty→ Cc

Classes

class
LastValueAfterFinish

Stores the last value received, but only made available after finish(). Once made available, clears the value.

class
BinaryOperatorAggregate

Stores the result of applying a binary operator to the current value and each new value.

Interfaces

interface
AnyValue

Stores the last value received, assumes that if multiple values are received, they are all equal.

Note: Unlike 'LastValue' if multiple nodes write to this channel in a single step, the values will be continuously overwritten.

interface
DynamicBarrierValue

A channel that switches between two states

  • in the "priming" state it can't be read from.
    • if it receives a WaitForNames update, it switches to the "waiting" state.
  • in the "waiting" state it collects named values until all are received.
    • once all named values are received, it can be read once, and it switches back to the "priming" state.
interface
EphemeralValue

Stores the value received in the step immediately preceding, clears after.

interface
NamedBarrierValue

A channel that waits until all named values are received before making the value available.

This ensures that if node N and node M both write to channel C, the value of C will not be updated until N and M have completed updating.

interface
Topic

A configurable PubSub Topic.

interface
WaitForNames

Type Aliases

typeAlias
BinaryOperator: (a: ValueType, b: UpdateType)
View source on GitHub