# Inside an AI SRE investigation: hypotheses, tool calls and the evidence trail

> What actually happens between an alert firing and an AI naming a root cause: the agent loop, why it drifts, and the design that keeps it honest.

Published 2026-11-28 · The AlertiGate team · Practices · AI SRE, Root cause analysis, LLM agents, Incident response
Source: https://alertigate.com/blog/ai-sre-investigation-anatomy/

"The AI looked at your cluster and found the root cause" is a sentence that hides almost
everything that matters. Between the alert and the answer there are dozens of decisions: which
data to read first, which explanation to chase, when to stop, and how sure to be. Those
decisions are where AI investigations succeed or quietly fail, and they are the part a demo never
shows.

This article opens the box. It describes how an agentic investigation works, where it goes wrong,
and the design choices that separate an answer you can act on from a fluent guess.

## The loop every AI SRE runs

Almost every AI SRE product today is built on the same pattern, usually called an agent loop and
first described in the [ReAct paper](https://arxiv.org/abs/2210.03629): the model reasons about
what it knows, chooses a tool to call, reads the result, and repeats until it decides it has an
answer. In an incident, the tools are reads: a PromQL query, a LogQL query, `kubectl get` and
`describe`, a rollout history, a runbook search.

![An investigation loop: an alert arrives, the agent states hypotheses, chooses a tool call, reads the evidence, and either confirms or refutes each hypothesis until one survives with enough support](https://alertigate.com/blog/ai-sre-investigation-anatomy/loop.svg "Each turn of the loop is one read. The quality of the answer depends on which reads are chosen and what is done with the ones that disagree.")

The loop is powerful because it adapts: a crash loop leads to the previous container's logs, an
OOM kill leads to the memory limit, a deploy boundary leads to the rollout history. It is also
where three failure modes live.

## Three ways an investigation drifts

**It anchors on the first plausible story.** A model that reads "error rate up after deploy" will
happily spend its whole budget confirming that the deploy did it, without ever reading the
evidence that would show the node ran out of disk at the same moment. Nothing in a bare agent
loop forces it to look for disconfirming evidence.

**It wanders.** Given twenty tools and no guidance, a model calls the ones it has heard of. A
two-person SRE team at STCLab [reported to the CNCF](https://www.cncf.io/blog/2026/04/21/auto-diagnosing-kubernetes-alerts-with-holmesgpt-and-cncf-tools/)
that adding exclusion rules to their runbooks ("no Loki, no Tempo, no Istio here; use kubectl and PromQL only")
cut wasted tool calls from 16 to 2 per investigation. Same model, same alert.

**It reports confidence it has not earned.** The model writes "high confidence" because the
story is coherent, not because the evidence is strong. Coherence and correctness are different
things, and a reader at 03:00 cannot tell them apart. The [companion article on
confidence](https://alertigate.com/blog/ai-root-cause-confidence/) is about exactly this.

## Three ways to build an AI investigator

The difference between products is mostly in what they add around the loop.

| Approach | How it works | What you can check afterwards | Typical failure |
|---|---|---|---|
| Chat over your telemetry | You ask questions; the model queries and summarises | The chat transcript | Answers the question you asked, not the one you should have |
| Free agent loop | The model chooses tools until it decides it is done | A narrative, sometimes with the queries | Anchoring on the first story; confidence from fluency |
| Hypothesis-driven investigation | Causes are stated up front, each with a prediction; reads confirm or refute them | Every hypothesis, the read behind each finding, and why the losers lost | Slower to write; needs more structure in the engine |

The third approach is closer to how a good engineer works, and to the method in our article on
[root cause analysis for Kubernetes](https://alertigate.com/blog/kubernetes-root-cause-analysis/): enumerate the
candidate causes, state what each one predicts, then go and look.

## What a hypothesis-driven investigation records

For a crash-looping payments service, a hypothesis-driven investigation starts by writing down
the candidates and their predictions before reading anything:

- *If this is an OOM kill,* the last termination reason is `OOMKilled` and the exit code is 137.
- *If a config value is missing,* the previous container's last log line names it and the exit
  code is the application's own.
- *If the deploy caused it,* the restarts begin at the rollout boundary.

Each read is then attached to the hypothesis it tests, with the exact query, the cluster, the
time and the raw answer. When the termination reason comes back as `Error` with exit code 1, the
OOM hypothesis is not quietly dropped; it is marked refuted, with the record that refuted it. The
surviving cause is the one whose predictions held, and the others stay on the page so a reader
can disagree with the elimination rather than with a conclusion.

Two engineering details make this trustworthy rather than merely tidy:

- **Untested is not the same as true.** A hypothesis the investigation never tested must never
  be shown as the top cause, however plausible it sounds.
- **Missing data is a result.** If a required source could not be read, the honest output is
  "insufficient evidence", with the missing source named, not a confident guess around the gap.

## Budgets: the boring part that decides the bill

An agent loop with no limit is a cost incident waiting to happen. Every serious investigator
needs a hard budget per investigation, in tokens and tool calls, enforced in code rather than
requested in a prompt, and a defined behaviour when the budget runs out: stop, and report what
was found so far. Deterministic work, such as grouping alerts into incidents, should not call a
model at all.

## Why AlertiGate is built this way

AlertiGate's investigations are hypothesis-driven by design, and that is the main reason we
think it is the strongest choice for teams who have to stand behind an answer:

- **Every finding cites its read, and you can re-run it.** The exact `kubectl`, PromQL or LogQL
  call, the cluster, the time and the raw answer are recorded. Re-running a cited read shows the
  new answer against the recorded one.
- **Refuted hypotheses stay on the page,** with the record that refuted each one. An untested
  hypothesis is never shown as the top cause.
- **INSUFFICIENT is a first-class result,** naming the source that could not be read.
- **Hard budgets in code.** Each investigation and check runs under a budget enforced by code;
  one that reaches it stops and reports a partial result. Grouping alerts into incidents calls no
  model at all.
- **It runs in your cluster, on your model,** built on HolmesGPT's agent loop and adding the
  hypothesis record, the incident workflow and the audit trail around it.

On our own lab cluster an investigation cost $0.026 to $0.059 in model calls, and in 31 graded
lab runs all 23 conclusions marked HIGH were correct. Those are lab numbers, and the beta exists
to measure them on real incidents: [join the beta](https://alertigate.com/beta/) and point it at your own alerts.

---

From the AlertiGate blog (https://alertigate.com/blog/). AlertiGate is a self-hosted reliability platform for Kubernetes: it catches trouble early, investigates with evidence you can re-run, and gates every fix.
