Verification Agents with Tracker, Validator, and Auditor Loops
Explore how to verify multi-agent workflows with three independent loops. You will build a tracker for handoff order, a validator for numeric accuracy, and an auditor for citation support, then test them against broken traces and combine code-based checks with model rechecks.
We'll cover the following...
Over this chapter, the incident review grew into a team of workers. They hand off results through a shared state, get tools from MCP servers, and run verbose code on a runner. Each worker reports status: ok when it finishes. But that status is only the worker’s own account. It means the step ran and returned something in the right shape. It doesn’t mean the plan was followed, the numbers are right, or the cited source says what the worker claims.
In this lesson, we’ll build three checks that read the same shared state and confirm the work independently: a tracker for the plan, a validator for the numbers, and an auditor for the citations. Each is built to catch a different kind of error. We’ll prove that with four test traces, each broken in exactly one way.
Status ok isn’t enough
Let’s build the traces. The correct one is the five-handoff run from Lesson 6.2, plus two clues the investigator quoted from notes: the runbook’s first step from note-1, and the recovery time from the March postmortem, note-2. Then we make three broken copies:
Missing step: The analyst’s handoff is missing from the history.
Wrong value: The affected-request count is stored as
"8,115"instead of 8,015.Wrong source: The runbook’s first step is cited to
note-4, the stale 2024 runbook, which says to restart Redis first.
Every handoff in all four traces reports status: ok.
In the code above:
Lines 8–12: We define
correct_trace(), which runs the five handoffs and adds the two quoted clues.Lines 15–23: We define
broken_traces(), which copies the correct trace three times and breaks each copy in one way. ... ...