Abstract
Infrastructure as code (IaC) tools automate cloud provisioning, but verifying that deployed systems remain consistent with IaC specifications remains challenging. Configuration drift—caused by bugs, manual changes, or system updates—can lead to outages and security vulnerabilities. While Large Language Model (LLM)-based agents can automate telemetry analysis for drift detection, they often exhibit "blind trust" in diagnostic tools. When these tools provide erroneous or incomplete data, standard agents cannot distinguish between infrastructure failure and tool failure. We introduce RIVA (Robust Infrastructure by Verification Agents), a multi-agent system that performs robust IaC verification through iterative cross-validation and tool call history tracking. Evaluation on the AIOpsLab benchmark shows that RIVA improves task accuracy from 27.3% to 50.0% in the presence of erroneous tool responses, and from 28% to 43.8% under normal conditions.
Introduction
Modern cloud operations rely on IaC tools like Terraform and Ansible to maintain consistency. However, "configuration drift" frequently occurs when the live state of a server diverges from its code definition. LLM-based agents using frameworks like ReAct are increasingly used to detect this drift, but they are vulnerable to "silent failures" in observability tools (e.g., get_logs() or read_metrics()). If an agent cannot verify the reliability of its inputs, it may generate false alarms or miss critical issues. RIVA addresses this by moving from a single-agent "reason-and-act" loop to a collaborative multi-agent strategy designed to "trust, but verify."
System Design
RIVA employs a specialized two-agent architecture to separate high-level reasoning from low-level execution.
- Verifier Agent: Acts as the architect, examining the IaC specification to identify properties for verification and analyzing results to reach a final conclusion.
- Tool Generation Agent: Acts as the operator, synthesizing specific commands. If a previous tool call is deemed suspicious, this agent is tasked with finding an alternative diagnostic path (e.g., using SSH to check a log file instead of a high-level API).
- Cross-Validation ($K$-Constraint): RIVA requires $K$ distinct diagnostic paths to agree before a property is considered verified, ensuring that a single faulty tool cannot derail the detection process.
- Tool Call History: A shared data structure allows agents to track contradictions and avoid repeating failed strategies.
Experimental Results
The system was evaluated using the AIOpsLab benchmark, with a specific focus on robustness against "broken tools" that return empty strings or incomplete data without raising exceptions.
As shown in the performance comparison, RIVA significantly outperforms the baseline ReAct agent across all task types. In scenarios where tools were intentionally degraded (e.g., get_logs or read_metrics failures), RIVA maintained a total success rate of approximately 50.0%, whereas the ReAct agent's performance dropped to 27.3%. Even in the absence of tool errors ("none"), RIVA's multi-agent design improved accuracy from 28% to 43.8%.
Beyond accuracy, RIVA demonstrated superior efficiency. By avoiding the "hallucination loops" common in single-agent systems when faced with conflicting data, RIVA completed tasks in fewer steps (peaking at 17 steps vs. ReAct's 45) and consumed roughly half the tokens (38k vs. 78k).
Conclusion
RIVA demonstrates that multi-agent collaboration and iterative cross-validation are essential for building reliable autonomous infrastructure agents. By requiring independent verification of diagnostic findings, RIVA mitigates the risks associated with unreliable observability tools in production cloud environments. Future work will explore batching diverse tool calls and scaling the system to handle the subtle, partially correct failures common in massive production clouds.
Summary updated