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
    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
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph_internal_replayReplayState
    Classā—Since v1.1

    ReplayState

    Copy
    ReplayState(
        self,
        checkpoint_id: str,
    )

    Constructors

    Attributes

    Methods

    View source on GitHub
    constructor
    __init__
    NameType
    checkpoint_idstr
    attribute
    checkpoint_id: checkpoint_id
    method
    get_checkpoint

    Load the right checkpoint for a subgraph during replay.

    On the first call for a given subgraph namespace, returns the latest checkpoint created before the replay point. On subsequent calls (e.g. the same subgraph in a later loop iteration), falls back to normal latest-checkpoint loading.

    method
    aget_checkpoint

    Async version of get_checkpoint.

    Tracks which subgraphs have already loaded their pre-replay checkpoint.

    During a parent replay, each subgraph's first invocation should restore the checkpoint from before the replay point. Subsequent invocations of the same subgraph (e.g. in a loop) should use normal checkpoint loading so they pick up freshly created checkpoints.

    The single ReplayState instance is shared by reference across all derived configs within one parent execution.