PR-Agent

Coding Agents 💻 Python ⚖️ MIT 🟢 Actively maintained
12.9k stars

PR-Agent is an open-source, AI-powered code review agent that automates pull request analysis and feedback. It helps development teams save time by generating PR descriptions, identifying issues, and suggesting improvements directly in their workflow. It is designed for developers and teams using GitHub, GitLab, Bitbucket, Azure DevOps, or Gitea.

✨ Key features

  • Automated PR review with /review, /describe, /improve commands
  • Supports multiple git providers: GitHub, GitLab, Bitbucket, Azure DevOps, Gitea
  • Works with various AI models via LiteLLM (OpenAI, Claude, Gemini, etc.)
  • Customizable via JSON-based configuration files
  • Deployable as CLI, GitHub Action, Docker, or webhook
  • Handles large PRs with compression strategy

🎯 Use cases

  • Automatically generate PR titles, summaries, and labels
  • Identify code issues, security concerns, and test suggestions
  • Get actionable code improvement suggestions
  • Ask questions about a PR in natural language
  • Integrate AI code review into CI/CD pipelines

📦 Installation

🧰 Requirements: Requires Python for CLI, an OpenAI API key or other LLM provider key, and a git provider account (GitHub, GitLab, etc.) for integration.

pip install pr-agent

For GitHub Action, add a 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 }}

🚀 Usage

Set your OpenAI API key
export OPENAI_KEY=your_key_here
Run PR-Agent on a specific PR
pr-agent --pr_url https://github.com/owner/repo/pull/123 review

Alternatively, comment on a PR with:

/describe
/review
/improve
/ask "What does this PR change?"

⚠️ Good to know

The /help_docs tool is temporarily disabled since v0.36.1 due to a credential-exposure issue.

❓ FAQ

What is the difference between PR-Agent and Qodo?

PR-Agent is an open-source, community-maintained legacy project of Qodo. Qodo offers a feature-rich, context-aware AI code review platform with a free version for open-source projects.

Which AI models can I use with PR-Agent?

PR-Agent supports OpenAI GPT, Anthropic Claude, Google Gemini, DeepSeek, Mistral, and any model reachable through LiteLLM, including Azure OpenAI, AWS Bedrock, Vertex AI, Databricks, OpenRouter, and Ollama.

How do I run PR-Agent locally?

Install via pip, set your OPENAI_KEY environment variable, and run the CLI command with the PR URL, for example: pr-agent --pr_url https://github.com/owner/repo/pull/123 review.

Is PR-Agent free to use?

Yes, PR-Agent is open-source and free to use. You only pay for the AI model API costs if you use a paid provider like OpenAI.

📊 Repository

Stars★ 12,868
Forks🍴 1,804
Open issues🐛 79
Last commit🕒 Sep 4, 2026
Created📅 Jul 2023
Language💻 Python
License⚖️ MIT

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.