A robust, self-healing system designed to autonomously monitor, predict, and remediate faults in a distributed microservices environment. The system leverages Agentic AI (Gemini Flash 2.0 & NVIDIA NIM) to reason about system state and execute remediation strategies without human intervention.
The system operates on an infinite control loop:
graph TD
A[Fault Injection] -->|Disrupts| B(System Infrastructure)
B -->|Generates| C[Metrics & Logs]
C -->|Observed by| D[Detection Agent]
D -->|Identifies| E{Anomaly/Risk?}
E -->|Yes| F[Remediation Agent]
F -->|Plans & Executes| G[Fix Actions]
G -->|Verifies| B
E -->|No| D
Emulates a complete AWS cloud environment locally using LocalStack.
- S3: Storage for logs, metric archives, and incident artifact records.
- DynamoDB: NoSQL database for tracking agent decisions, LLM actions, and incident history.
- CloudWatch: Centralized aggregation for real-time logs and metrics.
- Lambda: Serverless functions for generating synthetic traffic and heartbeat metrics.
Powered by Gemini Flash 2.0 and NVIDIA NIM.
- Detection Agent: Continuously polls monitoring data, detecting active failures and predicting future risks based on trends.
- Remediation Agent: Formulates a step-by-step plan to fix detected issues, executes CLI commands, and verifies resolution.
Simulates real-world production failures to test system resilience:
- CPU Saturation / Spikes
- Memory Leaks & OOM Errors
- Disk Space Exhaustion
- Service Crashes & Network Latency
- "Error Storms" (Log spikes)
A Flask-based UI for real-time observability:
- Live metric streams and log feeds.
- Interactive incident timeline.
- deep-dive into LLM reasoning traces (Chain of Thought).
- System health status at a glance.
- Python 3.8+
- Docker & Docker Compose (Must be running)
- Git
git clone https://github.com/GameOn223/Heal-Ops.git
cd autonomous-systemCreate a .env file from the example template.
cp .env.example .envUpdate .env with your API keys:
GEMINI_API_KEY: Required for the reasoning agents.NVIDIA_API_KEY: Required for specialized model inference.
pip install -r requirements.txtThis project uses LocalStack to emulate AWS services locally.
Option A: Using Docker Compose (Recommended)
The included docker-compose.yml is pre-configured for this project.
docker-compose up -dWait for a few moments for the container to fully initialize.
Option B: Manual Installation (CLI) If you prefer managing LocalStack via CLI:
pip install localstack
localstack start -dVerification: Visit http://localhost:4566/health to confirm LocalStack is running. You should see a JSON response indicating service status.
Once dependencies are installed and LocalStack is running:
Sets up S3 buckets, DynamoDB tables, and CloudWatch groups.
python infrastructure/setup.pyPackages and deploys the metric generator functions to LocalStack.
python infrastructure/deploy_lambdas.pyLaunch the observability UI in a separate terminal.
python dashboard/app.pyAccess at: http://localhost:5000
Start the main orchestrator agent. This script runs the Detection and Remediation agents.
python agents/orchestrator.pyllm_actions: Audit log of every prompt sent to the LLM and its response.incidents: Registry of detected failures, including timestamp, severity, and type.remediations: Tracking of all fix attempts, their execution output, and success status.agent_decisions: storage of internal reasoning traces and "thought" processes.
- Autonomous: Zero interactions required after startup. The system manages its own lifecycle.
- Observable: Every internal state change and AI decision is logged and viewable.
- Resilient: Designed to recover from the very faults it injects.
- Auditable: Complete traceability from anomaly detection to command execution.