Lesson 15.07 · Phase 15 · Capstone: Your Own Agent Harness

Evals & traces

The agent's final message is a claim. The trace is the record, and an eval is a test against it.

Learning objectives

  • Build a tracer hook that writes one JSON line per event (runs, model calls, tool calls), with subagent runs linked to their parent and secrets redacted.
  • Build an eval runner: tasks with setup files, a fresh workspace per task, offline scripts for CI, and checks on outcomes, files and tool calls.
  • Catch a regression with a saved baseline, in a case where the agent's answer text looks the same.
  • Prefer outcome checks (run the tests) over text checks (look for a particular line).

You change the system prompt and the agent "still works": its answers read just as well. But on the fix-the-bug task it has stopped running the tests and stopped editing the file, and it says it fixed the bug anyway. Nobody notices for a week.

Loading the full lesson…