← All notes

Persist LangGraph state with a checkpointer and thread_id

Answer: A LangGraph checkpointer stores a snapshot of graph state at each super-step, grouped into threads. Compile a graph with a checkpointer, and specify a thread_id so execution can resume on that thread.

Why a checkpointer

LangGraph checkpointers save graph state as checkpoints at each step. The snapshot sits at every super-step and is organized into threads. Compiling with a checkpointer unlocks human-in-the-loop workflows, time travel debugging, fault-tolerant execution, and conversational memory. When you use Agent Server, you do not need to implement or configure checkpointers manually.

The checkpoint library

The langgraph-checkpoint library defines the base interface for LangGraph checkpointers. Checkpointers provide a persistence layer: they save graph state at every superstep. A checkpoint is a snapshot of the graph state at a given point in time. A checkpoint tuple holds the checkpoint plus config, metadata, and pending writes. A thread is a unique ID assigned to a series of checkpoints. When using a checkpointer, you must specify a thread_id (always required) and optionally checkpoint_id, under the configurable part of the config. InMemorySaver is the in-memory implementation. Each checkpointer should conform to BaseCheckpointSaver and implement put, put_writes, get_tuple, list, delete_thread, and get_next_version. Pending writes remember successful node results at a superstep if another node fails, so resume does not re-run those nodes.

| thread_id | checkpoint | |---|---| | thread_id | unique ID for a series of checkpoints | | checkpoint_id | optional id of one checkpoint in a thread | | InMemorySaver | in-memory BaseCheckpointSaver | | put | store a checkpoint with config and metadata |

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: LangChain Docs, Checkpointers; langchain-ai/langgraph (GitHub), LangGraph Checkpoint. MIT; MIT. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: LangChain Docs, Checkpointers; langchain-ai/langgraph (GitHub), LangGraph Checkpoint. MIT; MIT.

Cite this

Permanent ID: iil:note:kgegrjx7

iinventedlight. 2026. "Persist LangGraph state with a checkpointer and thread_id." iinventedlight Library, iil:note:kgegrjx7, version of 2026-11-19. https://iinventedlight.com/library/notes/langgraph-checkpoint/. License: CC-BY-4.0.

@misc{iil_note_kgegrjx7,
  author = {{iinventedlight}},
  title = {{Persist LangGraph state with a checkpointer and thread\_id}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-19},
  url = {https://iinventedlight.com/library/notes/langgraph-checkpoint/},
  note = {Permanent ID iil:note:kgegrjx7. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/langgraph-checkpoint.md.