Team Ai
Apppublic

PratyushMeta/code-review-agent

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
App README

Code Review Agent — OpenEnv

An environment where an AI agent reviews Pull Requests and identifies bugs, security issues, and architectural problems.

API Endpoints

  • —GET / — health check
  • —POST /reset — start a task {"task_id": "task_1_easy_obvious_bug"}
  • —GET /state?task_id=... — current observation
  • —POST /step?task_id=... — submit a review

Tasks

TaskDifficultyIssues to find
task1easyobviousbugEasy1 — off-by-one in range()
task2mediummultiissueMedium3 — unused import, SQL injection, None comparison
task3hard_architectureHard2 — N+1 query, commit ordering bug

Reward

Partial credit per issue: score = matched / total, clamped to strictly between 0 and 1 (0.01–0.99).

Baseline Scores

TaskScore
task_10.99
task_20.67
task_30.5
Average0.72

Setup

bash
docker build -t code-review-agent .
docker run -p 7860:7860 \
  -e HF_TOKEN=your_token \
  -e API_BASE_URL=https://router.huggingface.co/v1 \
  -e MODEL_NAME=moonshotai/Kimi-K2-Instruct-0905 \
  code-review-agent