Autonomous SRE agents that watch your services, detect anomalies, and generate blameless postmortems
Project description
DevOps Sentinel
Autonomous SRE Agent System - Reduce Mean Time to Detection (MTTD) from minutes to under 10 seconds.
Features
- Continuous Monitoring - Health checks at configurable intervals
- Multi-Agent Analysis - CrewAI-powered investigation and root cause analysis
- AI Postmortems - Automated incident documentation
- Real-time Dashboard - WebSocket-powered live updates
- CLI Interface - Similar to Gemini CLI
- Pre-Deploy Linting - Code quality checks before production
- Privacy-First - No telemetry, transparent data handling
Architecture
┌─────────────────────────────────────────────────────────────┐
│ DevOps Sentinel │
├─────────────────────────────────────────────────────────────┤
│ CLI (Typer) │ API (FastAPI) │ Dashboard (WebSocket) │
├─────────────────────────────────────────────────────────────┤
│ Monitoring Orchestrator │
├─────────────────────────────────────────────────────────────┤
│ Watcher Agent │ Triage Agent │ Investigator │ Strategist │
├─────────────────────────────────────────────────────────────┤
│ Health Check │ Slack Alert │ Log Analysis │ DB Health │
├─────────────────────────────────────────────────────────────┤
│ Supabase (Persistence) │ OpenRouter (LLM) │ Slack │
└─────────────────────────────────────────────────────────────┘
Installation
# Clone the repository
git clone https://github.com/yourusername/devops-sentinel.git
cd devops-sentinel
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
Quick Start
# Initialize configuration
sentinel init
# Monitor a service
sentinel monitor https://api.example.com/health
# Start dashboard
sentinel serve
CLI Commands
| Command | Description |
|---|---|
sentinel init |
Interactive configuration setup |
sentinel monitor <url> |
Monitor a service URL |
sentinel status |
Show monitored services |
sentinel incidents |
List recent incidents |
sentinel postmortem <id> |
View incident postmortem |
sentinel serve |
Start dashboard server |
sentinel lint <path> |
Run pre-deploy checks |
Configuration
Create a .env file or run sentinel init:
OPENROUTER_API_KEY=your_key_here
DEFAULT_MODEL=google/gemini-pro
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your_anon_key
SLACK_WEBHOOK_URL=https://hooks.slack.com/...
Docker Deployment
# Build and run
docker-compose up -d
# View logs
docker-compose logs -f sentinel
How It Works
- Watcher Agent continuously monitors service health endpoints
- On failure, First Responder sends a Slack alert
- Investigator analyzes logs, deployments, and database status
- Strategist creates a prioritized action plan
- AI generates a structured postmortem saved to Supabase
Privacy
- All data stays local or in YOUR Supabase instance
- No telemetry or external data collection
- Use
--privacyflag to see exactly what data is processed - OpenRouter calls only contain health check context (no PII)
Supabase Schema
-- Run these in your Supabase SQL editor
CREATE TABLE services (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
url TEXT NOT NULL,
check_interval INTEGER DEFAULT 10,
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMPTZ DEFAULT now()
);
CREATE TABLE incidents (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
service_id UUID REFERENCES services(id),
status TEXT DEFAULT 'detecting',
detected_at TIMESTAMPTZ DEFAULT now(),
resolved_at TIMESTAMPTZ,
mttd_seconds FLOAT,
postmortem TEXT
);
CREATE TABLE health_checks (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
service_id UUID REFERENCES services(id),
status_code INTEGER,
response_time_ms FLOAT,
is_healthy BOOLEAN,
checked_at TIMESTAMPTZ DEFAULT now()
);
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
devops_sentinel-0.1.0.tar.gz
(116.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devops_sentinel-0.1.0.tar.gz.
File metadata
- Download URL: devops_sentinel-0.1.0.tar.gz
- Upload date:
- Size: 116.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48f84da25cbabcdc35698a1f3e25e2a6e203ee12f8468475ba0b8f68de42af92
|
|
| MD5 |
e7f18422f5f9287e85c4fc7fccdfdcf4
|
|
| BLAKE2b-256 |
836032cb5e3e9d2a109c7c9dbb34bc73ab8f5d1045b7e0836101043125500bd9
|
File details
Details for the file devops_sentinel-0.1.0-py3-none-any.whl.
File metadata
- Download URL: devops_sentinel-0.1.0-py3-none-any.whl
- Upload date:
- Size: 130.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87fb7dfdf907360840d0e615122f581ecf6fcbb1c402174b31986a8972f28341
|
|
| MD5 |
30cb175507b79ea0ab7b95215b280d84
|
|
| BLAKE2b-256 |
d4061a211024ae102edf366874f71d2b898248cfccfd3048e00fa0dc63baea40
|