TL;DR
AgentFM is a novel, role-aware failure management framework for distributed databases that leverages LLM-driven multi-agents to detect, diagnose, and mitigate system faults. By explicitly distinguishing between system roles (e.g., leader vs. follower nodes), data roles (metrics vs. logs), and task roles (detection vs. mitigation), AgentFM achieves high diagnostic accuracy while providing actionable, human-readable remediation strategies.
What Problem Does This Paper Address?
Distributed databases form the backbone of modern cloud infrastructure, but when they fail or slow down, the financial consequences are massive—even a 0.1-second delay can slash an e-commerce giant's revenue by 1%.
Managing these failures is incredibly difficult. Existing automated tools suffer from two major flaws:
- Role Blindness: They treat every node and data stream in a distributed cluster as identical. In reality, a database node acting as a "leader" behaves differently and is more critical than a "follower" node. Similarly, system metrics (like CPU usage) and logs capture entirely different types of failures.
- Lack of Interpretability: Traditional machine learning approaches treat failure management as a black-box classification problem. They might tell an engineer that something is wrong, but they fail to explain why or provide a clear path to fix it.
Methods
The authors introduce AgentFM, an LLM-powered multi-agent framework designed to mirror the structured roles within a distributed database system.
The architecture splits responsibilities across three specialized agent categories coordinated by a centralized Meta Agent:
- System Agents: Operating on each node, these agents dynamically adapt to the node's specific database function (e.g., Config Agent, Coordinator Agent, or Storage Agent). A System Role Manager tracks runtime state changes, such as leader re-elections.
- Data Agents: These handle the messy, multimodal data coming off the system. The Metric Agent denoises time-series data and uses an LLM to translate numerical fluctuations into natural language descriptions. The Log Agent applies sequence and semantic compression to distill massive log dumps into compact summaries of key operations.
- Task Agents: Orchestrated centrally by the Meta Agent using system trace data, these agents execute the failure management pipeline sequentially: a Detection Agent flags anomalies, a Diagnosis Agent pinpoints the root cause, and a Mitigation Agent generates remediation strategies.
All agents utilize a Retrieval-Augmented Generation (RAG) and Chain-of-Thought (CoT) prompting strategy, drawing on historical examples to guide their reasoning.
Datasets
The framework was evaluated on Apache IoTDB, a popular distributed time-series database. Because standard benchmarks often lack complex role-based interactions, the authors constructed a custom evaluation dataset by manually injecting 10 distinct types of anomalies (including CPU/memory saturation, network partitions, bandwidth limits, workload spikes, and excessive data export/import operations). Each anomaly type was injected 20 times across the cluster, yielding 200 total test scenarios.
Key Insights and Ideas
- Nodes Are Not Equal: The authors' preliminary empirical study proved that anomaly detection algorithms perform significantly better on nodes hosting leader partitions (achieving up to a 90.73% F1-score) compared to follower nodes (dropping as low as 47.53%). Failure management frameworks must prioritize nodes based on their active system roles.
- Data Sources Have Distinct Superpowers: Metrics are highly effective at identifying resource constraints (like CPU and memory spikes), but completely blind to internal database logic errors. Conversely, logs excel at catching configuration errors and data transfer anomalies.
- LLMs as Translators: Rather than forcing an LLM to parse raw, high-dimensional time-series data or millions of redundant log lines, converting preprocessed metrics and compressed logs into structured natural language descriptions allows the LLM to reason about system health effectively.
Key Results
Evaluated using the Qwen2.5-72b model, AgentFM demonstrated strong performance across the failure management lifecycle:
- Anomaly Detection: Achieved a 95.76% F1-score (95.14% precision, 97.03% recall).
- Failure Diagnosis: Attained an 87.62% F1-score (89.61% precision, 87.04% recall) in identifying the exact root cause.
- Mitigation: Qualitative reviews showed that the Mitigation Agent successfully generated targeted, clear instructions for operations engineers, such as recommending specific container CPU limit increases or cluster load-balancing actions.
Limitations and Future Work
While AgentFM excels at identifying infrastructure-level faults, the authors note that the model still struggles to accurately diagnose highly complex, internal database anomalies (such as specific types of excessive data import operations). Additionally, the current framework only recommends mitigation strategies; the authors plan to extend future versions to automatically execute these remediation steps to achieve true closed-loop, autonomous failure recovery.
Summary updated