Skip to course content
Free LangGraph course

LangGraph for Agentic Workflows

Module 10 Activity

Scenario

Something in your workflow produces a wrong answer without raising. This module is how you find it in minutes rather than an afternoon.

What you build

A debugging pass using state history and a trace record, ending in a logging schema you would want during an incident.

Steps

  1. Plant a bug in a middle node that produces a wrong value without raising. Have a colleague run it if you can.
  2. Find it using get_state_history alone, reading forwards for the first wrong value. Record how long it took.
  3. Take a trace of a run and read it backwards from the symptom, marking which steps are correct given their input.
  4. Reproduce a failure by replaying the recorded inputs on a fresh thread. Report whether it reproduced, and what that tells you.
  5. Recover a failed run by editing state and resuming, and count how many times the expensive node ran versus a restart.
  6. Write your trace schema, including state_before, state_after and route_reason.

Evidence to hand in

Review checklist