LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Graphs
    • Functional API
    • Pregel
    • Checkpointing
    • Storage
    • Caching
    • Types
    • Runtime
    • Config
    • Errors
    • Constants
    • Channels
    • Agents
    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewGraphsFunctional APIPregelCheckpointingStorageCachingTypesRuntimeConfigErrorsConstantsChannelsAgents
    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraphchannelsdelta
    Moduleā—Since v1.2

    delta

    Attributes

    Functions

    Classes

    View source on GitHub
    attribute
    MISSING
    attribute
    Value
    function
    create_error_message
    class
    BaseChannel
    class
    ErrorCode
    class
    InvalidUpdateError
    class
    DeltaChannel

    Unset sentinel value.

    Base class for all channels.

    Raised when attempting to update a channel with an invalid set of updates.

    Troubleshooting guides:

    • INVALID_CONCURRENT_GRAPH_UPDATE
    • INVALID_GRAPH_NODE_RETURN_VALUE

    Reducer channel that stores only a sentinel in checkpoint blobs and reconstructs state by replaying ancestor writes through the reducer.

    Beta

    DeltaChannel is in beta. The API and on-disk representation may change in future releases. Threads written with DeltaChannel today are expected to remain readable, but the surrounding contract (BaseCheckpointSaver.get_delta_channel_history, the _DeltaSnapshot blob shape, the counters_since_delta_snapshot metadata field) is not yet stable.

    The reducer receives the current accumulated value and a batch of writes in one call: reducer(state, [write1, write2, ...]) -> new_state.

    Reducers must be deterministic and batching-invariant (associative across folds): applying two consecutive write batches separately must produce the same state as applying their concatenation once:

    reducer(reducer(state, xs), ys) == reducer(state, xs + ys)
    

    This lets LangGraph replay checkpointed writes in larger batches than they were originally produced without changing reconstructed state.

    Snapshot cadence is driven by two counters: per-channel update count and total supersteps since last snapshot. create_checkpoint writes a full _DeltaSnapshot blob when EITHER the update count reaches snapshot_frequency OR the supersteps count reaches the system-wide DELTA_MAX_SUPERSTEPS_SINCE_SNAPSHOT bound (default 5000), bounding replay depth even for channels that stop receiving writes.