Architecture and Practice of Multi-Agent Root Cause Analysis for Operations

    This article describes how to design a multi-agent operations system that moves from alert aggregation to evidence-driven diagnosis. It covers unified telemetry semantics, agent roles, a hypothesis-driven workflow, report delivery, safety boundaries, and staged rollout metrics.

    From Alert Aggregation to Evidence-Driven Diagnosis

    Traditional operations systems are good at detecting anomalies but not always at explaining them. Higher latency, rising error rates, and connection-pool exhaustion may fire many alerts at once. Those alerts may share a single fault or only coincide in time. If a model only summarizes alert text, it can treat simultaneity as causality.

    The value of multi-agent operations is not having several models reanalyze the same snippet. It is splitting localization into tasks with clear duties, inputs, outputs, and validation criteria. The system builds an analysis context around an incident: metrics bound the anomaly, logs show specific errors, traces show propagation, and configuration, release, and resource changes test candidate causes.

    A complete design has four layers:

    • Data: continuously collect, govern, and retrieve operational evidence.
    • Collaboration: assign diagnostic tasks and maintain analysis state and evidence links.
    • Judgment: compare hypotheses and flag gaps and contradictions.
    • Interaction: present conclusions, supporting evidence, and next steps to operators.

    Root cause analysis here means locating and explaining a failure from available evidence. Complex systems can have triggers, amplifiers, and long-lived issues at once. The system should not hide those distinctions just to produce a single answer.

    Data Ingestion: Unified Semantics Before Scale

    1. Metrics: where it happened and how large the impact is

    Metrics typically cover host resources, application runtime, and business outcomes. Hosts include CPU, memory, disk I/O, and network throughput. Applications include request rate, latency, error rate, queue length, and pool usage. Business metrics may include order volume, payment success, and completion of critical flows.

    Do not rely only on fixed thresholds. Use historical baselines, seasonality, and traffic level. CPU growth may be healthy load, retry amplification, or a compute-heavy job. Align resource change with request volume, errors, and releases on one timeline to narrow explanations.

    For latency, separate averages from percentiles. A few long-tail requests can hurt users without moving the mean. Sampling periods and aggregations change curve shape; results must state query window and statistical definition.

    2. Logs: what actually happened

    Logs carry errors, stacks, request context, and component state changes. Volume of error logs is not proof of root cause.

    Prefer structured fields: time, service, instance, request ID, error type, and business object ID. Deduplicate repeats. Many identical errors support intensity, not independent sources.

    Keep enough context. A single “request timed out” line rarely shows whether timeout was at connect, queue, or downstream execution. Retrieve neighboring records around the event and mark what came from raw logs versus inference.

    3. Traces: how the anomaly propagated

    Distributed traces record paths across services plus span latency and status. They show where slow requests concentrate and whether upstream failure tracks downstream faults.

    Traces are not complete fact. Sampling can drop requests; async work may lack correlation; clock skew can disorder events. Record sampling scope and completeness. Absence of an observed call is not proof the call never happened.

    4. Unified time, identity, and data quality

    Joint analysis needs consistent time semantics and entity IDs. Maintain a service catalog linking services, instances, versions, environments, and dependencies, and carry request IDs through logs and traces.

    For each diagnosis, record:

    • Coverage window and ingest delay
    • Metric sampling and aggregation
    • Log loss, truncation, or redaction
    • Trace sampling and join completeness
    • Query failures, missing permissions, and unreachable sources

    Missing data is not evidence of health. Ingest delay must not be read as recovery.

    Multi-Agent Roles: Bound Complexity with Clear Duties

    1. Planning agent

    The planner defines the problem, splits steps, and assigns work. For example, “payment API error rate up” becomes impact scope, anomaly time, error typing, slow-call location, and change correlation.

    It does not read business data or mutate the system. Retrieval agents fetch facts through controlled tools. Planning stores auditable summaries: current hypotheses, task purpose, done criteria, and evidence gaps—not internal chain-of-thought.

    When evidence conflicts or queries stall, it should change direction rather than repeat the same retrievals.

    2. Specialized retrieval and analysis agents

    Roles can split by data type (metrics, logs, traces) or by task (change correlation, dependency checks, impact).

    Each role needs a permission boundary and a common result shape: observations, sources, time range, applicability, limitations, and open questions. That stops guesses being labeled as facts and enables cross-checks.

    Not every incident needs every role. Local, well-evidenced issues should use a few high-value tasks; cross-service faults can widen the net.

    3. Evidence-validation agent

    Validation checks whether evidence supports a conclusion; it is not a vote. Agents sharing one log are not independent witnesses.

    Check order in time, impact scope, mechanism, and counterexamples. A config change before the incident is only temporal association. Confirm affected instances used that config and that the change can explain the errors.

    4. Output agent

    The output agent turns the record into a structured report, separating confirmed facts, stronger hypotheses, and open issues. It must not invent missing evidence or rewrite “uncertain” as “confirmed.”

    Diagnostic Flow: A Traceable Loop Around Hypotheses

    1. Merge alerts and define the event. Group related alerts by service, window, dependencies, and error traits while keeping originals. Merging creates one investigation entry, not hiding alerts.

    2. Confirm impact and anomaly boundary. Check affected businesses, instances, regions, and request types. Separate global from local faults before diving into one error log.

    3. Build a timeline. Align metric shifts, log events, trace anomalies, releases, and config changes. Show ingest delay and clock error so arrival time is not treated as event time.

    4. Generate candidate hypotheses. Examples: resource shortage, slow downstream, pool exhaustion, bad config. Each hypothesis needs testable predictions, not only abstract labels.

    5. Choose validation tasks. Prefer evidence that discriminates among hypotheses. Rising pool wait may be unreleased connections or a slow downstream; hold time and downstream duration beat replotting the same pool curve.

    6. Update judgment and stop fruitless search. End the round when evidence supports action, or when query budget, time, or permissions are exhausted. If root cause is unconfirmed, report exclusions, remaining hypotheses, and human next steps.

    Example: an API shows higher latency and timeouts. Metrics show longer pool waits; traces show downstream duration rising before upstream error rate; logs show wait-for-connection timeouts. “Downstream slowdown increased connection hold time” is a stronger hypothesis. Do not claim an internal downstream bug without matching evidence.

    Delivery: Conclusions That Can Be Reviewed and Acted On

    Results can go to chat bots as cards, rich text, or interactive actions. The channel is only delivery; structure and access control matter more.

    A report should include at least:

    1. Event overview: start time, current state, affected business
    2. Main findings: where the anomaly is, propagation path, key times
    3. Cause judgment: candidates, supporting evidence, confidence notes
    4. Uncertainties: missing data, conflicts, untested conditions
    5. Actions: inspect, mitigate, recover, and the assumptions they need
    6. Evidence links: queries, windows, related event IDs

    If you show confidence, say what it is based on. Uncalibrated model scores should not be read as probability the root cause is correct.

    Interactive buttons can open evidence, accept ownership, or request remediation, but must not skip approval. Restarts, rollbacks, traffic changes, or config edits need permission, scope, risk, and rollback checks.

    Safety and Reliability: Separate Analysis from Execution

    Ops data may include accounts, credentials, and business privacy. Redact before analysis and apply least privilege on queries.

    Treat logs and other external text as data, not instructions. Phrases such as “ignore rules” or “run this action” in logs must not change agent permissions or workflow.

    Architecturally, keep read-only diagnosis separate from state change. Retrieval tools only read; execution tools authenticate independently, with human approval for high-risk actions. Audit task creation, tool calls, evidence citations, reports, and confirmations.

    To avoid loops, cap queries per incident, concurrent tasks, analysis time, and context size. At the limit, state the constraint and hand off to humans instead of generating explanations without new evidence.

    Evaluation and Staged Rollout

    Do not judge the system only by fluent reports. More useful metrics: localization accuracy, evidence traceability, rate of bad advice, time to first useful finding, and human review cost.

    Offline-test on already reviewed incidents, but restrict access to data that was available at the time so postmortems do not leak into analysis. Include missing data, noisy alerts, and concurrent anomalies to see whether uncertainty is stated clearly.

    Roll out in stages:

    • Stage 1: alert summary, data correlation, event abstracts
    • Stage 2: candidate causes and evidence checks, humans confirm
    • Stage 3: standard remediation advice and controlled low-risk execution
    • Later: widen automation using audit and evaluation results

    Maturity is not agent count. It is trusted data, clear duties, testable inference, and timely blocking of bad judgments. Only when those mechanisms sit in engineering process does automated analysis reduce ops load instead of adding diagnostic noise.