Skip to content
FossShelf
Home / Categories / For Engineers

Pr Agent

Open source AI PR reviewer for GitHub, GitLab, Bitbucket, and more

Replaces Coderabbit, Qodo Merge, Sourcery, Ellipsis

16.30K starsMITreviewed 5 Nov 2026last commit 13 Nov 2026
Screenshot of Pr Agent

Who it's for

Backend teams with high PR volume

PR-Agent's GitHub Action triggers on every PR open or synchronize event, so the team gets an automated first pass before a human reviewer opens the PR. The /review output names the focus areas, reducing the time spent on orientation and catching issues before the human review starts.

Teams where every PR is a small tweak by a single contributor, or where PRs are rarely reviewed before merge. The automation adds value at scale; it is friction in a solo codebase.

Teams self-hosting GitLab or Gitea

PR-Agent works with self-hosted GitLab instances and Gitea, which most commercial AI review tools do not support fully. Install via webhook, point it at your LLM provider of choice, and you get the same /review and /improve commands without routing code through a third party.

Teams entirely on GitHub.com who are comfortable with a managed subscription and do not need local LLM inference. CodeRabbit or Qodo Merge will get you to the same place with less configuration.

Security-conscious teams with data residency needs

With Ollama as the LLM backend, PR-Agent runs entirely on your own servers. Code, diffs, and model weights never leave your infrastructure. This covers the most restrictive data-handling policies without adding a separate AI vendor to your data-sharing agreements.

Teams comfortable sending code to external LLM APIs. If OpenAI or Anthropic are already in your toolchain, the simpler configuration with a managed review product may be faster to set up.

The problem

Code review quality is uneven. It depends on who is available, how tired they are, and how deep into the codebase they can go in the time they have. Junior reviewers miss security issues; senior reviewers are often too busy to cover every PR thoroughly. The result is PRs that land with inconsistent feedback, missed edge cases, and no clear accountability for the gap. The standard fixes do not work at scale. Checklists get ignored. Review assignment rotation spreads the burden without fixing the depth problem. Services like CodeRabbit and Sourcery solve the consistency issue, but they add a per-seat subscription and route your diffs through third-party infrastructure, which is a constraint for teams with data privacy requirements or cost pressure at high PR volume.

How it works

/review command

Analyzes a PR diff and produces a structured review with an estimated effort score, a list of key changes, a yes/no on whether tests are present, a security concern flag, and recommended focus areas with file and line references. Output appears as a comment on the PR, so it integrates with existing review workflows without changing how your team works.

/describe command

Rewrites the PR title and body from the diff, generating a walkthrough of changes grouped by file and type. Useful for PRs where the author submitted with a minimal description: the agent reads the actual code change and produces a human-readable summary, reducing the reviewer's first-pass orientation time.

/improve command

Scans the PR diff for code quality issues and suggests inline fixes as review comments. Each suggestion names the specific file and line and proposes a concrete code change, not a generic warning. The command runs in a single LLM call, so latency stays low even on larger diffs.

Multi-platform Git support

Works across GitHub, GitLab, Bitbucket, Azure DevOps, and Gitea. Each platform uses the same command set (/review, /describe, /improve, /ask), and each has a documented installation path: GitHub Action, GitLab webhook, Bitbucket app, or Azure DevOps pipeline step. Teams running their own GitLab instance can self-host PR-Agent alongside it.

LiteLLM-based model routing

Any LLM reachable through LiteLLM works as the backend: OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, Azure OpenAI, AWS Bedrock, Vertex AI, Databricks, OpenRouter, and Ollama for fully local inference. Switching models is a configuration change, not a code change.

Features

  • /review command
  • /describe command
  • /improve command
  • Multi-platform Git support
  • LiteLLM-based model routing

How to install

Install PR-Agent via pip to review pull requests from the command line.

pip install "pr-agent[github]"

Recommended for this setup

Strengths

  • No per-seat or per-PR billing: Running PR-Agent on your own infrastructure means you pay only for LLM API calls at market rates, with no additional subscription. For teams with high PR volume, this is materially cheaper than CodeRabbit or Qodo Merge at their published per-seat prices.
  • Fully local inference with Ollama: Because PR-Agent routes through LiteLLM, you can point it at Ollama running on your own server and review PRs with no external API calls at all. For teams with strict data-residency requirements, Ollama integration means code never leaves your infrastructure and no external API key is required.
  • 14,800+ stars, community-owned: With over 14,800 GitHub stars and 2,099 forks, PR-Agent has a large contributor base. Created by Qodo (formerly CodiumAI) and donated to the open-source community, it is now independently maintained under The-PR-Agent organization and in the process of being donated to an open-source foundation.
  • MIT license with no usage restrictions: MIT means you can run it in commercial production, modify the prompts, and fork the project without restriction. No copyleft, no resale prohibition, and no clauses that change if you scale past a usage threshold.

Trade-offs

  • Requires your own LLM API key: Unlike managed services that bundle the LLM, PR-Agent needs you to supply an API key (OpenAI, Anthropic, etc.) or run your own model via Ollama. That means LLM API costs are yours to manage, and you are responsible for staying within rate limits, rotating keys, and handling provider outages.
  • Community-maintained, no commercial SLA: PR-Agent is a community project with no official commercial support tier. The 21 open issues on the repository are modest, but feature requests and bug reports depend on volunteer contributors. Teams that need a guaranteed response time should factor that in against paid alternatives.
  • /help_docs temporarily disabled: As of v0.36.1, the /help_docs command is disabled pending a fix for a credential-exposure issue (#2445). Teams relying on in-PR documentation lookup will not have that feature until the fix ships.

Tech stack

Languages
Python, Shell, Dockerfile
Frameworks
FastAPI, React
Databases
—
Tooling
AWS

FAQ

Does PR-Agent work with GitLab, Bitbucket, and Azure DevOps, or only GitHub?

PR-Agent supports GitHub, GitLab, Bitbucket, Azure DevOps, and Gitea. Each platform has a documented installation path: GitHub gets a native Actions workflow, GitLab uses a webhook, Bitbucket has a dedicated app, and Azure DevOps uses a pipeline step. The same /review, /describe, /improve, and /ask commands work across all five platforms.

What LLM does PR-Agent use, and can I use my own model?

PR-Agent routes through LiteLLM, so it works with OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, Azure OpenAI, AWS Bedrock, Vertex AI, and Ollama. To use Ollama, configure PR-Agent to point at the local endpoint; no external API key is required, and code stays on your infrastructure. Switching providers is a configuration change, not a code change.

Is PR-Agent the same as Qodo Merge?

No. PR-Agent is the original open source project created by Qodo (formerly CodiumAI) and donated to the community. It is now maintained independently under the The-PR-Agent GitHub organization. Qodo Merge is Qodo's separate commercial product, Qodo 2.0, which is a hosted service with its own pricing. PR-Agent's README states: 'This project is not the Qodo free tier.'

How much does running PR-Agent cost?

PR-Agent itself is MIT-licensed and free to run. The main ongoing cost is LLM API usage. The README notes that each tool call (/review, /improve, /ask) is a single LLM call that takes roughly 30 seconds at low cost. For a team making dozens of PRs per day, the API bill is typically a few dollars per month depending on the model and PR size. Using Ollama eliminates API costs entirely.

Can PR-Agent run as a GitHub Action automatically on every pull request?

Yes. The recommended installation is a GitHub Actions workflow that triggers on the pull_request event types opened and synchronize. Add a .github/workflows/pr-agent.yml file with an OPENAI_KEY secret and the pr-agent action step, and reviews run automatically without any PR author action required.

Similar tools

More in Engineers