Checkpointing persists the agent's typed state after every node, enabling pause and resume, human in the loop interruption, and time-travel debugging while protecting against trajectory loss on crashes.
Imagine playing a long video game with no save points. If the power flickers, you lose hours of progress. A checkpointer is the save system. After every important step, the game writes the state of the world to disk: your inventory, your location, the quests in progress. If the power dies, you load the most recent save and pick up where you left off. LangGraph does the same thing for agents. After every step, it saves the whole working state. If the process crashes, you reload from the last save instead of starting over. And because every step has a save file, you can also go back in time and replay from any earlier point, which is invaluable when you are trying to figure out why an agent went wrong.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
LangGraph checkpointing is the durable-state primitive that makes long-running agents practical in production. It turns an agent from a stateless inference loop into a stateful, replayable computation. This deep dive walks through what checkpointing actually persists, the three capabilities it enables (pause and resume, human in the loop, time-travel), the failure mode it prevents (trajectory loss), and the operational discipline required to use it without blowing up storage.
What checkpointing actually persists
A LangGraph agent has a typed state object, defined by the developer as a TypedDict or Pydantic model. The state holds every piece of working memory the agent needs to make its next decision: the plan, the running summary, the conversation messages (or references to them), the partial tool results, the current sub-goal, and any custom application fields like the user ID or the workflow status.
When the graph runs with a configured checkpointer, every node execution produces a state delta, the reducer merges the delta into the previous state, and the resulting new state is serialized and written to the checkpointer backend. Each write produces a checkpoint with a stable ID and a thread ID that groups related checkpoints.
The checkpointer backend is a pluggable storage layer. In-memory is fine for tests. SQLite is the default for local development. Postgres is the production-standard, with a single schema that handles state, messages, and metadata. Redis is used when low-latency resume matters more than long-term durability. Cloud-native variants (DynamoDB, BigQuery, CosmosDB) cover horizontal scale.
The contract is uniform: write the full state after every node, read it back by ID on resume. This means that no matter where the trajectory is when a crash happens, the most recent checkpoint contains everything the agent needs to continue.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- LangGraph's PostgresSaver and SQLiteSaver are the production-standard checkpointer backends
- LangGraph Cloud (2024-2026) uses checkpointing as the foundation for its managed agent runtime
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does LangGraph checkpointing compare to Temporal workflow checkpointing?
Temporal checkpoints are at activity boundaries and the runtime guarantees exactly-once execution across worker failures. LangGraph's checkpoints are at node boundaries and the runtime guarantees at least once with deterministic resume. Temporal is more battle-tested for distributed workflows; LangGraph is more ergonomic for LLM loops. The conceptual lineage runs from Temporal (and earlier Cadence) into LangGraph; teams running both often use Temporal as the orchestration layer above LangGraph subgraphs.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Running long agent trajectories with only in-memory state and discovering on the first production crash that hours of accumulated context disappear.
60 second bullets to scan on the way to the call.
Define what gets checkpointed (the typed state object)
Name the checkpointer backends LangGraph supports
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.