1:1 mentoring with Big Tech AI engineers
LLM & Agentic

Checkpointers, Threads & Store

LangGraph persistence end to end: checkpointers and thread_id for resumable runs, get_state and time travel, PostgresSaver in production, and the Store for memory that outlives a thread.

Last updated

After this section you can

  • Make a graph resumable with a checkpointer and a thread_id
  • Inspect, rewrite and fork a run with get_state and get_state_history
  • Pick the right checkpointer backend for your deployment
  • Put durable facts in a store instead of growing the thread forever
03

Checkpointers, Threads & Store

One argument to compile() turns a graph into something that survives a crash. A second one gives it memory that outlives the conversation. They are different layers and mixing them up is the usual bug.

THE CENTRAL IDEA

A checkpointer saves the state after every node, keyed by thread_id — that is what makes a run resumable. A store saves facts keyed by whatever namespace you choose, outside every thread — that is what makes an agent remember you tomorrow.

Checkpointer remembers this run; store remembers this customer
CHECKPOINTER · ONE ROW PER NODE, SCOPED TO A THREAD thread_id = "cust-42" c1 c2 c3 ✗ crash invoke again on the same thread_id → continues at c3 thread_id = "cust-77" a different conversation — it cannot see cust-42 STORE · OUTSIDE EVERY THREAD ("prefs", "cust-42") tone → "terse" plan → "enterprise" survives every thread, searchable, not replayed The checkpointer is a transcript: it replays to reconstruct a run. The store is a lookup: nothing is replayed, you read a key. Using the checkpointer as long-term memory is the common mistake — the thread grows without bound and every resume gets slower. Rule of thumb: if it should still be true in next month’s conversation, it belongs in the store.

Related

More in LLM & Agentic

Get full access to all 74+ sections with code examples, diagrams, and interactive animations.

Unlock Premium