liveBook · Manning

Checkpointer

As explained in AI Agents and Applications

A checkpointer is a component that saves and restores workflow state, including conversational information, across executions or interactions.

A checkpointer saves snapshots of a workflow’s execution state so it can be restored later. Unlike saving messages alone, it can preserve the broader graph state, including tool information and execution metadata. section 14.1.3 section 14.1.6

Saving state at each graph super-step can support:

  • Resuming after a failure without rerunning the entire workflow. section 14.1.3
  • Pausing a human-in-the-loop workflow for input or approval, then continuing from the saved state. section 14.1.3
  • Maintaining conversational context across turns in a chat session. section 14.1.3

In LangGraph, associate turns with a thread_id passed through RunnableConfig, then compile the graph with a checkpointer such as InMemorySaver. The same thread ID lets later calls recover that session’s state. InMemorySaver suits development and testing; production guidance favors persistent storage, with PostgreSQL recommended for scalability, reliability, and concurrency. section 14.1.4 section 14.1.4

Restore a travel conversation

After asking about the weather in Penzance, inspect the state history and retrieve a past checkpoint using its thread_id and checkpoint_id. Resume from that checkpoint, then ask about “the same town”; the assistant can resolve the reference from the restored conversation context. section 14.1.6 section 14.1.5

Figure 14.1 Sequence diagram of the travel assistant with checkpoints saved after each node execution, allowing state restoration across turns using a shared thread_id
figure

See how checkpoints saved after node executions allow a shared thread ID to restore state across turns. section 14.1.3

How AI Agents and Applications covers it

How deep it goes
Explains snapshots at graph super-steps and demonstrates inspecting and restoring state, without detailing storage internals.
Examples
Uses a travel assistant to resolve “the same town” after restoring a checkpoint from a Penzance weather conversation.
What it assumes
Assumes familiarity with a graph workflow, its state, and invoking it with configuration.
What you can do after
Apply it via LangGraph to persist conversational state and resume a workflow from a selected checkpoint.
How it connects
Connects graph state and super-steps with thread IDs, conversational memory, and human-in-the-loop workflows.

Also explained in

Compare how 2 books explain checkpointer →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.