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.
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.
Serializer that encrypts and decrypts data using an encryption protocol.
Serializer that uses ormsgpack, with optional fallbacks.
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.
Set the environment variable LANGGRAPH_STRICT_MSGPACK=true to restrict
deserialization to a built-in allowlist of safe types. You can also pass
an explicit allowed_msgpack_modules to the constructor.
Metadata associated with a checkpoint.
State snapshot at a given point in time.
A tuple containing a checkpoint and its associated data.
Per-channel result entry from BaseCheckpointSaver.get_delta_channel_history.
Storage-level view of what one channel contributed across the ancestor chain of a target checkpoint:
writes — on-path deltas oldest→newest as PendingWrite tuples.
Always present; possibly empty. Already filtered to one channel.
Writes stored at the target checkpoint itself are pending for the
next super-step and are excluded.seed — the stored value at the nearest ancestor whose
channel_values[ch] is populated. Omitted if the walk reached the
root without finding any stored value (consumer treats absence as
"start empty"). Typically a _DeltaSnapshot for delta channels with
finite snapshot frequency, or a plain value for threads migrated
from a pre-delta channel type.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:
thread_id across invocations
to accumulate state (e.g., chat history) within a conversation.Raised when attempting to get the value of a channel that hasn't been updated for the first time yet.