Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AntiGravity DevOps Assistant

An AI-driven platform that predicts infrastructure failures, identifies root causes, and automatically executes self-healing actions on Kubernetes clusters.

License Python FastAPI Next.js

Getting Started

The Fast Way:

./start-dev.ps1

For detailed instructions, manual setup, and Docker options, see QUICKSTART.md.

Verifying

Run the end-to-end test suite:

python scripts/test_scenario.py

See TESTING.md for more details.

Overview

AntiGravity DevOps Assistant is an intelligent platform that combines machine learning, rule-based analysis, and automated remediation to maintain Kubernetes workloads proactively. It reduces manual SRE work by predicting failures before they occur and executing safe self-healing actions autonomously.

Key Features

  • Predictive Monitoring: ML models predict incidents 0-5 minutes before they occur
  • Rule-Based RCA: Automated root cause analysis using decision trees and pattern matching
  • Self-Healing: Automated Kubernetes actions with built-in safety constraints
  • Real-Time Dashboard: Beautiful brown-themed UI with live updates
  • 100% Open Source: No vendor lock-in, runs entirely on free tools

Architecture

graph TD
    subgraph "Infrastructure"
        K8s[Kubernetes Cluster]
        Prom[Prometheus]
        OpenS[OpenSearch]
        Postgres[(PostgreSQL)]
        Redis[(Redis)]
    end

    subgraph "Core Services"
        Obs[Observability Service]
        ML[ML Prediction Service]
        Analysis[Analysis Service]
        Heal[Self-Healing Engine]
        Gateway[API Gateway]
    end

    Fe[Frontend Dashboard]

    %% Data Flow
    K8s -->|Metrics| Prom
    K8s -->|Logs| OpenS
    
    Prom -->|Scrape| Obs
    OpenS -->|Query| Obs
    
    Obs -->|Features| ML
    ML -->|Prediction| Analysis
    Obs -->|Anomalies| Analysis
    
    Analysis -->|Action Plan| Heal
    Heal -->|Execute| K8s
    
    %% API Flow
    Fe -->|REST/WS| Gateway
    Gateway --> Obs
    Gateway --> ML
    Gateway --> Analysis
    Gateway --> Heal
    
    %% Storage
    Obs --> Postgres
    Analysis --> Postgres
    Heal --> Postgres
    Obs --> Redis
    ML --> Redis
Loading

Microservices

  1. Observability Service: Collects metrics (Prometheus) and logs (OpenSearch)
  2. ML Prediction Service: Runs RandomForest & LSTM models for failure prediction
  3. Analysis Service: Rule-based RCA and remediation planning
  4. Self-Healing Engine: Executes safe Kubernetes actions
  5. API Gateway: Single entry point with WebSocket support

Configuration

  1. Environment Variables Copy the example configuration to create your local secrets file:
    cp .env.example .env
    Edit .env to set your own passwords and ports. Use the default values for a quick start.

Tech Stack

Backend: FastAPI, Python 3.11, PyTorch, scikit-learn, SQLAlchemy, Celery
Frontend: Next.js 14, TypeScript, TailwindCSS, shadcn/ui, Recharts
Infrastructure: K3d (Kubernetes), Prometheus, OpenSearch, PostgreSQL, Redis
Monitoring: Grafana, Fluent Bit

Project Structure

devops-assistant/
├── services/
│   ├── observability/       # Metrics + logs collection
│   ├── ml-prediction/       # ML models and inference
│   ├── analysis/            # Rule-based RCA
│   ├── self-healing/        # Kubernetes automation
│   └── api-gateway/         # API routing + WebSocket
├── frontend/                # Next.js dashboard
├── k8s/                     # Kubernetes manifests
├── scripts/                 # Setup and deployment scripts
├── migrations/              # Database migrations
└── docker-compose.yml       # Local development

Usage

Dashboard Pages

  • Home: Cluster health overview with real-time metrics
  • Predictions: ML prediction timeline and confidence scores
  • Logs: Advanced search and filtering
  • Actions: Timeline of executed self-healing actions
  • Explainability: Root cause analysis details

API Endpoints

# Get current cluster metrics
curl http://localhost:8000/api/v1/metrics/current

# Get predictions
curl http://localhost:8000/api/v1/predictions

# Get executed actions
curl http://localhost:8000/api/v1/actions

# WebSocket for real-time updates
wscat -c ws://localhost:8000/ws/events

Safety Features

  • Namespace Protection: Never operates on kube-system
  • Rate Limiting: Max 3 actions per hour
  • Confidence Threshold: Auto-execution requires ≥75% confidence
  • Audit Logging: All actions logged with timestamp and reasoning

Testing

# Run all tests
make test

# Run specific service tests
cd services/ml-prediction && pytest

# Load testing
make load-test

Documentation

Success Metrics

  • Prediction Accuracy: ≥75%
  • Prediction Latency: <1 second
  • Correct Remediation: ≥80%
  • Dashboard Load Time: <1 second
  • Autonomous Resolution: ≥70% of incidents

Roadmap

v1.0 (Current)

  • K3d cluster with sample apps
  • ML-based failure prediction
  • Rule-based RCA
  • Automated self-healing
  • Real-time dashboard

v2.0 (Future)

  • Reinforcement learning for remediation
  • Multi-cluster support
  • LLM-driven auto-scaling
  • Discord/Slack integration
  • Vector database for log anomalies

License

MIT License - see LICENSE

Acknowledgments

Built with love using amazing open-source tools: Kubernetes, FastAPI, Next.js, PyTorch, and many more.


Made by a team of AI-curious engineers

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages