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
    Pythonlanggraphpregel_checkpointcreate_checkpoint
    Function●Since v0.6

    create_checkpoint

    Copy
    create_checkpoint(
      checkpoint: Checkpoint,
      channels: Mapping[str, BaseChannel] | None,
      
    View source on GitHub
    step
    :
    int
    ,
    *
    ,
    id
    :
    str
    |
    None
    =
    None
    ,
    updated_channels
    :
    set
    [
    str
    ]
    |
    None
    =
    None
    ,
    get_next_version
    :
    GetNextVersion
    |
    None
    =
    None
    ,
    channels_to_snapshot
    :
    set
    [
    str
    ]
    |
    None
    =
    None
    )
    ->
    Checkpoint

    Build a new Checkpoint from the previous one and live channel state.

    For each name in channels_to_snapshot, a _DeltaSnapshot(value) blob is written into channel_values[k]. Other delta channels are omitted from channel_values — the ancestor walk reconstructs their state from checkpoint_writes. Callers compute the set via delta_channels_to_snapshot(channels, counters); defaults to empty (no snapshots) when not provided.