AI-Codereview-Gitlab is a Python-based automatic code review tool for GitLab that supports multiple LLM providers, notifications, daily reports, and a visual dashboard; it offers Docker and local deployments.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
A Python-based automatic code review tool for GitLab that uses large language models to perform code reviews, with support for notifications (DingTalk, WeChat Work, Lark), automated daily reports, and a visual dashboard. It supports multiple models and can be deployed via Docker or in a local Python environment.
How it works
When a user triggers a merge request or push on GitLab, GitLab webhooks call the tool's API, which sends code to third-party LLMs for review and posts results back to the Merge Request or Commit Note. It provides a dashboard for project and developer statistics and supports various review styles and optional Agentic Review Mode where the LLM can call tools within a local cloned repository. Agentic mode constrains tools with a sandbox and whitelists, and can downgrade to diff_only on failures.
Getting started
Deployment options:
- Docker: clone the repo, create conf/.env, edit key params (LLM_PROVIDER, API keys, SUPPORTED_EXTENSIONS, DINGTALK_ENABLED, DINGTALK_WEBHOOK_URL, GITLAB_ACCESS_TOKEN), then:
docker-compose up -d. - Local Python: clone the repo, install dependencies with
pip install -r requirements.txt, configure environment variables as in Docker steps, then run API withpython api.pyand start the dashboard with:streamlit run ui.py --server.port=5002 --server.address=0.0.0.0.
Webhook configuration for GitLab:
- URL:
http://{your-server-ip}:5001/review/webhook - Trigger Events: Push Events and Merge Request Events
- Secret Token: as configured in access token
Agentic Review Mode (optional): Configure with:
REVIEW_STRATEGY=agentic
REPO_CACHE_DIR=/var/data/repo_cache
AGENT_MAX_ITERATIONS=20
Agentic mode may clone/update target projects under REPO_CACHE_DIR (roughly 10MB~2GB per project) and can downgrade to diff_only on failures.
Recent releases
Latest releases include:
- v1.5.1 (2026-06-29)
- v1.4.3 (2026-05-20)
- v1.4.2 (2026-03-15)
- v1.4.0 (2025-12-21)
- v1.3.11 (2025-06-17)
Traction
Stars: 1801 Forks: 396 Open issues: 56
Behind the repo
Maintained by sunmh207; open-source version with a Pro edition mentioned in the docs; related product pages link to a Pro version and other projects in the ecosystem.
Caveats
License: Apache-2.0 Created: 2024-11-14 Last push: 2026-07-23 Project language: Python Notable deployment notes: requires environment configuration for LLM provider keys and GitLab access token; includes Docker Compose deployment and local Python deployment paths.






