Checkpointing persists the agent's typed state after every node. This enables pause and resume, human in the loop interruption and time-travel debugging, and protects 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. Because every step has a save file, you can also go back in time and replay from any earlier point. That helps a lot 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.
What checkpointing persists
A LangGraph agent has a typed state object, defined by the developer as a TypedDict (the main documented way), a dataclass, or a 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. 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. The LangGraph repo ships three. In-memory (InMemorySaver) is for debugging and tests only. SQLite (SqliteSaver) is local file-based storage for development. Postgres (PostgresSaver) is the one recommended for production. Other stores come as separate packages: langgraph-checkpoint-redis, langgraph-checkpoint-mongodb, langgraph-checkpoint-aws (DynamoDB and others), and an Azure Cosmos DB integration.
The contract is uniform: write the full state after every node, read it back by ID on resume. 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 ships InMemorySaver, SqliteSaver and PostgresSaver. It recommends Postgres for production and describes SQLite as local file-based storage for development
- LangGraph's managed deployment service (first LangGraph Cloud, then LangGraph Platform, now LangSmith Deployment) uses checkpointing as the foundation of its 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 records an event history and replays deterministic workflow code to rebuild state after a worker failure. Activities are retried, so they should be idempotent. LangGraph saves a checkpoint at each step boundary. Resuming after an interrupt reruns the interrupted node from its start, so side effects in nodes should also be idempotent. Temporal is more battle-tested for distributed workflows; LangGraph is more ergonomic for LLM loops. One option when you need both is to run Temporal as the orchestration layer above LangGraph graphs.
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.