"The Self-Healing Infrastructure Layer."
Aether is an autonomous agent designed to assist Site Reliability Engineers (SREs) by reducing the Mean Time To Resolution (MTTR) for infrastructure incidents. It combines SQL-based telemetry analysis with semantic search over runbooks to diagnose issues without human intervention.
graph TD
User[👤 SRE User] -->|1. Incident Report| UI["💻 Aether Dashboard (Streamlit)"]
subgraph "Secure Enclave (Docker Container)"
UI -->|2. Sends Prompt| Agent[🧠 LangChain Agent]
Agent -->|3. Decision Loop| Router{Determine Tool}
Router -->|Need Metrics?| SQL[📊 SQL Tool]
Router -->|Need Knowledge?| RAG["📚 Vector Search (ChromaDB)"]
SQL -->|Raw Data| DB[(SQLite DB)]
RAG -->|Raw Text| VDB[(Runbooks)]
DB -->|4. Return Data| PII[🛡️ PII Redaction Layer]
VDB -->|4. Return Docs| PII
PII -->|5. Sanitized Data| Agent
end
Agent -->|6. Final Diagnosis| UI
style PII fill:#ffcccc,stroke:#ff0000,stroke-width:2px,stroke-dasharray: 5 5
style Agent fill:#e1f5fe,stroke:#01579b
- 🧠 Autonomous Reasoning Loop: Uses Chain-of-Thought (CoT) to plan investigations (Schema Check → Query Metrics → Search Runbooks).
- 🔭 Full Observability: integrated OpenTelemetry tracing to visualize the agent's decision-making process in Jaeger.
- 🛡️ PII Redaction Middleware: Custom regex-based firewall that intercepts all database outputs to strip Emails, API Keys, and SSNs before they reach the LLM context window.
- 📊 Multi-Modal Investigation: Correlates structured time-series data (SQLite) with unstructured institutional knowledge (ChromaDB).
- 🐳 Production Ready: Fully containerized with Docker for consistent deployment.
The development of Aether involved solving critical production challenges common to LLM agents. Below is a log of the key optimizations implemented to ensure reliability and cost-efficiency.
- The Problem: Global context poisoning. Queries about one service (e.g., "Payment") would bleed into subsequent queries about others (e.g., "Kafka"), causing the agent to hallucinate incorrect SQL joins.
- The Solution: Implemented a JIT Agent Factory.
- Every user request spins up a fresh, stateless agent instance.
- This ensures zero cross-request contamination and strictly isolated decision-making contexts.
- The Problem: LLMs often fail to respect Database Normalization (e.g., trying to find
service_namein a metrics table that only hasservice_id). - The Solution: A Dynamic System Prompt that injects the exact user query into the instructions.
- We replaced static few-shot examples (which caused overfitting) with dynamic algebraic instructions.
- Technique:
LIKE '%{extracted_service_name}%'pattern matching forced the agent to handle fuzzy inputs (e.g., "auth" vs "Auth-Service") robustly.
- The Problem: Large runbooks triggered
429 Rate Limiterrors and slow response times. - The Solution:
- Safety Cap: Hard-coded 8,000-character limits on RAG outputs.
- Truncation: Implemented "Head + Tail" slicing to preserve document context without blowing up the token window.
- The Problem: Recurring queries caused database locks and sluggish demos.
- The Solution: Integrated
InMemoryCacheto serve identical reasoning traces in <0.1s, dramatically improving the user experience during repetitive debugging.
- The Problem: Network flakiness or LLM "stop early" behaviors.
- The Solution:
- Tenacity Retries: Applied exponential backoff decorators (
@retry) to handle transient failures. - Strict Ordering: Enforced tool execution order (Schema → Metrics → Runbooks) via system prompt constraints.
- Tenacity Retries: Applied exponential backoff decorators (
- The Problem: Hardcoding system prompts made it impossible to iterate on prompt logic without redeploying code.
- The Solution: Decoupled prompts into
config/*.yamlfiles.- The agent now supports a
prompt_fileparameter, enabling A/B testing between different reasoning strategies (e.g.,prompts.yamlvsprompts_V1_20260105.yaml).
- The agent now supports a
To ensure the agent remains robust as prompt logic evolves, we've implemented an automated benchmarking suite in evaluate.py.
- Technique: LLM-as-Judge.
- How it works:
- A "Student" Agent runs a set of test cases.
- The raw execution trace (tool calls and outputs) is captured.
- A "Judge" (GPT-4o) evaluates the trace against a strict rubric of "Expected Behavior".
- The Judge provides a 0-100 score, a Pass/Fail status, and detailed reasoning.
- Usage:
python evaluate.py
We have introduced granular test suites to validate specific agent capabilities:
tests/test_memory.py: Validates context retention across multiple turns.tests/test_reasoning.py: Ensures correct tool sequencing (Schema → Metrics → Runbooks).tests/test_security.py: Rigorous validation of the PII redaction layer.tests/test_ui.py: Basic health checks for the Streamlit interface.
The fastest way to run Aether is via Docker.
1. Clone the repository
git clone [https://github.com/snudurupati/ops-sentinel.git](https://github.com/snudurupati/ops-sentinel.git)
cd ops-sentinel2. Build the Image
docker-compose build --no-cache3. Run the Container
(Ensure your .env file contains your OPENAI_API_KEY)
docker-compose up4. Access the Dashboard
Navigate to http://localhost:8501
- Orchestration: LangChain (OpenAI Tools Agent)
- Interface: Streamlit (Custom CSS)
- Observability: OpenTelemetry (Jaeger Exporter)
- Database: SQLite (Normalized Schema), ChromaDB (Vector Store)
- LLM: GPT-4o / GPT-4o-mini
- Evaluation: LLM-as-Judge (metrics tracking via
evaluate.py) - Infrastructure: Docker, Python 3.12
- Reliability: Tenacity (Retries), Pydantic (Data Validation), Tabulate (CLI Reports)
- Human-in-the-Loop: Approval workflow before executing write operations (e.g., restarting pods).
- GraphRAG: Migrating from SQL Joins to a Graph Database (ArangoDB) for semantic relationship mapping.
- RBAC: Role-Based Access Control via OAuth2.