LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • 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

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.checkpointbase
    Module●Since v1.0

    base

    Attributes

    attribute
    ERROR: str
    attribute
    INTERRUPT: str
    attribute
    RESUME: str
    attribute
    SCHEDULED: str
    attribute
    V
    attribute
    PendingWrite: tuple[str, str, Any]
    attribute
    logger
    attribute
    ChannelVersions: dict[str, str | int | float]
    attribute
    WRITES_IDX_MAP: dict
    attribute
    EXCLUDED_METADATA_KEYS: set
    attribute
    LATEST_VERSION: int

    Functions

    function
    uuid6
    function
    maybe_add_typed_methods
    function
    copy_checkpoint
    function
    get_checkpoint_id
    function
    get_checkpoint_metadata
    function
    get_serializable_checkpoint_metadata
    function
    empty_checkpoint
    function
    create_checkpoint

    Classes

    Modules

    View source on GitHub
    class
    SerializerProtocol

    Protocol for serialization and deserialization of objects.

    • dumps_typed: Serialize an object to a tuple (type, bytes).
    • loads_typed: Deserialize an object from a tuple (type, bytes).

    Valid implementations include the pickle, json and orjson modules.

    class
    EncryptedSerializer

    Serializer that encrypts and decrypts data using an encryption protocol.

    class
    JsonPlusSerializer

    Serializer that uses ormsgpack, with optional fallbacks.

    Warning

    Security note: This serializer is intended for use within the BaseCheckpointSaver class and called within the Pregel loop. It should not be used on untrusted python objects. If an attacker can write directly to your checkpoint database, they may be able to trigger code execution when data is deserialized.

    class
    ChannelProtocol
    class
    CheckpointMetadata

    Metadata associated with a checkpoint.

    class
    Checkpoint

    State snapshot at a given point in time.

    class
    CheckpointTuple

    A tuple containing a checkpoint and its associated data.

    class
    BaseCheckpointSaver

    Base class for creating a graph checkpointer.

    Checkpointers allow LangGraph agents to persist their state within and across multiple interactions.

    When a checkpointer is configured, you should pass a thread_id in the config when invoking the graph:

    config = {"configurable": {"thread_id": "my-thread"}}
    graph.invoke(inputs, config)

    The thread_id is the primary key used to store and retrieve checkpoints. Without it, the checkpointer cannot save state, resume from interrupts, or enable time-travel debugging.

    How you choose thread_id depends on your use case:

    • Single-shot workflows: Use a unique ID (e.g., uuid4) for each run when executions are independent.
    • Conversational memory: Reuse the same thread_id across invocations to accumulate state (e.g., chat history) within a conversation.
    class
    EmptyChannelError

    Raised when attempting to get the value of a channel that hasn't been updated for the first time yet.

    module
    id

    Adapted from https://github.com/oittaa/uuid6-python/blob/main/src/uuid6/__init__.py#L95 Bundled in to avoid install issues with uuid6 package

    UUID version 6 is a field-compatible version of UUIDv1, reordered for improved DB locality. It is expected that UUIDv6 will primarily be used in contexts where there are existing v1 UUIDs. Systems that do not involve legacy UUIDv1 SHOULD consider using UUIDv7 instead.

    If 'node' is not given, a random 48-bit number is chosen.

    If 'clock_seq' is given, it is used as the sequence number; otherwise a random 14-bit sequence number is chosen.

    Wrap serde old serde implementations in a class with loads_typed and dumps_typed for backwards compatibility.

    Get checkpoint ID.

    Get checkpoint metadata in a backwards-compatible manner.

    Get checkpoint metadata in a backwards-compatible manner.

    Create a checkpoint for the given channels.