pr-agent is a free, open source version control & collaboration project written in Python and released under MIT. It has 13,049 GitHub stars, 1,851 forks and 102 open issues, and was last pushed 18 hours ago. On this registry it ranks #10 of 30 tracked projects in Version Control & Collaboration, with 5 head-to-head comparisons available. It gained 45 stars over the last 3 tracked days.

What is pr-agent?

PR-Agent is an open-source, AI-powered code review agent, maintained by the community as a legacy project of Qodo, for development teams that want automated pull-request review running on their own infrastructure with their own model keys.

What it is

PR-Agent is a Python project, released under the MIT licence, that reviews pull requests with a large language model. It ships as a CLI, a GitHub Action, a Docker image, and a webhook service, so the same review engine can run on a developer laptop, inside CI, or as a self-hosted server. It is described in its own README as a community-maintained legacy project of Qodo, and the README states explicitly that it is not the Qodo offering for open-source projects. The tool connects to GitHub, GitLab, BitBucket, Azure DevOps, and Gitea, and it reaches models through LiteLLM, which covers OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, Azure OpenAI, AWS Bedrock, Vertex AI, Databricks, OpenRouter, and Ollama.

The concrete problem it solves is the cost and latency of routine pull-request review. Each tool call uses a single LLM call, which the README puts at roughly thirty seconds and low cost, and the PR Compression strategy is designed to process both small and large pull requests within that budget. It replaces the manual pass a human reviewer makes over a diff, and it also replaces the hosted, vendor-operated review bot for teams that are not willing to send their source code to a third party. Because prompting is JSON-based, review categories and behaviour can be redefined per team instead of accepted as fixed.

Key capabilities

  • Slash commands /review, /improve, and /ask, each implemented as a single LLM call rather than a multi-step agent loop.
  • PR Compression strategy for handling large diffs without exceeding the model context window.
  • JSON-based prompting, with behaviour configured through pr_agent/settings/configuration.toml.
  • Git provider support for GitHub, GitLab, BitBucket, Azure DevOps, and Gitea.
  • Deployment options covering CLI, GitHub Actions, Docker, self-hosted service, and webhooks.
  • Model routing through LiteLLM to OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, Azure OpenAI, AWS Bedrock, Vertex AI, Databricks, OpenRouter, and Ollama.
  • Docker images published as pragent/pr-agent for release 0.34.2 and later, with older releases up to v0.31 frozen at the legacy codiumai/pr-agent namespace.

Who uses it and how

  • Teams adding automated review to a repository through .github/workflows/pr-agent.yml, triggered on pull_request events of type opened and synchronize.
  • Developers running reviews locally against a live pull request with pr-agent --pr_url https://github.com/owner/repo/pull/123 review.
  • Organisations that deploy the Docker image or webhook service on their own servers to keep repository data inside their own infrastructure.
  • GitLab, BitBucket, and Azure DevOps users who follow the platform-specific webhook or app installation paths instead of the GitHub Action.
  • Cost-sensitive groups that accept a single LLM call per command and route it to a cheaper or locally hosted model such as Ollama.

Getting started

Install the CLI with pip install pr-agent, or add the GitHub Action with uses: the-pr-agent/pr-agent@main and set OPENAI_KEY and GITHUB_TOKEN in the job environment. Docker users should pull pragent/pr-agent for release 0.34.2 and later.

How it compares

The README positions PR-Agent against Qodo's primary AI code review offering, which it describes as feature-rich and context-aware, and against the free version of Qodo that is provided for open-source projects; PR-Agent is the separate, community-maintained codebase rather than that free tier. The difference is one of control rather than raw capability: PR-Agent is MIT-licensed, self-hostable, and lets a team supply its own model keys and prompts, while the Qodo offering is a hosted product with a published free tier.

When to use it β€” and when not

Adopt it when the priority is data ownership, no vendor lock-in, and a prompt set the team can edit, and when someone is willing to operate the deployment: a model API key or a local model endpoint, plus Docker or a webhook service and CI configuration for each repository. Teams that want a managed, context-aware review experience without running any infrastructure, or that need every feature supported across all five Git providers at once, are better served by Qodo's own offering. Two limitations are worth noting before committing: PR-Agent is a community-maintained legacy project dependent on sponsor support for its ongoing development, and /help_docs has been disabled since v0.36.1 pending a fix for a credential-exposure issue.

project readme (upstream, from github) β€” read inline

logo
The Original Open-Source PR Reviewer

GitHub

This repository contains the open-source PR Agent Project. It is not the Qodo offering for open-source projects.

PR-Agent is an open-source, AI-powered code review agent and a community-maintained legacy project of Qodo. It is distinct from Qodo's primary AI code review offering, which provides a feature-rich, context-aware experience. Qodo offers a free version for open-source projects and integrates seamlessly with GitHub, GitLab, Bitbucket, and Azure DevOps for high-quality automated reviews.

Sponsors

PR-Agent is a community-maintained open-source project, with its ongoing development supported by our sponsors. If you'd like to support the project, consider becoming a sponsor.

πŸ₯‡ Gold Sponsor

Qodo β€” Gold sponsor

Free version of Qodo for open-source projects

Table of Contents

Getting Started

[!NOTE] Docker Hub namespace migration. Releases 0.34.2 and later are published under pragent/pr-agent. Older releases (up to and including v0.31) remain available at the legacy codiumai/pr-agent namespace as a frozen archive β€” no new images are pushed there. Update any pinned image: / docker pull / uses: docker:// references when upgrading to 0.34.2+.

πŸš€ Quick Start for PR-Agent

1. GitHub Action (Recommended)

Add automated PR reviews to your repository with a simple workflow file:

# .github/workflows/pr-agent.yml
name: PR Agent
on:
  pull_request:
    types: [opened, synchronize]
jobs:
  pr_agent_job:
    runs-on: ubuntu-latest
    steps:
    - name: PR Agent action step
      uses: the-pr-agent/pr-agent@main
      env:
        OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Full GitHub Action setup guide

2. CLI Usage (Local Development)

Run PR-Agent locally on your repository:

pip install pr-agent
export OPENAI_KEY=your_key_here
pr-agent --pr_url https://github.com/owner/repo/pull/123 review

Complete CLI setup guide

3. Other Platforms

News and Updates

Full notes for every release are on the Releases page.

Why Use PR-Agent?

🎯 Built for Real Development Teams

Fast & Affordable: Each tool (/review, /improve, /ask) uses a single LLM call (~30 seconds, low cost)

Handles Any PR Size: Our PR Compression strategy effectively processes both small and large PRs

Highly Customizable: JSON-based prompting allows easy customization of review categories and behavior via configuration files

Platform Agnostic:

  • Git Providers: GitHub, GitLab, BitBucket, Azure DevOps, Gitea
  • Deployment: CLI, GitHub Actions, Docker, self-hosted, webhooks
  • AI Models: OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, and any other model reachable through LiteLLM (Azure OpenAI, AWS Bedrock, Vertex AI, Databricks, OpenRouter, Ollama, and more) β€” see Changing a model

Open Source Benefits:

  • Full control over your data and infrastructure
  • Customize prompts and behavior for your team's needs
  • No vendor lock-in
  • Community-driven development

Features

See the current feature and git provider support matrix in the PR-Agent documentation.

⚠️ /help_docs is temporarily disabled since v0.36.1 pending a fix for a credential-exposure issue (#2445).


See It in Action

/describe


/review


/improve


Usage Examples

PR-Agent tools run as a comment on a PR or from the CLI. A few common ones:

# Comment on a PR (GitHub/GitLab/Bitbucket/…):
/describe
/review
/improve
/ask "What does this PR change?" # free-text Q&A about the PR

# Or locally via the CLI:
pr-agent --pr_url <PR_URL> review

See the Tools docs for the full list of tools with example commands, and each tool's page for screenshots and options.


How It Works

The following diagram illustrates PR-Agent tools and their flow:

PR-Agent Tools

Data Privacy

Self-hosted PR-Agent

Contributing

To contribute to the project, get started by reading our Contributing Guide.

For local verification, run PYTHONPATH=. uv run pytest from the repository root; it discovers the unit-test suite under tests/unittest by default. End-to-end tests under tests/e2e_tests require provider credentials and should be invoked explicitly, for example PYTHONPATH=. uv run pytest tests/e2e_tests/test_github_app.py.

Big News for PR-Agent

PR-Agent has a new home!

After years of building this tool alongside the community, Qodo has donated PR-Agent to the open-source community - and we couldn't be more excited about what comes next.

The project now lives in the PR-Agent org on GitHub, is fully community-owned, and is open for contributions and additional maintainers.

What else changed:

  • Docs moved to - docs.pr-agent.ai
  • Qodo Merge (Qodo 1.0), the hosted URL, which was the enterprise version of PR-Agent, has been rebranded and evolved into Qodo (Qodo 2.0), a full AI code review platform.

❀️ Community

This open-source release remains here as a community contribution from Qodo β€” the origin of modern AI-powered code collaboration. We’re proud to share it and inspire developers worldwide.

The project now has its first external maintainer, Naor (@naorpeled), and is currently in the process of being donated to an open-source foundation.

Frequently asked questions

Is pr-agent free to use?

pr-agent is open source under the MIT licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does pr-agent do?

πŸš€ PR Agent: The Original Open-Source PR Reviewer. This project is not the Qodo free tier.

What is pr-agent written in?

pr-agent is primarily written in Python. Its source is publicly available at https://github.com/The-PR-Agent/pr-agent, and it has 13,049 GitHub stars.