Skip to content

Evaluation and Monitoring

Summary

An agent is only as trustworthy as the evidence that it still works. This pattern pairs offline evaluation (fixed test sets, trajectory checks, LLM-as-judge, regression gates on every prompt/model change) with online monitoring (latency, cost, error rates, drift, alerting) so degradation is caught rather than discovered. The book stresses tracking performance, cost and compliance continuously and evaluating the agent's trajectory, not only its final answer (ch. 19). Results should feed back into gates that block bad changes.

When to use / not

  • Use: any agent that changes over time (prompts, models, tools) or runs unattended.
  • Avoid: vanity dashboards with no gate or owner.

Failure modes

  • Monitors that crash silently.
  • Evals defined in policy but never built.
  • Cost metrics presented as invoices.

Fleet evidence (bamr87/bamr87@2321b3a)

Behavior Permalink / workflow
Drift gate (runs budget + python tests) drift-check.yml; green run 41256758338
Fleet conformance scoring conformance.yml, tools/conformance.py; green run 41080860256
Spec gate (backlog/spec consistency, stale report) spec-gate.yml L29-62 (reusable; no hub run listed)
Daily key health monitor + single open alert issue api-keys.yml L1-30
Fleet doctor / pulse with spend + budget_hit outputs fleet-pulse.yml L490-493; green run 41173476332
Structured activity events (start/finish/retry/declined) fleet_activity.py L22-60
Eval policy (rerun on change, required check) constitution §13 L137-142, amendment 0011

Reproduce

cd /tmp/hub && git checkout 2321b3a7c1199688042339d68b628f9d08bb46eb
python3 -m pytest -q tools/test_conformance_work.py
gh run list -R bamr87/bamr87 -w drift-check.yml -L 1

Expected: tests pass (verified 2026-10-31); latest drift-check success.

Gaps

  1. §13 eval sets don't exist: no eval directory or eval CI check for any AI call site (searched repo, 2026-10-31). → Already tracked: #530 (found on pre-filing dedupe; not refiled). Related: #492, #495.
  2. Monitor health: API Key Watch red — #522. Telemetry pipeline in progress — #446-#451.

ADP-12, ADP-16; constitution §13, §15 testing evidence.