--- title: AI Code Review Agent emoji: 🤖 colorFrom: blue colorTo: purple sdk: gradio sdk_version: 5.31.0 app_file: gradio_app/app.py pinned: false --- # 🤖 AI Code Review Agent ![CI](https://github.com/Padmanav-Mohanty/ai-code-review-agent/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/Padmanav-Mohanty/ai-code-review-agent/branch/main/graph/badge.svg)](https://codecov.io/gh/Padmanav-Mohanty/ai-code-review-agent) ![Python](https://img.shields.io/badge/python-3.11-blue) ![License](https://img.shields.io/github/license/Padmanav-Mohanty/ai-code-review-agent) A multi-agent AI platform that simulates a software engineering team reviewing your code. ## What it does 1. **Repository Analysis** — Detects language, frameworks, architecture 2. **Bug Detection** — Runs Ruff + Bandit static analysis, then LLM review 3. **Test Generation** — Creates pytest test cases for uncovered functions 4. **Code Review** — Reviews SOLID principles and suggests refactors 5. **Full Report** — Combines everything into a structured engineering report ## Setup This Space requires one secret: | Secret | Description | |---|---| | `OPENROUTER_API_KEY` | Your [OpenRouter](https://openrouter.ai) API key | Go to **Space Settings → Secrets** and add `OPENROUTER_API_KEY`. ## Local development ```bash git clone https://github.com/Padmanav-Mohanty/ai-code-review-agent.git cd ai-code-review-agent pip install -r requirements.txt export OPENROUTER_API_KEY=your_key_here python gradio_app/app.py ``` ## Tech Stack - **Agents:** Custom multi-agent pipeline (repo analysis, bug detection, test gen, code review) - **LLM:** OpenRouter (default: `meta-llama/llama-3.3-70b-instruct`) - **Frontend:** Gradio - **Static Analysis:** Ruff, Bandit - **Repo Cloning:** GitPython