Skip to content

shahid03/SRE_AI_agent

Repository files navigation

SRE AI Agent

An autonomous, provider-agnostic SRE assistant designed to ingest signals, correlate them with a curated knowledge base of playbooks, and execute resolution steps to minimize MTTR.

🚀 Key Features

  • Provider Agnostic: Seamlessly switch between LLMs (Ollama, OpenAI, Anthropic), Observability tools (Prometheus, Coralogix, Datadog), and Vector Databases (Qdrant, Chroma).
  • Factory Architecture: Standardized interfaces for Intelligence, Observability, Knowledge Base, and Storage layers.
  • Production Ready: Kubernetes-native deployment with sidecar support for local LLMs and Vector DBs.
  • Master Configuration: Centralized control via sre_agent_config.yaml.
  • Self-Hosted: Optimized for on-premise deployment using Ollama and MinIO.
  • Intelligent Diagnostics: Built-in anomaly detection with Isolation Forest and forecasting with FB Prophet.

📂 Project Structure

.
├── src/                    # Core logic modules
│   ├── intelligence/       # Reasoning engine (LangGraph)
│   ├── knowledge/          # RAG & Ingestion logic
│   ├── signals/            # APM & Log connectors
│   ├── storage/            # Artifact & Report storage
│   ├── config.py           # Configuration singleton
│   ├── ui/                 # Gradio Dashboard
│   └── documentation/      # Incident & RCA management
├── deploy/                 # Deployment manifests
│   ├── helm/               # Standardized Helm charts
│   └── production.yaml     # K8s Production manifest
├── playbooks/              # 370+ SRE Playbooks (Knowledge Base)
├── scripts/                # Utility & Deployment scripts
├── main.py                 # Application entry point
├── sre_agent_config.yaml   # MASTER CONFIGURATION
├── Dockerfile              # Production container build
└── pyproject.toml          # Dependencies & Metadata

🛠 Setup & Quick Start

1.1 Prerequisites

  • Python 3.10+
  • Docker & Docker Compose
  • Access to an LLM (OpenAI, Anthropic, or Local Ollama)

1.2 Installation

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# or install in editable mode
pip install -e .

1.3 Running the Agent Locally

  1. Start sidecar services (Ollama, Qdrant, MinIO):
    docker-compose up -d
  2. Launch the SRE Command Center:
    python3 main.py
  3. Open the dashboard at: http://localhost:7860

1.4 Local Docker Testing

To test the full containerized setup:

docker build -t sre-ai-agent:latest .
docker run -p 7860:7860 --name sre-agent sre-ai-agent:latest

⚙️ Configuration (sre_agent_config.yaml)

The sre_agent_config.yaml is the master control file for the entire agent.

2.1 Provider Selection

  • Intelligence: ollama, openai, anthropic
  • Observability: prometheus, coralogix, datadog
  • Vector DB: qdrant, chroma

2.2 Sensitive Data

Sensitive keys should be set as environment variables (which override config values):

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • CORALOGIX_API_KEY
  • AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY

🤖 Usage & HITL Workflow

  1. Ask for RCA: Describe an issue in the Gradio UI (e.g., "Why is the Varuna order checkout-api 5xx rate spiking?").
  2. Review Plan: The agent gathers signals, searches playbooks, performs RCA, and proposes a self-healing action.
  3. Approve Action: Click "🚀 Approve" to execute the plan via Kubernetes or AWS.
  4. Deny Action: Click "❌ Deny" to reject the proposal and close the incident manually.

☸️ Kubernetes Deployment

  1. Build the image:
    docker build -t sre-ai-agent:latest .
  2. Deploy the stack:
    ./scripts/deploy.sh

📜 License

MIT License.

About

An autonomous, provider-agnostic SRE assistant designed to ingest signals, correlate them with a curated knowledge base of playbooks, and execute resolution steps to minimize MTTR.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages