pager

Case study

Measuring an on-call agent on faults it cannot see coming

Pager answers a production alert the way an on-call engineer would: it reads metrics, logs, traces, deploy history and the database, names a root cause, and proposes a fix that a person approves. Most of the work went into the benchmark around it, which measures how often the agent is right, how often its fix would hurt, and what that costs.

Role
Solo project: design, lab, agent, benchmark, evaluation; built with AI coding assistants
Stack
Go services, Python agent (LangGraph), Prometheus, Loki, Tempo, Postgres, Redis, Docker Compose, k6
Models
GLM-5.3-flash and Claude Haiku 5.5 through OpenRouter
Model spend
$4.25 across every study and demo

The problem

AI incident responders are easy to demo and hard to trust. A demo shows one good investigation; an on-call team needs to know the miss rate, which misses are dangerous, and whether the agent beats a much cheaper baseline. Answering that needs incidents with a known answer, many of them, run under the same conditions.

What I built

What the numbers say

The main study injected 77 incidents, 74 of which paged, and ran six agent setups on each live incident. Claude Haiku with tools named the exact service and mechanism in 42 of 74 (57%). The cheaper GLM-5.3-flash did better with one request and a fixed evidence bundle (35 of 74) than with its tool loop (14 of 74). Harmful fixes were rare: 7 of 271 valid reports, six of them rollbacks of the decoy deploy.

On the lab side, 95 of 100 valid injections paged, median 42 s. One fault, a gateway out of file descriptors, never paged at first, because the failure happens before any request handler records a metric. The fix was a synthetic edge probe, not a lower threshold: that fault then paged 4 of 4 times.

Mistakes the data exposed

After the fixes

GLM was re-run on one incident per fault, all three setups on the same live incidents (19 paged). Tool agent 11, single prompt 10, tool agent without runbooks 13. The tool loop no longer loses, but 19 incidents cannot separate it from the single prompt, and I report it that way. Fitting the model's stated confidence to how often it was right on the first study improved the Brier score on the re-run from 0.239 to 0.214; the approval page now shows that track record next to the confidence.

Making it usable on any stack

Version 0.4 runs Pager against anyone's systems from one config file, while the lab keeps the exact prompt and tools the benchmark measured (a test freezes them).

Limits

What I would do next

Run two incidents per fault on the current code to test the newest changes and get enough incidents to tell the tool loop and the single prompt apart; teach the agent to check that a recent change touches the failing path before blaming it, which is where most harmful fixes come from; and run the documented vendor adapters against real accounts.

Source code available on request.