Library

Volume 1 · System Design Scenarios

Notebook
Sign in

Section 55

Multi-Agent Incident Response System

527 words · about 2 min

Problem Statement

Design an AI-driven incident response platform that ingests alerts from monitoring tools (Datadog, PagerDuty, Prometheus), triages severity, identifies likely root cause, and either auto-remediates known issues or assembles the right humans with the right context.

Multi-Agent Architecture

Alert Sources (Datadog, Prometheus, App Insights, PagerDuty webhook)
              |
       +------v------+
       |  Triage Agent | <- Classify: infra / application / data / security
       |              | <- Deduplicate correlated alerts into one incident
       +------+------+
              |
    +---------+---------+--------------+
    v         v         v              v
+--------+ +--------+ +------------+ +-------------+
|Blast    | |Root    | |Runbook     | |Communication |
|Radius   | |Cause   | |Matcher     | |Agent          |
|Agent    | |Analyzer| |Agent       | |               |
|         | |        | |            | |Tools:         |
|Tools:   | |Tools:   | |Tools:      | |-Slack/Teams   |
|-service  | |-log     | |-runbook    | | post          |
| dep graph| | search  | | vector DB  | |-status page   |
|-BFS from | |-metric  | |-past       | | update        |
| failed   | | corr.   | | incident   | |-stakeholder   |
| node     | |-deploy  | | retrieval  | | paging        |
|         | | history |  |            | |               |
+---+----+ +---+----+ +---+--------+ +---+-----------+
    |          |          |              |
    +----------+----------+              |
               v                         |
        +--------------+                 |
        | Remediation   |                 |
        | Decision Agent|                 |
        |              |                 |
        | Confidence>90%|                |
        | + known runbook|--Auto-remediate|
        | + low blast    |  (restart pod, |
        |   radius        |  scale up,     |
        |                |  rollback deploy)|
        | Else           |----------------v|
        | -> Human escalation with full context|
        +--------------+

Escalation Decision Framework

def should_auto_remediate(incident):
    """Auto-remediate only when the blast radius and confidence justify it."""
    if incident.confidence < 0.90:
        return False, "Confidence too low for autonomous action"
    if incident.blast_radius_services > 3:
        return False, "Blast radius too large -- needs human judgment"
    if incident.runbook_match_score < 0.85:
        return False, "No high-confidence runbook match"
    if incident.affects_payment_path:
        return False, "Payment-critical path always requires human approval"
    return True, "Safe to auto-remediate"

Key Design Decisions

  • Orchestration, not choreography: a central state machine (LangGraph-style) coordinates agent handoffs because incident response has a strict logical order (triage -> analyze -> decide -> act/escalate) and needs a full audit trail — choreographed event-driven agents would be far harder to debug during a live incident.
  • Human-in-the-loop by default: full autonomy is reserved for a narrow, pre-approved set of low-risk, high-confidence remediations (pod restart, horizontal scale-up, feature-flag rollback). Everything else routes to an on-call human with the agents’ full investigation trail attached — this converts a 20-minute manual triage into a 2-minute human decision.
  • Immutable audit log: every agent action, tool call, and decision is logged with timestamps and confidence scores — required both for post-incident reviews and for building the training data that improves runbook matching over time.
  • Feedback loop: outcomes of both auto-remediated and human-resolved incidents feed back into the Runbook Matcher’s vector store, continuously improving future match confidence.

Metrics

Metric Target
Mean time to triage (MTTT) < 60 sec
Mean time to resolution (MTTR) — auto-remediated < 3 min
Mean time to resolution — human-escalated 50% reduction vs. baseline (context pre-gathered)
Auto-remediation false-positive rate < 1%
Alert deduplication rate > 70% (correlated alerts merged into one incident)