Checkpointers and threads
Ark's continuity is hand-rolled: session.json, a writeback hook, an incident log. LangGraph ships this as first-class primitives. This module puts a Postgres checkpointer under the module 3 dice graph, kills the process mid-run, resumes, and walks the checkpoint lineage.
A checkpointer persists graph state after every step. Compile the graph with one and every node transition writes a snapshot. If the process dies, the thread resumes from the last snapshot instead of the start.
For dev, MemorySaver from @langchain/langgraph is the in-memory equivalent, gone when the process exits. The Postgres and SQLite savers live in their own packages: @langchain/langgraph-checkpoint-postgres and -sqlite.
A thread is a conversation's identity. You pass a thread_id in config; all checkpoints for that thread are its history. Same thread_id resumes; a new thread_id starts fresh.
Try it yourself
What thread_id identifies
One value decides this, and it is passed at call time rather than configured on the graph.
What determines resume vs fresh start when you call graph.invoke?
Why null inputs on resume
graph.invoke(null, config) resumes a thread using null as the inputs. Where does the graph actually get its state from?