A community fork of qodo-ai/pr-agent (Apache-2.0). Not affiliated with or endorsed by Qodo — all credit for the original project goes to its authors and contributors. The full upstream README follows below, unchanged.
- CLI/OAuth AI handler (
ai_handler=cli) — run PR review on your chat/CLI subscription (claude -pfor Claude Max,codex execfor ChatGPT Pro) instead of an API key. No API key, no GitHub Copilot quota — it runs on the subscription you already pay for. - Local MCP server (
pr-agent-mcp) — review a PR from inside any MCP window (Claude Code / Cursor / Codex), with cross-model review: window = Claude, reviewer = ChatGPT (or vice-versa) → an independent second opinion. - Reusable GitHub Action — run the reviewer in CI on a subscription token.
- Inline
/improveby default — committable, line-anchored suggestions. - Security hardening of the CLI handler — executable allowlist (RCE defense), timeout subprocess kill, robust config parsing.
- Slim base install — heavy cloud SDKs (AWS/Azure/GCP) are now optional
extras (
pr-agent[aws]/[azure]/[gcp]/[clouds]); the base stays light for the common GitHub + OpenAI/Anthropic (or subscription) path.
| Doc | What it covers |
|---|---|
docs/oauth-cli-mode.md |
run on a CLI/OAuth subscription (no API key) — enable, CI, output behavior, security |
docs/mcp-local.md |
local MCP server — Quickstart to use it in a Claude Code window, cross-model |
docs/how-it-works-explained.md |
code-grounded legend of the flow + where the CLI/OAuth handler plugs in |
docs/orchestrator-integration.md |
PR-Agent as a review producer behind an orchestrator (vs. an in-house reviewer) |
CHANGES.md |
the full, itemized list of fork changes (Apache-2.0 §4(b)) |
Quickstart (Claude Code): install with pipx install "pr-agent[mcp] @ git+https://github.com/jailtoncarlos/pr-agent.git", then follow the Quickstart in docs/mcp-local.md.
Everything below this line is the upstream qodo-ai/pr-agent README, preserved as-is — except the How It Works section, whose external image was replaced with a versioned mermaid diagram (see
docs/how-it-works-explained.md).
This repository contains the open-source PR Agent Project. It is not the Qodo free tier.
Try the free version on our website.
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 now offers a free tier that integrates seamlessly with GitHub, GitLab, Bitbucket, and Azure DevOps for high-quality automated reviews.
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 - www.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.
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+.
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
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 reviewFast & 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, Claude, Deepseek, and more
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
PR-Agent offers comprehensive pull request functionalities integrated with various git providers:
| GitHub | GitLab | Bitbucket | Azure DevOps | Gitea | ||
|---|---|---|---|---|---|---|
| TOOLS | Describe | ✅ | ✅ | ✅ | ✅ | ✅ |
| Review | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Improve | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Ask | ✅ | ✅ | ✅ | ✅ | ||
| ⮑ Ask on code lines | ✅ | ✅ | ||||
| Help Docs | ✅ | ✅ | ✅ | |||
| Update CHANGELOG | ✅ | ✅ | ✅ | ✅ | ||
| USAGE | CLI | ✅ | ✅ | ✅ | ✅ | ✅ |
| App / webhook | ✅ | ✅ | ✅ | ✅ | ✅ | |
| Tagging bot | ✅ | |||||
| Actions | ✅ | ✅ | ✅ | ✅ | ||
| CORE | Adaptive and token-aware file patch fitting | ✅ | ✅ | ✅ | ✅ | |
| Dynamic context | ✅ | ✅ | ✅ | ✅ | ||
| Fetching ticket context | ✅ | ✅ | ✅ | |||
| Interactivity | ✅ | ✅ | ||||
| Local and global metadata | ✅ | ✅ | ✅ | ✅ | ||
| Multiple models support | ✅ | ✅ | ✅ | ✅ | ||
| PR compression | ✅ | ✅ | ✅ | ✅ | ||
| Self reflection | ✅ | ✅ | ✅ | ✅ |
The diagram below is PR-Agent's flow — a versioned, faithful recreation of the
upstream "How It Works" figure. The AI steps (PR-Agent Planning and every
tool) run through a pluggable AI handler: that is the single seam where this
fork adds ai_handler=cli to run on a chat/CLI subscription (OAuth) instead
of an API key. For a step-by-step legend grounded in the code — and where the
handler plugs in — see How It Works — explained.
flowchart LR
A1["In Public GitHub PR\ncomment: @CodiumAI-Agent [/command]"]
A2["In Private GitHub/GitLab/BitBucket PR\nafter installation, comment: [/command]"]
A3["Run PR-Agent locally with CLI"]
subgraph DIGEST["PR-Agent Digest Request"]
D1["PR status detection"]
D2["Hunks detection & prioritization"]
D3["detect contribution.md / guidelines.md\n(FUTURE)"]
end
subgraph PLAN["PR-Agent Planning"]
P1["Token-aware compression & prioritization"]
P2["Analyze user request"]
P3["Questioning user"]
P1 --> P2
P2 -->|"/reflect"| P3
end
ROUTER{"Which function?"}
T1["Similar issue finder tool"]
T2["Reviewing tool"]
T3["Auto-description tool"]
T4["Q&A tool"]
T5["Labeling tool"]
T6["Code-suggestion tool"]
T7["Changelog tool"]
T8["Code-docstring tool"]
T9["Future tool"]
R1["PR comment"]
R2["PR comment"]
R3["PR description"]
R4["PR comment"]
R5["PR labels"]
R6["PR inline code suggestions"]
R7["Update changelog"]
R8["PR inline code suggestions"]
PC["PR comment"]
UR["User response"]
A1 --> DIGEST
A2 --> DIGEST
A3 --> DIGEST
D1 --> P1
D2 --> P1
D3 -.-> P1
P2 --> ROUTER
P3 --> ROUTER
ROUTER -->|"/similar_issue"| T1
ROUTER -->|"/review"| T2
ROUTER -->|"/describe"| T3
ROUTER -->|"/ask"| T4
ROUTER -->|"/generate_labels"| T5
ROUTER -->|"/improve"| T6
ROUTER -->|"/update_changelog"| T7
ROUTER -->|"/add_doc"| T8
ROUTER -->|"/command"| T9
T1 --> R1
T2 --> R2
T3 --> R3
T4 --> R4
T5 --> R5
T6 --> R6
T7 --> R7
T8 --> R8
T9 -->|"..."| PC
R1 --> PC
R2 --> PC
R3 --> PC
R4 --> PC
R5 --> PC
R6 --> PC
R7 --> PC
R8 --> PC
PC --> UR
UR -.-> DIGEST
The original upstream diagram image lived at qodo.ai/images/pr_agent/diagram-v0.9.png; this fork replaces it with the versioned, faithful mermaid recreation above. The AI handler is not a node here — it is the LLM backend used inside PR-Agent Planning and every tool; see the explained doc for where ai_handler=cli (this fork) sits.
- If you host PR-Agent with your OpenAI API key, it is between you and OpenAI. You can read their API data privacy policy here: https://openai.com/enterprise-privacy
To contribute to the project, get started by reading our Contributing Guide.
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.


