selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

pr-agent logo

Self-host pr-agent

v0.50.0

AI pull-request reviewer that runs from comments, CI or CLI

ReleaseOpen SourceMIT
docker run --rm -it -e OPENAI__KEY=<your_openai_key> -e GITHUB__USER_TOKEN=<your_github_token> pragent/pr-agent:latest --pr_url <pr_url> review
Updated2 days ago
LanguagePython
Setup difficultyModerate
Stars
15 667
Port
3000 (Port the self-hosted webhook server (gunicorn) binds to)
Docker
pragent/pr-agent
The /describe tool output posted on a pull requestThe /review tool output posted on a pull requestThe /improve tool's code suggestions on a pull request

What is pr-agent?

PR-Agent is an AI coding assistant that gives automated pull-request feedback to development teams. Deployed as a git-provider app, webhook receiver, CI job or CLI tool, it writes PR titles and summaries, produces structured reviews that flag likely problems, security risks and missing tests, and posts code suggestions authors can apply. Extra commands answer free-text questions about a diff, add missing documentation, generate custom labels, keep the CHANGELOG current, and surface related issues in the same repo. It supports GitHub, GitLab, Bitbucket, Gitea, Azure DevOps, and also Gerrit and CodeCommit, and can drive models from OpenAI, Anthropic, Google, DeepSeek or Mistral, plus anything LiteLLM exposes (Azure OpenAI, Bedrock, Vertex AI, Ollama and more). Run it yourself with the pragent/pr-agent Docker image, a pip package, a GitHub Actions step, or a self-hosted webhook server that binds port 3000 by default; with your own API key, code traffic stays strictly between you and the model provider. Qodo donated the project to the community and it is MIT-licensed, though /help_docs has been disabled since v0.36.1 while a credential-exposure bug is fixed.

pr-agent alternatives

Should you self-host pr-agent?

pr-agent scores 84/100 on selfhost.directory (how scoring works) and ranks #1 of 10 in Code Review. It has 15 667 GitHub stars, +2 393 in the last 30 days.

It shipped 24 stable releases in the past year. The latest, v0.50.0, came out on 7 November 2026. New versions land roughly every 9 days.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is SonarQube (71/100, 11 165 stars). pr-agent scores higher overall. See pr-agent vs SonarQube side by side.

Features

  • Agent skills support
  • AI pull-request review
  • Ask questions about a PR
  • Automatic feedback on PR events
  • Changelog updates
  • Code improvement suggestions
  • Configurable review behavior
  • Documentation generation
  • Label generation
  • Large PR handling
  • Multiple AI model support
  • PR description generation
  • Repo context files
  • Similar issue detection

pr-agent README


logo
The Original Open-Source PR Reviewer

Release PyPI Docker Hub Documentation Coverage License GitHub Build and test

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.

How to install pr-agent

Install pr-agent with Docker

docker run --rm -it -e OPENAI__KEY=<your_openai_key> -e GITHUB__USER_TOKEN=<your_github_token> pragent/pr-agent:latest --pr_url <pr_url> review

Provider-specific variants (GitLab, BitBucket, Gitea, Azure DevOps) use CONFIG__GIT_PROVIDER plus the provider's token variables; self-hosted webhook server targets also exist.

How to configure pr-agent

  • OPENAI_KEYOpenAI API key used by the GitHub Action / CLI quick start.
  • GITHUB_TOKENGitHub token used by the GitHub Action workflow.
  • modelgpt-5.6Main LLM model used by the tools (configuration.toml [config]).
  • publish_outputtrueWhether tool results are published as PR comments (false prints locally).

    values: true, false

  • GUNICORN_WORKERS(unset)Pins the worker count exactly. Overrides the derived count and GUNICORN_MAX_WORKERS.

pr-agent releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Can the 'Review effort' feedback be calibrated or customized?

Yes, review effort estimates can be customized via the extra_instructions option; effort levels 1-5 are meant as comparative signals rather than exact durations.

Can PR-Agent review draft/offline PRs?

Yes. Draft PRs aren't reviewed automatically by default, but you can enable it with the feedback_on_draft_pr parameter or manually request feedback by commenting.

Will you store my code? Are you using my code to train models?

No. PR-Agent's strict privacy policy ensures code is not stored or used for training purposes.

How can I get more tailored suggestions?

Use the extra_instructions and best_practices configuration options to guide the model toward suggestions that fit the project's needs.

I received an incorrect or irrelevant suggestion. Why?

AI models are improving rapidly but remain imperfect, so suggestions should be critically evaluated; the hierarchical structure helps you quickly decide which suggestions are relevant.

Can PR-Agent serve as a substitute for a human reviewer?

No — it is designed to assist, not replace, human reviewers, with safeguards such as never approving PRs itself and preserving the user's original PR header.

More in Code Review

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…