AI-Powered GitHub Code Review Platform
Metis is an AI-powered GitHub code reviewer built as a GitHub App. It listens to pull request webhooks, analyzes changes in isolated sandboxes, and posts actionable findings directly on PRs.
Production-grade monorepo:
- Backend: Python, FastAPI, Celery, PostgreSQL, Redis, AI Agents
- Frontend: React 19, TypeScript, Vite (Rolldown), Tailwind v4, Neo-brutalist UI
- Agent Runtime: Daytona sandbox + tool-augmented LLM agents
- Multi-LLM Support: LiteLLM (Vertex AI, OpenAI, Anthropic, Mistral)
- Autonomous agents analyze PRs in isolated sandboxes
- Progressive inline findings posted directly on diff lines
- Multi-provider LLM support - switch providers with one env var
- Configurable sensitivity - from INFO to CRITICAL findings
- Category tagging - SECURITY, PERFORMANCE, BUG, STYLE, etc.
- Launch autonomous coding agents from GitHub issues
- Agents write code, run tests, commit, and create PRs
- Track progress in real-time with metrics and timelines
- Full conversation and tool trace persistence
- Multi-repository support - one GitHub App, many repos
- Per-repository configuration - custom instructions, ignore patterns
- GitHub OAuth integration - secure user authentication
- Review metrics and trends
- AI-detected issues table with filters
- Agent run history and performance metrics
- Real-time progress monitoring
- Architecture
- Repository Structure
- Quick Start
- Documentation
- Development
- Testing and Quality
- Deployment
- Security
- Contributing
- License
┌─────────────┐
│ GitHub │
│ Webhooks │
└──────┬──────┘
│ Pull Request Event
▼
┌───────────────────────────────────┐
│ FastAPI Backend │
│ ┌─────────────────────────────┐ │
│ │ Webhook Handler │ │
│ │ - Verify signature │ │
│ │ - Create Review (PENDING) │ │
│ │ - Queue Celery tasks │ │
│ │ - Return 202 Accepted │ │
│ └─────────────┬───────────────┘ │
│ │ │
└────────────────┼──────────────────┘
│
▼
┌───────────────┐
│ Redis Queue │
└───────┬───────┘
│
▼
┌─────────────────────────────────────┐
│ Celery Worker │
│ ┌───────────────────────────────┐ │
│ │ AI Agent System │ │
│ │ │ │
│ │ 1. Create Daytona Sandbox │ │
│ │ 2. Clone PR Branch │ │
│ │ 3. Run Agent Loop: │ │
│ │ - Plan (LLM) │ │
│ │ - Execute Tools │ │
│ │ - Post Findings │ │
│ │ - Evaluate │ │
│ │ 4. Post Final Review │ │
│ │ 5. Cleanup Sandbox │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────┘
- GitHub sends webhook for PR changes (opened, synchronize, reopened)
- Backend validates signature and records pending review
- Celery queues agent tasks for review and summary generation
- Agent executes in sandbox with controlled tool access:
- Reads files and analyzes code
- Runs tests and linters
- Posts inline findings progressively
- Generates final review summary
- Findings posted to GitHub as review comments and persisted to database
- Frontend dashboards expose progress, analytics, and repository controls
Tools Available (23 total):
- File Operations (6): read, list, search, replace, create, delete
- Git Operations (8): status, branches, create_branch, checkout, add, commit, push, pull
- Process Execution (4): command, code, tests, linter
- Review Posting (2): post_inline_finding, post_file_finding
- Completion (3): finish_review, finish_task, finish_summary
Switch AI providers with a single environment variable:
# Vertex AI (Google)
MODEL_NAME=vertex_ai/gemini-3-flash-preview
# OpenAI
MODEL_NAME=gpt-4o
# Anthropic
MODEL_NAME=claude-3-5-sonnet-20241022
# Mistral
MODEL_NAME=mistral/mistral-large-latestNo code changes required. LiteLLM handles provider differences.
metis/
├── backend/ # FastAPI backend (Python)
│ ├── app/
│ │ ├── api/ # API route handlers
│ │ ├── core/ # Configuration & infrastructure
│ │ ├── db/ # Database layer
│ │ ├── models/ # SQLAlchemy ORM models
│ │ ├── repositories/ # Repository pattern (data access)
│ │ ├── services/ # Business logic
│ │ ├── agents/ # AI Agent System
│ │ │ ├── base.py # BaseAgent
│ │ │ ├── loop.py # AgentLoop orchestrator
│ │ │ ├── implementation/ # ReviewAgent, BackgroundAgent, SummaryAgent
│ │ │ ├── prompts/ # System prompts
│ │ │ ├── sandbox/ # Daytona integration
│ │ │ └── tools/ # 23 tools
│ │ ├── schemas/ # Pydantic models
│ │ ├── tasks/ # Celery background tasks
│ │ └── utils/ # Utilities
│ ├── alembic/ # Database migrations
│ ├── tests/ # Test suite
│ └── README.md # Backend documentation
│
├── frontend/ # React frontend (TypeScript)
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── ui/ # shadcn/ui components
│ │ │ ├── dashboard/ # Dashboard components
│ │ │ ├── landing/ # Landing page sections
│ │ │ └── issues/ # Issue & agent components
│ │ ├── contexts/ # React Context providers
│ │ ├── pages/ # Route pages
│ │ ├── lib/ # Utilities (API client, icons)
│ │ └── types/ # TypeScript definitions
│ └── README.md # Frontend documentation
│
├── static/ # Static assets
│ └── metis-logo.svg
│
├── docker-compose.dev.yml # Development infrastructure
├── CONTRIBUTING.md # Contribution guidelines
├── CODE_OF_CONDUCT.md # Code of conduct
├── SECURITY.md # Security policy
└── README.md # This file
- Python 3.10+
- Node.js 20+ with pnpm
- Docker & Docker Compose
- GitHub App credentials
- Daytona Account (https://app.daytona.io)
- UV package manager
# Start PostgreSQL, Redis, pgAdmin, Redis Insight
docker-compose -f docker-compose.dev.yml up -dServices:
- PostgreSQL:
localhost:5432 - Redis:
localhost:6379 - pgAdmin:
http://localhost:5050([email protected] / admin)
cd backend
# Install dependencies
uv sync
# Configure environment
cp .env.example .env
# Edit .env with your credentials
# Run migrations
alembic upgrade head
# Start backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000# Start Celery worker
cd backend
celery -A app.core.celery_app worker --loglevel=infoOptional - Celery monitoring:
# Start Flower
celery -A app.core.celery_app flower --port=5555
# Visit http://localhost:5555Backend available at: http://localhost:8000
cd frontend
# Install dependencies
pnpm install
# Start dev server
pnpm devFrontend available at: http://localhost:5173
Quick summary:
- Create GitHub App with required permissions
- Generate and download private key (
.pemfile) - Set webhook URL to
http://your-domain/webhooks/github - Add credentials to backend
.env
- Visit frontend:
http://localhost:5173 - Click "Login with GitHub" - redirects to GitHub OAuth
- Authorize the app - redirected back to dashboard
- Sync repositories - on Repositories page, click "Sync from GitHub"
- Enable reviews - toggle repositories you want Metis to review
- Open a PR on an enabled repository - Metis automatically reviews it!
- Backend README - Complete backend architecture, API reference, agent system
- Frontend README - React app structure, components, state management
Backend:
cd backend
# Code quality
ruff check . # Lint
ruff format . # Format
mypy app/ # Type check
pytest # Run tests
# Database
alembic revision --autogenerate -m "description"
alembic upgrade head
# Pre-commit hooks
pre-commit install
pre-commit run --all-filesFrontend:
cd frontend
# Code quality
pnpm lint # ESLint
pnpm format # Prettier
pnpm build # Type check + build
# Development
pnpm dev # Dev server with HMRBackend:
- FastAPI for async API endpoints
- Celery for background task processing
- SQLAlchemy 2.0 for async ORM
- Alembic for database migrations
- Redis for task queue and caching
- LiteLLM for multi-provider LLM access
- Daytona for isolated code execution
Frontend:
- React 19 with React Compiler
- TypeScript for type safety
- Vite (Rolldown) for fast builds
- Tailwind CSS v4 for styling
- shadcn/ui for component library
- React Router v7 for routing
GitHub Actions workflows:
- Backend: Ruff, MyPy, Pytest (on push)
- Frontend: ESLint, TypeScript, build (on push)
- CodeQL: Security scanning
Backend (.env):
# Database
DATABASE_URL=postgresql+asyncpg://...
# GitHub
GITHUB_APP_ID=...
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GITHUB_WEBHOOK_SECRET=...
GITHUB_SECRET_KEY_PATH=./app.private-key.pem
# LLM Provider
MODEL_NAME=vertex_ai/gemini-3-flash-preview
VERTEX_PROJECT=...
VERTEX_LOCATION=global
# Daytona
DAYTONA_API_KEY=...
DAYTONA_TARGET=euFrontend (.env.production):
VITE_API_URL=https://api.metis.example.com- Webhook signature verification is enforced for GitHub events.
- OAuth tokens are encrypted at rest.
- Session auth uses HTTP-only cookies and refresh flow.
If you discover a vulnerability, open a private security report or contact the maintainer directly until SECURITY.md is finalized.
We welcome contributions! Please read our contributing guidelines first.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes following our code standards
- Run quality checks:
- Backend:
ruff check . && mypy app/ && pytest - Frontend:
pnpm lint && pnpm format:check && pnpm build
- Backend:
- Commit your changes:
git commit -m 'feat: add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see LICENSE file for details.
If you find Metis useful, please consider starring the repository!
Made with ❤️ for better code reviews

