bet · Personal project

AgentOps — A Multi-Agent Incident-Response System

A LangGraph multi-agent system (planner, log analyst, fixer) that takes an incident from alert to root cause to a draft fix — with MCP tools, an eval harness, and human approval on every change.

Role
Sole designer and builder — agent graph, MCP servers, eval harness, and guardrails
Team
Solo
Scope
Production incident investigation: from an alert, to a root-cause hypothesis backed by evidence, to a pull request with a proposed fix
Level
Personal project

Eval dimensions per run

4

Method: Each run over the labelled incident scenarios is scored on root-cause accuracy, tool-call success rate, latency, and cost per run.
Window: every change

Write actions without approval

possiblenone

Method: Design property: human-in-the-loop approval is required before any write action, such as opening a pull request.
Window: by design

Observability

opaque runsevery step traced

Method: OpenTelemetry tracing is emitted for every agent step and every tool call.
Window: by design

Context

When a production alert fires, the first hour is usually the same work: figure out what to look at, dig through logs and metrics, form a hypothesis about the root cause, and draft a fix. AgentOps is a personal project to see how much of that an agent system can do reliably — and how to know when it can't.

Code: repository link coming soon.

Three agents, one explicit graph

Rather than one agent holding every tool, AgentOps is a LangGraph graph of specialized agents:

  • a planner that decides what to investigate,
  • a log analyst that gathers and interprets evidence,
  • a fixer that drafts a change once there's a root cause.

Each has a focused prompt and a small toolset. Transitions are explicit and the shared state is inspectable, so when a run goes wrong you can see exactly which stage failed — and each stage can be evaluated on its own.

Real systems through MCP

The agents need real access: logs, metrics, and code. I wrote custom MCP servers that expose logs, metrics, and GitHub as tools. Agents query live systems through them and open pull requests with proposed fixes. MCP gives a standard, testable boundary, and each server exposes only the operations it should.

Evals before features

Agent demos are easy to make look good. The harness is what keeps this honest: a set of labelled incident scenarios, and every change scored on root-cause accuracy, tool-call success rate, latency, and cost per run. A prompt tweak that fixes one incident and breaks three others shows up immediately.

Guardrails and humans in the loop

The fixer can open pull requests, so any write action needs human approval, guardrails bound what each agent may do, and OpenTelemetry tracing covers every agent step and tool call. Autonomous investigation, human-approved change.

What broke

Two lessons came straight out of the evals. First, the planner sometimes sent incidents that looked familiar straight to the fixer, which then confidently fixed a cause nobody had established — now the fixer is gated on an explicit, evidence-backed root-cause hypothesis, and root-cause accuracy is scored separately from fix quality. Second, an early log tool returned unbounded results that flooded the context window; tools now return bounded, summarized, paginated results, and cost per run is tracked alongside accuracy.

Outcomes

A multi-agent system that takes an incident from alert to root cause to a draft fix, measured on every change, observable end to end, and never landing a change without a human saying yes.

Decision Records

Where I Got It Wrong

Failure 1

Early on, the planner sometimes routed incidents that resembled earlier ones straight to the fixer, which then proposed confident fixes for a cause that the log analyst hadn't actually established

Cost: Plausible-looking but wrong draft fixes — the most dangerous kind of output for an incident tool

Lesson: Gate the fixer on an explicit root-cause hypothesis with supporting evidence in the graph state, and score root-cause accuracy separately from fix quality in the evals

Failure 2

A log-query tool initially returned raw, unbounded results, so a broad query could flood the context window and drive up cost and latency per run

Cost: Slow, expensive runs and worse reasoning on noisy incidents

Lesson: Tools should return bounded, summarized, paginated results — tool design is as much a part of agent quality as the prompt, and cost per run belongs in the evals

Long-Term Impact

A working reference for how I build agents: specialized roles, standard tool interfaces, evals first, and humans in control of every change.