Capability
Description
π
GitHub App Integration
Webhook-driven β installs on any repo, posts reviews as inline comments with approve/reject
π³
Multi-language AST
Tree-sitter parsing for Python, JavaScript, TypeScript β understands code structure, not just text
π§
RAG-powered Context
ChromaDB vector store retrieves related code + coding standards for context-aware reviews
π³
Docker Sandbox
Runs linters, type checkers, and tests in isolated containers with CPU/memory limits
π
Security Scanning
Bandit + Semgrep + regex secret detection β catches vulnerabilities before merge
π
Bug Prediction
Heuristic-based risk scoring (entropy, error handling removal, sensitive file changes)
π©Ή
Auto-generated Patches
Produces git apply-ready unified diffs and GitHub suggestion blocks
π
Review Memory
Learns from past reviews β tracks author patterns, detects false positives, avoids repetition
π
MCP Server
Model Context Protocol interface for IDE integration and extensible tool access
β‘
Async Processing
Celery + Redis task queue β reviews run in background, webhook returns instantly
Option 1 β Full stack with Docker Compose (recommended)
git clone https://github.com/HoneyTyagii/Autonomous-Code-Review-Agent.git
cd Autonomous-Code-Review-Agent
cp .env.example .env # Fill in your API keys and GitHub App credentials
docker compose up -d --build
docker compose run --rm migrations
Option 2 β Local development
python -m venv .venv
.venv\S cripts\a ctivate # Windows
# source .venv/bin/activate # Linux/Mac
pip install -e " .[dev]"
python -m code_review_agent.main
ββββββββββββββββββββ
β PR Opened β GitHub webhook fires
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Fetch Diff β Parse unified diff β structured hunks with line mapping
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Understand Repo β Tree-sitter AST + RAG retrieval of related code
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Load Standards β Vector search for applicable coding rules
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Static Analysis β ruff, mypy, eslint in Docker sandbox
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Security Scan β Bandit + Semgrep + secret detection
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Bug Prediction β Heuristic risk scoring on the diff
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β LLM Review β GPT-4o / Claude with structured JSON output
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Generate Fixes β Auto-patches as unified diffs
ββββββββββ¬ββββββββββ
βΌ
ββββββββββββββββββββ
β Post to GitHub β Inline comments + approve / request changes
ββββββββββββββββββββ
Layer
Technology
API
FastAPI, uvicorn, Pydantic
LLM
OpenAI GPT-4o, Anthropic Claude (pluggable via factory)
Embeddings
OpenAI text-embedding-3-small / Sentence Transformers
Vector Store
ChromaDB (cosine similarity, per-repo collections)
AST
Tree-sitter (Python, JavaScript, TypeScript grammars)
Database
PostgreSQL 16 + SQLAlchemy 2.0 (async) + Alembic migrations
Queue
Celery + Redis (separate broker/result queues)
Sandbox
Docker SDK (resource-limited, read-only, network-isolated)
Security
Bandit, Semgrep, regex-based secret detection
GitHub
App JWT auth, installation tokens, webhook HMAC verification
Observability
structlog (JSON in prod, colored console in dev)
MCP
Model Context Protocol server (stdio transport)
src/code_review_agent/
βββ main.py FastAPI app + lifespan management
βββ config.py Pydantic settings (all env vars)
βββ logging.py Structured logging (structlog)
β
βββ api/ HTTP layer
β βββ webhooks.py GitHub webhook receiver
β βββ webhook_security.py HMAC-SHA256 signature verification
β βββ health.py Liveness + readiness probes
β
βββ github/ GitHub integration
β βββ auth.py JWT + installation token auth
β βββ client.py Async API client with retry + rate limits
β βββ diff_parser.py Unified diff β structured hunks
β βββ pr_fetcher.py Assembles complete PR context
β
βββ analysis/ Code analysis
β βββ ast_parser.py Tree-sitter multi-language parsing
β βββ security_scanner.py Bandit + Semgrep + secrets
β βββ bug_predictor.py Heuristic risk scoring
β
βββ core/ Review engine
β βββ engine.py Pipeline orchestrator (whole-PR / per-file)
β βββ prompts.py LLM prompt construction
β βββ schemas.py Structured output JSON schemas
β βββ patch_generator.py Auto-fix generation (unified diff)
β
βββ llm/ LLM abstraction
β βββ base.py Interface + Message/Response types
β βββ openai_provider.py OpenAI with retry + JSON mode
β βββ anthropic_provider.py Claude with system message handling
β βββ factory.py Provider factory from config
β
βββ rag/ Retrieval-Augmented Generation
β βββ embeddings.py Multi-provider embedding service
β βββ vector_store.py ChromaDB client wrapper
β βββ indexer.py AST-aware code chunking + batch indexing
β βββ retriever.py Semantic context retrieval
β βββ standards_loader.py Coding standards ingestion (Markdown β rules)
β
βββ sandbox/ Isolated execution
β βββ docker_sandbox.py Docker container management
β βββ analysis_runner.py Linter/test orchestration
β
βββ memory/ Learning system
β βββ review_memory.py Persistence + semantic search over history
β βββ learning.py Author profiling + false positive detection
β
βββ tasks/ Background processing
β βββ celery_app.py Celery configuration + routing
β βββ review_tasks.py Async review pipeline + GitHub posting
β
βββ models/ Database ORM
β βββ repository.py Repository tracking model
β βββ review.py Review + ReviewComment models
β
βββ db/ Database layer
β βββ session.py Async engine + session factory
β
βββ mcp/ Model Context Protocol
βββ server.py JSON-RPC server
βββ tools.py 6 exposed tools
βββ transport.py Stdio transport for IDEs
make install # Install in dev mode
make test # Run pytest with coverage
make check # Lint + typecheck
make format # Auto-format with ruff
make dev # Full dev stack (hot-reload + Flower monitoring)
Command
Description
make dev
Start full dev stack with hot-reload
make test
Run pytest with coverage
make lint
Run ruff linter
make typecheck
Run mypy
make migrate
Run database migrations
make psql
Connect to PostgreSQL
make logs
Tail all service logs
make clean
Remove build artifacts
The agent exposes a Model Context Protocol server for IDE integration:
python -m code_review_agent.mcp.transport
Exposed tools:
Tool
Description
review_diff
Review a code diff with full LLM pipeline
check_security
Run security scans on code
query_standards
Find relevant coding standards
search_past_reviews
Semantic search over review history
generate_patch
Generate a fix as unified diff
predict_bugs
Heuristic bug risk analysis
All settings via environment variables (see .env.example ):
Variable
Description
Default
GITHUB_APP_ID
GitHub App numeric ID
β
GITHUB_WEBHOOK_SECRET
Webhook HMAC secret
β
LLM_PROVIDER
openai or anthropic
openai
OPENAI_MODEL
Model for reviews
gpt-4o
ENABLE_SECURITY_SCAN
Run Bandit + Semgrep
true
SANDBOX_TIMEOUT
Docker sandbox timeout (s)
300
SANDBOX_MEMORY_LIMIT
Container memory cap
512m
DATABASE_URL
PostgreSQL connection
postgresql+asyncpg://...
REDIS_URL
Redis connection
redis://localhost:6379/0
Domain
What's showcased
AI/ML Engineering
LLM orchestration, RAG pipelines, embeddings, structured output, prompt engineering
Backend Development
Async Python, FastAPI, SQLAlchemy, Celery, Redis, PostgreSQL
DevOps
Docker multi-stage builds, Compose orchestration, health checks, Makefile automation
Systems Design
Event-driven architecture, webhook processing, background tasks, graceful degradation
Security Engineering
HMAC verification, sandboxed execution, secret scanning, non-root containers
Software Engineering
Clean architecture, SOLID principles, type safety, structured logging, migrations
MIT