DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

LangGraph Persistence and Checkpointing: What They Store and How to Configure Them

LangGraph checkpointers save graph-state snapshots within a thread; stores hold application data shared across threads. Learn how to choose and configure each.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

LangGraph persistence is configured by compiling a graph with a checkpointer and invoking it with a thread_id. The checkpointer saves graph-state snapshots for that thread, enabling continuity, interruption and resumption, and state inspection. For application data that should be shared across threads, configure a separate store. The right checkpointer depends on whether you need a quick in-memory example, lightweight SQLite storage, or durable production persistence.

Checkpointer or store: which kind of persistence do you need?

LangGraph uses two complementary persistence mechanisms. A checkpointer saves state as a graph runs and groups those snapshots into a thread. A store holds application-defined information outside any one thread, making it available across threads. For example, a conversation can use its thread’s checkpointed state for continuity while reading or updating a user’s preferences in a store.

As an Amazon Associate I earn from qualifying purchases.

Checkpointers support continuing conversations, resuming interrupted runs, recovering from failures, inspecting state, and time-travel workflows. Stores are for information your application chooses to retain and share; configure and read or write them explicitly in graph nodes or application code. See the LangGraph persistence guide for the distinction and configuration concepts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What does a checkpoint contain?

A checkpoint is more than a chat transcript. The Python checkpoint reference describes a snapshot of graph state that includes channel values, channel versions, and version tracking for nodes. A thread is a sequence of checkpoints: thread_id identifies the sequence, and checkpoint_id can select a particular snapshot when an operation needs to target one. The LangGraph Python checkpoint reference also documents pending writes: if one node fails after other nodes have completed successfully, those successful writes can be retained so resumption does not necessarily have to rerun all completed work.

Choose a checkpointer for your deployment

Pick an implementation based on durability, concurrency, execution style, operational ownership, and where the graph runs. Official documentation describes intended uses, not universal performance rankings or benchmark results.

Option Documented fit Important trade-off
InMemorySaver / MemorySaver Debugging, testing, and the simplest demonstration State lives in process memory and is lost when the process restarts; it is not durable persistence.
SqliteSaver Lightweight synchronous use, demos, and small projects The synchronous saver reference says it does not scale to multiple threads. An async SQLite implementation is also available, but its package documentation does not recommend async SQLite for production.
PostgresSaver / AsyncPostgresSaver Durable production workloads and long-running workflows Requires PostgreSQL connectivity and saver setup. Choose the synchronous or asynchronous integration to suit the application.
Agent Server persistence Managed deployments in which the server handles persistence infrastructure Backend options depend on the deployment. PostgreSQL is used for server resources and is the default checkpoint backend; supported deployments can use MongoDB as an alternative checkpoint backend, while PostgreSQL remains required for other server resources.

The SQLite suitability and deserialization guidance is in the SQLite package reference. Agent Server’s persistence arrangement is a managed-deployment detail, not a requirement for standalone LangGraph graphs; see the LangSmith data-plane documentation.

Configure checkpointing in a graph

  1. Select and initialize a saver. Choose an implementation for your environment and connect it to its backing store. Run any required initialization before compiling; the PostgreSQL example in the checkpoint reference calls setup().
  2. Compile the graph with the checkpointer. In Python, pass it as checkpointer=... when compiling. JavaScript uses the corresponding checkpointer option for graph compilation.
  3. Invoke with a thread identifier. Pass a configuration containing {"configurable": {"thread_id": "..."}} when invoking the graph. The identifier associates execution with a persisted thread.
  4. Reuse the identifier to continue. Use the same thread_id when continuing that thread; use a different one to create a separate thread. If you need a particular checkpoint rather than the thread’s applicable state, use a checkpoint_id where supported by the operation.
  5. Add a store only for cross-thread data. Configure a store separately and have application code or graph nodes explicitly read and write the items that should be shared across threads.

The official quickstart uses an in-memory saver to demonstrate the interface. That makes it useful for learning and tests, but it does not preserve state through a process restart. Follow the implementation-specific setup instructions in the checkpoint reference before using a persistent backend.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan retention, identifiers, and graph boundaries

Set a checkpoint retention policy

Checkpoints accumulate over long conversations and can increase latency and storage costs. The persistence guide recommends periodically pruning old checkpoints or setting a retention policy. It does not establish a universal retention period, so choose one based on the application’s recovery, inspection, and storage requirements.

Keep PostgreSQL thread IDs within the documented limit

The persistence guide notes that PostgresSaver stores thread_id in a limited-length column and recommends keeping IDs below 255 characters. A UUID or hash is an option when application identifiers might exceed that length.

Decide how subgraphs share state

A subgraph may use its own checkpoint namespace, which affects what the parent graph can see. If information must cross graph boundaries, the guide suggests using a store or configuring the subgraph to write to the parent checkpoint. Choose deliberately according to whether the information is thread state or shared application data; the persistence guide’s troubleshooting section covers subgraph persistence.

Restrict SQLite checkpoint deserialization where needed

The SQLite package reference documents setting LANGGRAPH_STRICT_MSGPACK=true or passing an explicit allowed_msgpack_modules list to restrict checkpoint deserialization to known-safe types if the database is compromised. Confirm the setting and API against the version of the package installed in your environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.