Clone a repo. Find the bug. Patch it. Verify it. Open a PR. Automatically.
Project Olympus is a fully autonomous Site Reliability Engineering (SRE) agent that detects, patches, validates, and deploys code fixes β without human intervention. Point it at any GitHub repository, and it will:
- Clone the repository into an isolated workspace
- Localize the failing file autonomously via
pytesttraceback analysis - Generate a patch using a cascading multi-LLM fallback chain (Groq β OpenRouter β Gemini)
- Gate the patch through a static security scanner (Semgrep) before touching any real file
- Validate the fix by running the full test suite inside a clean Docker sandbox
- Learn from each failure β past bad patches are stored in a vector memory to prevent oscillation
- Commit the verified patch to a new branch with a Sigstore cryptographic attestation
- Open a GitHub Pull Request with a full summary β automatically
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Next.js Frontend (:3000) β
β Control Terminal Β· Live Log Console Β· Pipeline Graph Β· Diff View β
βββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ¬βββββββββββββββ
β HTTP / SSE β GitHub Webhook
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend (:8000) β
β /api/v1/trigger Β· /api/v1/stream/{run_id} Β· /github-webhook β
β Workspace Manager Β· Fault Localizer Β· Run Logger (SSE bus) β
βββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β invoke(initial_state)
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LangGraph StateGraph Agent Engine β
β β
β ββββββββββββββββββββ patch ββββββββββββββββββββ β
β β Patch Agent β βββββββββββΊ β Validation Agent β β
β β β β β β
β β Β· RAG retrieval β βββ retry βββ Β· Docker pytest β β
β β Β· LLM fallback β β Β· Root-cause β β
β β Β· SAST gate β β isolation β β
β β Β· Git commit β β Β· Memory write β β
β β Β· Sigstore sign β ββββββββββ¬ββββββββββ β
β ββββββββββββββββββββ β β
β PASS βββΌβββΊ GitHub PR β
β max att ββ΄βββΊ Human Gate β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ChromaDB SQLite Artifacts
(RAG + Memory) (patch_logs) (.diff + .sigstore)
| Feature | Description |
|---|---|
| π€ Autonomous Fault Localization | Runs pytest, parses tracebacks, and pinpoints the failing source file automatically |
| π§ Dual RAG System | Tree-sitter AST-chunked code + ChromaDB for semantic code retrieval |
| π Anti-Oscillation Memory | Past failed patches are vectorized and injected as "don't repeat" lessons |
| β‘ Multi-LLM Fallback | Groq β OpenRouter β Gemini β never blocked by a single rate limit |
| π‘οΈ SAST Hard Gate | Semgrep scans proposed code in a temp file; bad patches never touch real files |
| π³ Docker Sandboxed Validation | Tests run in a clean python:3.11-slim container β no host contamination |
| π Sigstore Attestation | Every committed patch is cryptographically signed with keyless Sigstore OIDC |
| π‘ Real-Time SSE Streaming | Live log output streamed from agent nodes to the browser as the pipeline runs |
| π GitHub PR Automation | Verified patches are automatically pushed and opened as pull requests |
| π Webhook Integration | Listens for GitHub events to trigger autonomous repair pipelines |
Backend
- FastAPI + Uvicorn β async REST API & SSE streaming
- LangGraph β typed
StateGraphagent orchestration - LangChain β LLM integration (Groq, OpenRouter, Gemini)
- ChromaDB β local persistent vector store
- Tree-sitter β AST-level code chunking & symbol extraction
- Semgrep β static application security testing
- Sigstore β keyless cryptographic patch attestation
- PyGithub β GitHub PR automation
- GitPython β local git operations
- OpenTelemetry β distributed trace spans
- SQLite β lightweight relational audit log
Frontend
- Next.js 16 + React 19 + TypeScript
- TailwindCSS v4 β utility-first styling
- lucide-react β icon set
- Server-Sent Events (SSE) β real-time log streaming
Infrastructure
- Docker β isolated
olympus-sandboxtest container
| Requirement | Version | Notes |
|---|---|---|
| Python | 3.11+ | Backend runtime |
| Node.js | 18+ | Frontend runtime |
| Docker | Latest | Required for sandbox validation |
| Git | Any | Repo cloning & patch management |
| Semgrep | Latest | Optional β SAST gate gracefully degrades |
git clone https://github.com/Aviral445/Olympus-Agent.git
cd Olympus-Agent/olympus-agentCreate a .env file in the olympus-agent/ directory:
# LLM Providers (at least one required β Groq is recommended as primary)
GROQ_API_KEY=your_groq_api_key_here
OPENROUTER_API_KEY=your_openrouter_api_key_here
GEMINI_API_KEY=your_gemini_api_key_here
# GitHub Integration (required for PR automation)
GITHUB_TOKEN=your_github_personal_access_token
GITHUB_REPO=owner/repo-nameGet your API keys:
- Groq: console.groq.com β free tier, very fast
- OpenRouter: openrouter.ai/keys β routes to 100+ models
- Gemini: aistudio.google.com β Google AI Studio
- GitHub Token: github.com/settings/tokens β needs
reposcope
cd backend
docker build -t olympus-sandbox .cd olympus-agent/backend
# Create and activate virtual environment (optional but recommended)
python -m venv venv
# Windows (PowerShell):
.\venv\Scripts\Activate.ps1
# macOS / Linux:
source venv/bin/activate
# Install all backend Python dependencies
pip install -r requirements.txt
# Start the FastAPI backend server
python src/server.py
# Backend server runs at http://localhost:8000cd olympus-agent/frontend
# Create local environment config
cp .env.local.example .env.local
# Add your GitHub OAuth app credentials to .env.local:
# GITHUB_CLIENT_ID=your_id
# GITHUB_CLIENT_SECRET=your_secret
# Install Node dependencies
npm install
# Start Next.js development server
npm run dev
# Frontend UI available at http://localhost:3000Navigate to http://localhost:3000 and you will see the Olympus Control Terminal.
- Enter a GitHub repository URL (e.g.
https://github.com/username/repo) - Optionally specify a target file β leave blank for autonomous fault detection
- Set max repair attempts (slider, 1β200)
- Click "Clone & Trigger Autonomous Fix"
- Watch the Live Log Console and Pipeline Graph update in real time
- On success, view the Diff Viewer and click the auto-generated PR link
# Trigger a repair pipeline
curl -X POST http://localhost:8000/api/v1/trigger \
-H "Content-Type: application/json" \
-d '{
"repo_url": "https://github.com/username/your-repo",
"target_file": "src/app.py",
"max_attempts": 10
}'
# Stream logs via SSE
curl -N http://localhost:8000/api/v1/stream/<run_id>Configure a GitHub repository webhook:
- Payload URL:
http://your-server:8000/api/v1/github-webhook - Content type:
application/json - Events: Push, Issues, or any event you would like to trigger repairs
| Field | Type | Required | Description |
|---|---|---|---|
repo_url |
string | No | Full GitHub repo URL to clone |
repo_name |
string | No | owner/repo format |
target_file |
string | No | Relative path to buggy file. Leave blank to auto-detect |
max_attempts |
int | No | Max repair loop iterations (default: 5, max: 200) |
bug_description |
string | No | Human-readable context |
Response: { "status": "initiated", "run_id": "uuid", "message": "..." }
SSE stream. Emits two event types:
{ "type": "log", "message": "..." }β per-action log line{ "type": "complete", "result": "PASS|FAIL", "diff": "..." }β final result
Returns { "status": "healthy", "service": "Project Olympus SRE Engine" }
Patch Agent Validation Agent
ββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββ
1. Read target file content 1. docker run olympus-sandbox
2. Index codebase (Tree-sitter) pytest tests/ --tb=short
3. RAG: fetch top-3 code chunks
4. Memory: fetch top-2 failure 2. exit 0 β record PASS
lessons (anti-oscillation) β open GitHub PR
5. Build LLM prompt
6. Groq β OpenRouter β Gemini 3. exit 1 β record FAIL
7. Write to .olympus_tmp β isolate root-cause file
8. Semgrep SAST scan βββ FAIL: discard β retry patch agent
9. Atomic os.replace to target file
10. git checkout -B olympus/patch-N
11. git add + commit
12. sigstore sign .diff
olympus-agent/
βββ .env # API keys and config
βββ frontend/ # Next.js 16 + TypeScript + Tailwind
β βββ app/page.tsx # Main UI: terminal, logs, graph, diff
β βββ components/
β βββ graph-flow/ # AgentGraph pipeline step visualizer
β βββ diff-viewer/ # Git diff renderer
β βββ telemetry/ # OTel metrics display
βββ backend/
βββ Dockerfile # olympus-sandbox (python:3.11-slim + pytest)
βββ artifacts/ # Signed .diff and .sigstore.json bundles
βββ workspaces/ # Runtime-cloned external repos
βββ database/db.py # SQLite schema + logging
βββ rag/
β βββ code_rag.py # Tree-sitter AST chunking + ChromaDB indexer
β βββ patch_memory.py # Failure memory + anti-oscillation
βββ src/
βββ server.py # FastAPI entrypoint + pipeline runner
βββ agents/core_graph.py # LangGraph StateGraph
βββ utils/
βββ attestation.py # Sigstore diff signing
βββ git_manager.py # Branch, diff, commit
βββ github_pr.py # PyGithub PR creation
βββ run_logger.py # Thread-safe SSE log bus
βββ sandbox.py # Docker subprocess executor
βββ sast_scanner.py # Semgrep wrapper
βββ telemetry.py # OpenTelemetry spans
| Variable | Required | Description |
|---|---|---|
GROQ_API_KEY |
Recommended | Primary LLM (llama-3.3-70b-versatile) |
OPENROUTER_API_KEY |
Optional | Tier-2 LLM fallback (openrouter/auto) |
GEMINI_API_KEY |
Optional | Tier-3 LLM fallback (gemini-2.0-flash) |
GITHUB_TOKEN |
For PRs | PAT with repo scope |
GITHUB_REPO |
Optional | Default repo if not in webhook payload |
- Multi-file patch support β fix bugs spanning multiple source files
- Streaming diff preview β show incremental diffs as they are generated
- Replay mode β re-run any historical run from the SQLite audit log
- Plugin LLM providers β Anthropic Claude, Mistral, local Ollama
- Docker Compose setup β single-command full-stack launch
- Web dashboard for run history β searchable table with diffs and outcomes
- Kubernetes Helm chart β production SRE deployment manifests
Contributions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feat/your-feature-name - Make your changes with tests where applicable
- Commit with a clear message:
git commit -m "feat: add multi-file patch support" - Push and open a Pull Request
Please open an issue first for major feature proposals.
This project is licensed under the MIT License. See LICENSE for details.
Built with autonomy and security in mind.
Project Olympus β Because bugs should not wait for humans.