How AI Agents Investigate Incidents and Find Root Causes

Peter Bubenik · Databricks AI · · Source
Image for How Databricks Uses AI to Accelerate Incident Investigation

After studying this material, you should be able to:

  1. Explain why traditional incident response is slow and where engineers lose time
  2. Describe how AI agents can be structured to assist in incident investigation
  3. Identify the architectural layers of an AI-powered SRE system
  4. Apply core engineering principles for building trustworthy AI agents
  5. Evaluate tradeoffs in designing AI systems for high-stakes operational environments

Step-by-Step Study Material

Step 1: Understanding the Problem Space

The Traditional Incident Response Pain Point

Imagine being woken at 2 AM because a customer-facing API is slow. You must immediately:

Alert fires
    ↓
Engineer wakes up
    ↓
Opens dashboards → checks metrics
    ↓
Searches logs → different tool
    ↓
Checks recent deployments → another tool
    ↓
Reads runbooks → yet another system
    ↓
Mentally connects all signals
    ↓
Forms hypothesis → root cause

Key insight: The tools themselves were not broken. The burden of connecting signals across tools lived entirely inside the engineer's head.

Three Patterns Discovered Through Research

The Databricks team did something important before building anything — they observed real engineers debugging. They found:

PatternWhat It Means
Context assemblyEngineers spent significant time just gathering information before any real analysis began
Repeatable investigative stepsMost debugging followed predictable sequences
Expert judgment at the endThe final diagnosis required human reasoning, but the path to get there was often mechanical

Why this matters: If debugging = repeatable steps + expert judgment, then AI can handle the repeatable steps, freeing humans for judgment.


Step 2: The Solution Architecture — Thinking in Layers

The team designed AI SRE as a layered platform. Think of it like a building:

┌─────────────────────────────────────┐
│         APPLICATION LAYER           │  ← Where debugging happens
│   (Triage bots, team runbooks,      │
│    third-party tools)               │
├─────────────────────────────────────┤
│           CORE ENGINE               │  ← Intelligence & orchestration
│   (LLM synthesis, parallel          │
│    execution, result correlation)   │
├─────────────────────────────────────┤
│            API LAYER                │  ← Controlled, uniform access
│   (Observability API, Deployment    │
│    API, Alerts API)                 │
├─────────────────────────────────────┤
│           PRIMITIVES                │  ← Raw data sources
│   (Metrics, logs, alerts,           │
│    releases, code)                  │
└─────────────────────────────────────┘

Breaking Down Each Layer

Layer 1: Primitives (Foundation)

  • Raw operational data: metrics, logs, alerts, deployment info, code
  • These already existed but were scattered across five different tools with five different query languages
  • This layer acknowledges existing systems as sources of truth rather than replacing them

Layer 2: API Layer (Standardization)

  • Wraps primitives with purpose-specific APIs
  • Handles authentication, rate limiting, and data normalization
  • Critical benefit: if an underlying system changes, debugging tools above don't break

Analogy: Think of this like a universal power adapter. The devices (debugging tools) don't need to know what country's power grid (data source) they're connecting to.

Layer 3: Core Engine (Intelligence)

  • Handles parallel execution of investigation tracks
  • Performs result correlation across signals
  • Uses LLM-powered synthesis to explain findings in plain language
  • Available to ALL teams, not just the platform team

Layer 4: Application Layer (Action)

  • Where actual debugging workflows run
  • Includes both centrally maintained bots AND team-owned runbooks
  • Third-party tools can plug in here

Step 3: How AI SRE Actually Works During an Incident

Mode 1: Automatic Triage (Before the Engineer Opens Their Laptop)

When an alert fires, three investigation tracks launch simultaneously:

Incident Fires
      │
      ├──────────────────────────────────────┐
      │                                      │
      ▼                                      ▼                          ▼
Platform Health          Service-Level Analysis          Runbook Execution
      │                          │                              │
Check if infra           Pull logs, metrics,          Execute team-specific
is the root cause        traces for affected          debugging procedures
(eliminates red          service + dependencies       automatically
herrings)                │                              │
      │                  Check recent deployments       Uses codebase +
      │                  + config changes               observability data +
      │                  │                              past incident history
      └──────────────────┴──────────────────────────────┘
                                  │
                                  ▼
                    Rich Diagnostic Summary
                    (What broke + What changed +
                     What runbook says to check)

Concrete example from the article:

Instead of "CPU is high," AI SRE says: "CPU spiked 3x at 2:47 AM, coinciding with a deployment that changed the batch size in the processing pipeline."

This is the difference between raw data and correlated insight.

Mode 2: Interactive Investigation (When Auto-Triage Isn't Enough)

Sometimes root causes are subtle. Engineers can ask natural language questions:

Engineer asks: "Was there anything unusual about 
               Kafka consumer lag in the 10 minutes 
               before this alert?"
                        │
                        ▼
            AI SRE fetches relevant metrics
                        │
                        ▼
            Overlays against incident timeline
                        │
                        ▼
            Explains findings in plain language

Key concept: This is not a chatbot. It's a structured investigation tool that happens to accept natural language input.


Step 4: Engineering Principles for Trustworthy AI Agents

This is arguably the most important section — how do you make an AI system that engineers will actually trust during a crisis?

Principle 1: Structured Checks Before Open-Ended Reasoning

WRONG approach:          RIGHT approach:
                         
"Ask LLM what's wrong"   Run deterministic checks first
        │                         │
        ▼                         ▼
  Hallucination risk        LLM synthesizes and
                           EXPLAINS verified results

The LLM's role is synthesis and explanation, not data gathering.

Principle 2: Transparency Over Black-Box Answers

Every conclusion must link back to:

  • The specific metric
  • The log line
  • The deployment diff

Why this is non-negotiable: On-call engineers under pressure will not act on recommendations they cannot audit. Trust must be earned through verifiability.

Principle 3: Graceful Degradation

If AI SRE finds root cause → Present diagnosis with evidence
         │
         └── If NOT confident → Explicitly say so
                                Present gathered evidence
                                organized by relevance

Key insight: A partial, honest investigation is more valuable than a confident hallucinated diagnosis.

Principle 4: Guardrails for Agent Behavior

Agents behave differently than humans:

Human EngineerAI Agent
Queries tools sequentiallyHits endpoints in bursts
Naturally paces themselvesRuns checks in parallel continuously
Gets tired, backs offNever backs off on its own
Intuitively avoids overloadNeeds explicit rate limiting

Lesson: Giving agents access to infrastructure required redesigning the API layer, not just opening it up. Agents can accidentally take down the monitoring systems they depend on.


Step 5: The Design Philosophy — What Made This Work

Start With Observation, Not Technology

WRONG: "We have LLMs, let's build a chatbot for incidents"
RIGHT: "Let's watch how engineers actually debug, then build what helps"

The team spent weeks interviewing engineers and reading postmortems before writing any agent code.

Let Teams Own Their Expertise

Centralized agent approach:        Platform approach:
                                   
One team encodes all               Each team owns their
domain knowledge                   runbooks as composable
        │                          primitives
        ▼                                  │
Always stale                               ▼
Always brittle                     System gets smarter
Platform becomes                   as it grows
bottleneck                         No central bottleneck

Build the Context Layer First

"We spent more time mapping how engineers actually investigate incidents than we did on prompt engineering."

The right sequence:

  1. Understand the problem deeply
  2. Build the context assembly layer
  3. Then optimize the model/prompts

Step 6: Measuring Success

The results after deployment:

MetricResult
Teams supported150+
Weekly active users250+
Daily investigations2,000+
Time savedSeveral hours per investigation

But the most important outcome was qualitative:

Engineers got a faster, evidence-backed starting point — their judgment was amplified, not replaced.


Summary: The Mental Model

Traditional Incident Response:
Alert → Engineer assembles context (slow) → Analysis → Resolution

AI SRE Incident Response:
Alert → AI assembles context (instant) → Engineer validates + analyzes → Faster Resolution
                                                    ↑
                                         Human judgment preserved
                                         but applied to pre-assembled evidence

Key Takeaways to Remember

ConceptCore Idea
Problem framingThe tools weren't broken; connecting their signals was the burden
Layered architectureEach layer has one responsibility; layers above focus on higher concerns
Parallel investigationThree tracks run simultaneously before the engineer even opens their laptop
Trust through transparencyEvery AI conclusion links to auditable evidence
Graceful degradationHonest uncertainty beats confident hallucination
Agent guardrailsAgents need explicit rate limiting; they don't self-regulate like humans
Platform over productEnable teams to own their expertise rather than centralizing all knowledge

More to study