Search⌘ K
AI Features

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.

traces.py · Python 3.14.0
import copy
from run_handoffs import run
from shared_state import add_clue
FIRST_STEP = "turn off the newest checkout feature flag"
def correct_trace():
state, _ = run()
add_clue(state, "runbook.first_step", FIRST_STEP, "note-1", "investigator")
add_clue(state, "postmortem.recovery", "brought latency back to normal in six minutes", "note-2", "investigator")
return state
def broken_traces():
good = correct_trace()
missing_step = copy.deepcopy(good)
missing_step["history"] = [h for h in missing_step["history"] if h["role"] != "analyst"]
wrong_value = copy.deepcopy(good)
wrong_value["clues"]["checkout.requests_over_slo"]["value"] = "8,115"
wrong_source = copy.deepcopy(good)
wrong_source["clues"]["runbook.first_step"]["source"] = "note-4" # the stale 2024 runbook
return {"correct": good, "missing step": missing_step, "wrong value": wrong_value, "wrong source": wrong_source}
if __name__ == "__main__":
for name, state in broken_traces().items():
clue = state["clues"]["runbook.first_step"]
print(f"{name:<13}| roles {[h['role'] for h in state['history']]} | first_step source {clue['source']}")

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. ... ...