A command-line tool and Python library for running prompts and chats against remote and locally installed large language models.
The-PR-Agent/pr-agent
Open-source AI agent that automatically reviews pull requests and offers /describe, /review, /improve and /ask commands on GitHub, GitLab, Bitbucket and Azure DevOps.
Open-source alternative to:CodeRabbit
- Stars
- 13,463
- Forks
- 1,972
- Open issues
- 28
- Last commit
- 5 hours ago
What is it?
PR-Agent is an open-source tool that uses large language models to review pull requests. Each tool, such as /review, /improve, /describe and /ask, runs as a comment on a PR or from the command line and makes a single LLM call per invocation, so it is designed to be quick and inexpensive to run.
It works with GitHub, GitLab, Bitbucket, Azure DevOps and Gitea, and can be deployed as a GitHub Action, a CLI tool, a Docker container, or a self-hosted webhook service. Model access goes through LiteLLM, which covers OpenAI, Anthropic Claude, Google Gemini, DeepSeek, Mistral, Ollama and other providers. Prompts and review categories are configured through TOML files, so teams can adjust review behavior to their needs.
The project is community-maintained and was donated by Qodo, which now offers its own hosted AI review product separately.
Key features
- 01Provides /describe, /review, /improve and /ask commands for pull requests.
- 02Supports GitHub, GitLab, Bitbucket, Azure DevOps and Gitea.
- 03Connects to OpenAI, Claude, Gemini, Ollama and other models through LiteLLM.
- 04Can run as a GitHub Action, CLI, Docker container or self-hosted webhook.
- 05Customizes prompts and review categories through configuration files.
Use cases
- Adding automated first-pass reviews to every pull request in a GitHub repository.
- Running code review locally on a PR before requesting human review.
- Self-hosting an AI reviewer to keep code and data inside your own infrastructure.
Quick start
- 1
Add the PR Agent GitHub Action workflow file to your repository
- 2
Install the CLI with pip including the GitHub extra
pip install "pr-agent[github]" - 3
Set your OpenAI key in the environment
export OPENAI_KEY=your_key_here - 4
Run a review on a pull request from the CLI
pr-agent --pr_url https://github.com/owner/repo/pull/123 review
Things to know
- Requires an API key from an LLM provider such as OpenAI, which you pay for.
- Git provider SDKs are optional extras, so you must install the one matching your platform.
- The /help_docs command is temporarily disabled due to a credential-exposure issue.
Topics
FAQ
- What is pr-agent?
- Open-source AI agent that automatically reviews pull requests and offers /describe, /review, /improve and /ask commands on GitHub, GitLab, Bitbucket and Azure DevOps. PR-Agent is an open-source tool that uses large language models to review pull requests. Each tool, such as /review, /improve, /describe and /ask, runs as a comment on a PR or from the command line and makes a single LLM call per invocation, so it is designed to be quick and inexpensive to run.
- Is pr-agent free to use? What license does it have?
- pr-agent is open source under the MIT license. Check the license terms before using it in commercial products.
- Is pr-agent still maintained?
- Actively maintained. The last commit to pr-agent was on Oct 20, 2026.
- What can I use pr-agent for?
- Adding automated first-pass reviews to every pull request in a GitHub repository. Running code review locally on a PR before requesting human review. Self-hosting an AI reviewer to keep code and data inside your own infrastructure.
- How do I install pr-agent?
- Add the PR Agent GitHub Action workflow file to your repository Install the CLI with pip including the GitHub extra: pip install "pr-agent[github]" Set your OpenAI key in the environment: export OPENAI_KEY=your_key_here Run a review on a pull request from the CLI: pr-agent --pr_url https://github.com/owner/repo/pull/123 review
- Where can I get pr-agent?
- The source code and installation instructions are on GitHub: https://github.com/The-PR-Agent/pr-agent
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python framework for building LLM-powered applications and agents, with standard interfaces for models, embeddings, vector stores and third-party integrations.
A TypeScript coding agent CLI where a single 'ulw' or 'mass ulw' keyword in your prompt makes it plan, delegate to multiple models, and verify the work.
Self-hosted ChatGPT-style chat platform that unifies many AI providers, with Agents, MCP support, Artifacts, and multi-user auth.
An open-source Go framework that organizes reusable AI prompts (called Patterns) by task and runs them from the command line or a REST API.
An open-source coding-agent CLI that runs in the terminal and works with cloud APIs and local model backends like Ollama.