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

    Chat LangChain

    What can I help with?

    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 v1.2

    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
    ,
    stored_versions
    :
    ChannelVersions
    |
    None
    =
    None
    ,
    trigger_to_nodes
    :
    Mapping
    [
    str
    ,
    Sequence
    [
    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.

    stored_versions are the channel versions of the last checkpoint the saver stored. A snapshotted channel whose version has not moved since then is bumped.