AutoSRE is an advanced Autonomous Site Reliability Engineering (SRE) platform designed to detect, diagnose, and automatically remediate failures in microservice-based systems.
By combining deterministic observability, generative AI, and machine learning, AutoSRE acts as an automated Level 1 / Level 2 SRE responder, enabling self-healing infrastructure with minimal human intervention.
AutoSRE automatically:
- Patch source code bugs
- Restart unhealthy containers
- Scale databases and services
- Flush caches
- Recover from configuration drift
All actions are driven by real-time logs, stack traces, and metrics.
Responsible for:
- Service orchestration
- Docker container management
- Safety policy enforcement
- Synthetic traffic verification
- Applying code patches
Runs on:
Port 8080
Contains the AI brain:
- LangGraph repair loops
- Gemini-based Root Cause Analysis (RCA)
- ML anomaly detection
- Retrieval-Augmented Memory (RAG)
- Confidence scoring
Runs on:
Port 8000
Uses Scikit-Learn models:
- Isolation Forest
- Linear Regression
to proactively detect:
- Memory leaks
- CPU spikes
- Slow-burn degradation
- Future failures before outages occur
Powered by ChromaDB.
Stores:
- Historical incidents
- Previous fixes
- Success rates
- Decision confidence
This enables AutoSRE to continuously learn from past outages.
LLM-generated patches are validated using Python's Abstract Syntax Tree (AST) parser before deployment, ensuring syntactic correctness and reducing bad repairs.
AutoSRE ships with intentionally vulnerable microservices for testing and demonstrations.
+---------------------------+
| Prometheus |
+------------+--------------+
|
v
+------------------------------------------------------+
| Control Plane (Java) |
|------------------------------------------------------|
| CrashWatcher |
| Policy Engine |
| Healing Executor |
| Ghost Traffic Verifier |
+----------------------+-------------------------------+
|
| Analyze Failure
v
+------------------------------------------------------+
| Intelligence Plane (Python) |
|------------------------------------------------------|
| RAG Memory (ChromaDB) |
| RCA Engine (Gemini) |
| LangGraph Doctor β Router β Surgeon β Validator |
| ML Anomaly Detection |
+----------------------+-------------------------------+
|
| Repair Decision
v
+------------------------------------------------------+
| Victim Microservices |
+------------------------------------------------------+
godn76-autosre/
β
βββ bootstrap.sh
β
βββ Global-AutoSRE/
β βββ agents/
β βββ ml/
β βββ main.py
β
βββ Local-AutoSRE/
β βββ src/main/java/
β β βββ watcher/
β β βββ executor/
β β βββ policy/
β β βββ verifier/
β βββ pom.xml
β
βββ VICTIMS/
βββ victim-python/
βββ victim-node/
βββ victim-memory-leak/
βββ victim-config-drift/
βββ victim-unfixable/
CrashWatcher continuously monitors Docker logs for:
- Exception
- Error
- Traceback
AutoSRE bundles:
- Stack traces
- Recent logs
- Prometheus metrics
and sends them to the Intelligence Plane.
The AI brain:
- Queries historical incidents from ChromaDB.
- Performs root cause analysis.
- Determines the appropriate action.
Possible actions:
CODE_FIXRESTARTSCALECACHE_FLUSHNO_ACTION
If the failure is code-related:
Doctor Node
β
Router Node
β
Surgeon Node
β
Validator Node
The Validator checks the generated patch using AST before approval.
The Control Plane:
- Applies the patch
- Updates host files
- Restarts containers
using Docker commands.
GhostTrafficVerifier sends synthetic requests to verify service health.
Results are fed back into ChromaDB to improve future decision-making.
The platform includes several deliberately broken services.
Produces:
KeyErrorProduces:
TypeErrorSimulates:
- Memory exhaustion
- Gradual degradation
Simulates:
- Invalid configurations
- Misaligned environments
Represents severe failures such as:
- Database integrity violations
- Corrupted state
These require human intervention.
Required for:
- Victim services
- Prometheus
- Intelligence Plane
Required for:
- Spring Boot Control Plane
Required for:
- FastAPI
- LangGraph
- ML models
Useful if a frontend UI is added later.
Navigate to:
Global-AutoSRE/Copy the environment file:
cp .env.example .envAdd your Gemini API key:
GEMINI_API_KEY=your_gemini_api_key_hereMake the bootstrap script executable:
chmod +x bootstrap.shRun:
./bootstrap.shThe script automatically:
- Verifies dependencies
- Checks port availability
- Builds Spring Boot
- Starts Docker containers
- Launches background services
| Port | Service | Description |
|---|---|---|
| 8080 | Spring Boot Control Plane | Main orchestrator API |
| 8000 | Python Intelligence Plane | AI APIs and ML models |
| 9090 | Prometheus | Metrics and observability |
| 8001-8005 | Chaos Victims | Vulnerable microservices |
Find the Spring Boot process:
ps aux | grep Local-AutoSRETerminate it:
kill <PID>Stop Docker services:
docker compose -f VICTIMS/docker-compose.yml downdocker compose -f Global-AutoSRE/docker-compose.yml downAutoSRE contains built-in guardrails to avoid unstable behavior.
Repeated crashes are throttled to prevent repair loops.
Services may be restarted at most:
3 times per policy window
Fully autonomous healing.
Detect β Diagnose β Repair β Verify
Human approval is required before execution.
AutoSRE acts solely as an advisor.
No actions are performed automatically.
- Java 21
- Spring Boot
- Maven
- Docker
- Python 3.10+
- FastAPI
- LangGraph
- Google Gemini
- ChromaDB
- Scikit-Learn
- Prometheus
- Docker
- Docker Compose
- Isolation Forest
- Linear Regression
AutoSRE aims to transform traditional monitoring systems into autonomous reliability platforms that can:
- Detect failures
- Understand root causes
- Repair systems
- Verify recovery
- Learn from every incident
ultimately enabling self-healing microservice infrastructures.
MIT License
AutoSRE β Your Autonomous SRE Engineer.