
PR Agent
Open-source AI bot that reviews pull requests and comments on them with suggestions.
- Stars
- 13.9k
- Forks
- 2k
- Licence
- MIT
- Language
- Python
- Last update
- 5 days ago
- Type
- Dev tool
What it is
PR Agent is an open-source tool that uses a large language model to review code changes in pull requests on platforms like GitHub, GitLab, Bitbucket, and Azure DevOps. It can post a summary, a review, or improvement suggestions as comments, and you can also ask it questions about a PR. It is maintained by the community after being donated by Qodo.
- Add an automatic GitHub Action that reviews new or updated pull requests
- Run the /review, /describe, or /improve commands on a PR from the command line
- Ask free-text questions about a pull request with /ask
- Find similar issues in a repository with /similar_issue
Great for
- Teams that want automated first-pass reviews on pull requests
- Developers who want control over which AI model and provider they use
- Self-hosters who need to keep code and infrastructure under their own control
- People comfortable configuring a tool with API keys and config files
Not ideal for
- People who want a fully managed service with no setup, since the README centers on self-hosting and API keys
- Teams that need guaranteed review quality without checking the AI output, because LLM suggestions can be wrong
- Projects on a git provider outside the listed ones, since support is limited to those named in the README
How to get it
- 1
Install with a package manager
You'll need: Python · An API key for an AI model provider such as OpenAI
Install the CLI with GitHub support
pip install "pr-agent[github]"Set your model API key
export OPENAI_KEY=your_key_here - 2
Run it
- Add the GitHub Action workflow file to your repository under .github/workflows/
- Store your OpenAI key and GITHUB_TOKEN as repository secrets
- Open or update a pull request to trigger a review
- Or run pr-agent --pr_url <PR_URL> review from the command line
- 3
Get the most out of it
- Use configuration files such as pr_agent/settings/configuration.toml to tune review categories and behavior
- Switch models through LiteLLM, for example Anthropic Claude or a local Ollama model, using the changing-a-model guide
- Use /describe, /review, and /improve together on the same PR
- Pin Docker images to the newer pragent/pr-agent namespace for releases 0.34.2 and later
Downloads
Strengths
- Supports several git providers, including GitHub, GitLab, Bitbucket, Azure DevOps, and Gitea
- Works with many AI models through LiteLLM, including OpenAI, Anthropic, and Ollama
- Prompts and review behavior can be customized through configuration files
Trade-offs
- Requires your own API key for the model you choose, and you pay that provider for usage
- Each tool makes a single LLM call, so output quality depends heavily on the chosen model
- The /help_docs command is temporarily disabled due to a credential-exposure issue noted in the README
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| pr-agent (this) | 13.9k | Dev tool | intermediate | 5 days ago | Teams that want automated first-pass reviews on pull requests |
| oh-my-pi | 37.5k | CLI | intermediate | 4 days ago | Developers who want an AI agent working inside a terminal on their own codebase |
| opencodex | 18.2k | Dev tool | intermediate | 4 days ago | Developers who already use Codex or Claude Code and want to try other model providers |
| langchain | 149k | Framework | intermediate | 4 days ago | Python developers building LLM-powered applications |
| gpt-engineer | 55k | CLI | intermediate | 1.5 years ago | Developers who want to experiment with AI-written code from a simple prompt |
| deepwiki-open | 18.3k | App | intermediate | 9 days ago | Developers trying to understand a large or unfamiliar codebase |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.