Agentic AI · Advanced level

Advanced level · Module 2: Agent Orchestration · Lesson 3 of 4

Checkpointing and Resuming Graphs

Learners attach a checkpointer so that each graph run is saved by thread, resumes after interruption and can be inspected afterwards for audit.

In this lesson you will

  • Add persistent checkpoints to a graph
  • Resume and inspect graph runs

Key concepts

checkpointerthread IDdurable runsstate historyaudit

The lesson

A checkpointer saves the graph state after each step under a thread ID. In-memory checkpointers suit tests; a database-backed checkpointer (for example SQLite) keeps runs across restarts.

With checkpoints, a run interrupted by a crash, a power cut or a lost connection resumes from the last completed step. The saved history also shows exactly how the state changed, which supports audits and debugging.

Decide how long checkpoints are kept, because they may contain retrieved documents and user questions.

Step by step

  1. Add a checkpointer and run the graph with a thread ID.
  2. Stop the run mid-way and resume it.
  3. Print the state history for the thread.
  4. Write a retention rule for checkpoints.

Practice activity

Add durable checkpoints to the capstone graph and demonstrate resume.

Expected result: Runs that resume correctly and a readable state history.

Check your understanding

  1. What identifies a run's saved checkpoints?

    Show answer

    Its thread ID.

  2. Why set a retention period for checkpoints?

    Show answer

    They may contain user questions and retrieved documents.

Further learning

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.