The-PR-Agent/pr-agent

Developer Tools

An open-source, self-hostable AI agent that reviews pull requests and answers questions about them, on several Git platforms.

13,826
2,030
Python
MIT
3 years old

PR-Agent is a community-maintained, MIT-licensed code review agent that works with existing pull requests. It can be installed as a GitHub Action, run from the command line, or self-hosted through Docker and webhooks; it also documents setup for GitLab, Bitbucket, and Azure DevOps Getting Started. It is a legacy open-source project from Qodo, explicitly distinct from Qodo's commercial review product repository overview.

What changes in the workflow

A reviewer writes a comment such as /review, /describe, /improve, or /ask "..." on a pull request. Issue-scoped commands such as /similar_issue work on an issue instead. The same tools can be run locally through the CLI against a PR or issue URL usage examples. The README says each of /review, /improve, and /ask uses a single LLM call and takes roughly 30 seconds; that is the author's characterization, not an independently measured end-to-end latency.

How it stays usable on large or varied setups

The project highlights a "PR Compression" strategy for handling both small and large PRs, and JSON-based prompting configured through a configuration file so review categories and behaviour can be adjusted why use it. Model choice is not fixed: the README lists OpenAI, Anthropic, Google Gemini, DeepSeek, Mistral, and anything reachable through LiteLLM, including Azure OpenAI, AWS Bedrock, Vertex AI, and Ollama model guide. This means an organisation can keep inference on a provider it already has access to, rather than being tied to one vendor.

Prerequisites and constraints

  • An LLM API key is required for any useful run; the GitHub Action example supplies OPENAI_KEY and the repository GITHUB_TOKEN as secrets GitHub Action setup.
  • Provider SDKs for CLI use are optional extras; install the extra for the Git provider you use, or pr-agent[all] for every integration CLI setup.
  • Docker images from release 0.34.2 onward are published under pragent/pr-agent; older images stay at the legacy codiumai/pr-agent namespace and are frozen, so pinned image references need updating when upgrading Docker Hub migration note.
  • /help_docs has been disabled since v0.36.1 pending a fix for a credential-exposure issue issue #2445.
  • Privacy depends on where you host it: the README states that self-hosting with your own OpenAI key puts data handling between you and OpenAI data privacy. Self-hosted deployment and prompt customisation are options, but the data path follows the model provider you choose.

Who it suits

Teams that want an open-source review assistant they can run themselves and whose prompts and model backend they can change. The platform support matrix should be checked before committing to a particular Git host platform support. The repository is presented as community-owned and accepting additional maintainers, so the project's direction is not tied to Qodo's commercial product repository overview.

Written by AI from the project's README, updated October 31, 2026. The project's own docs are the source of truth.