Star PR Agent on GitHub

PR Agent: AI PR reviews on your own servers

Same first pass every PR gets, without a per-seat bill. Your infrastructure, your model keys, your choice of provider.

Deploy yourself

MIT licensed. Hosting and AI usage on you.

Bring your own model keys

Switch providers by changing one setting. Your GitHub workflow stays the same.

  • and more

How it works

How a pull request gets its first pass

One deploy. After that, every pull request follows the same path inside GitHub. No extra dashboard, no per-seat bill from PR Agent.

  1. Step 1

    Deploy once on servers you control

    Install PR Agent beside the rest of your stack. Your GitHub credentials and AI keys stay in your account, not a vendor dashboard.

    Your servers · your keys

  2. Step 2

    A pull request opens on your project

    PR Agent starts a review on opening or approval, depending on your settings. Your team sees a reaction on the pull request so everyone knows work has begun.

    Starts on opening or approval

  3. Step 3

    It reads what actually changed

    PR Agent looks at the branch and the changes, then hunts for bugs and correctness issues. When risky APIs show up, it also checks for security problems.

    Review runs on your servers

  4. Step 4

    Feedback shows up on the pull request

    Notes appear next to the changed lines, plus a short summary in the conversation. Want more? Comment /describe, /ask, /triage, or mention the App bot. Replies stay in the same thread.

    /review · /describe · /ask · /triage

  5. Step 5

    Honest limits when the change is huge

    Docs-only pull requests can take a lighter path. Very large changes may get a partial review, and PR Agent says what it could not cover instead of faking completeness.

    Partial review notice when needed

Use cases

One App. Every pull request covered.

The same summary, description, ask, and triage formats PR Agent posts on a real pull request. Pick a command to see what lands.

/review

Findings on the lines that changed

Four specialists read the branch and the diff for correctness, security, quality, and tests. One orchestrator decides what is worth posting.

  • Comments land next to the changed lines, with a summary in the conversation
  • Runs on opening or approval, depending on your settings, or when you comment /review on an open pull request
  • P0–P2 findings fail the PR Agent Review check. P3 does not
  • Docs-only pull requests take a lighter path instead of a full run

pr-agent bot commented just now

PR Agent Review

Note

Adds a retry wrapper around the webhook dispatcher so transient GitHub failures do not drop deliveries.
SizeM
P1 · c4

Webhook ack can race the durable write

On the diff · src/webhooks/intake.ts · lines 148–152

P2 · c3

Summary edit ignores stale head guard

Summary only · src/review/publish.ts · line 91

MergeabilityTwo-way: trivial to revert; only error-message rendering.
Blast radiusLocalized: stream error text only; no API, schema, or control-flow change.
Follow-ups

1. Remove the retry feature flag once metrics confirm the fix

2. Delete the legacy dispatcher path once the batched dispatcher ships

Prompt to fix
Verify each finding against current code. Fix only still-valid issues.

Commands

What your team gets back in GitHub

Ask from a pull request comment, or let the automatic path run when a pull request opens.

  • /review

    Catch basics before a human opens the change

    Runs on opening or approval, depending on your settings, or when you comment /review on an open pull request.

    Comments land next to the lines that need attention.

    Then, after every push

    /verify

    Recheck open findings after each push

    Runs after each new push when that option is left on, or when you comment /verify.

    With no open findings, verification skips the agent. An older-head run completes degraded instead of clean. Switch to on-demand to limit token use.

  • /describe

    Turn a blank PR body into a readable summary

    Runs when a pull request opens in auto mode, or when you comment /describe.

    Summary bullets and optional visual sketches go into the PR body when the diff proves them.

  • /ask

    Ask code questions without leaving GitHub

    Comment /ask … or mention the GitHub App bot with your question.

    The word @bot only matches if you named the App that. /ask does not need a mention. Asking the same comment twice posts one answer; post a new comment to ask again.

  • /triage

    Revisit earlier findings on the pull request

    Comment /triage, or /triage preview then /triage all, on the pull request.

    Preview the would-be diff, then apply the approved set. Bare /triage still fixes without a preview.

Pricing

No per-seat fee, ever

Know the cost before you connect GitHub or add an AI provider.

$0

  • $0 from PR Agent

    Software is free

    No credit card, no per-seat fee, and the whole thing is open source under MIT.

  • Hosting and AI usage only

    You pay your own vendors

    You cover the server, database, and model bills. Extra developers cost nothing.

  • Your security rules apply

    You own the full stack

    Run it inside your network, pick your provider, and keep traffic under your rules.

Compare

Pick PR Agent when hosted review is the problem

CodeRabbit, Greptile, Cursor Bugbot, and Macroscope sell hosted review. PR Agent is for teams that want the reviewer, the AI keys, and the review data in their own account.

  • Runs on your servers

    • PR AgentYes
    • CodeRabbitPartial
    • GreptilePartial
    • Cursor BugbotNo
    • MacroscopeNo
  • Open source, MIT

    • PR AgentYes
    • CodeRabbitNo
    • GreptileNo
    • Cursor BugbotNo
    • MacroscopeNo
  • No per-seat fee

    • PR AgentYes
    • CodeRabbitNo
    • GreptileNo
    • Cursor BugbotNo
    • MacroscopeYes
  • Bring your own model keys

    • PR AgentYes
    • CodeRabbitNo
    • GreptileNo
    • Cursor BugbotNo
    • MacroscopeNo
  • Choose the model provider

    • PR AgentYes
    • CodeRabbitNo
    • GreptileNo
    • Cursor BugbotNo
    • MacroscopeNo
  • Review data stays in your account

    • PR AgentYes
    • CodeRabbitPartial
    • GreptilePartial
    • Cursor BugbotNo
    • MacroscopeNo
  • Reviews GitHub pull requests

    • PR AgentYes
    • CodeRabbitYes
    • GreptileYes
    • Cursor BugbotYes
    • MacroscopeYes
  • Whole-repository index

    • PR AgentPartial
    • CodeRabbitYes
    • GreptileYes
    • Cursor BugbotPartial
    • MacroscopeYes
  • PR description, ask, and fix commands

    • PR AgentYes
    • CodeRabbitYes
    • GreptilePartial
    • Cursor BugbotNo
    • MacroscopePartial

FAQ

Questions teams ask before they deploy

Find your starting point here. If your question is missing, open an issue and it gets answered in the repository.

What is PR Agent?

PR Agent is open-source software that reviews GitHub pull requests on servers you run. You deploy it once, connect GitHub and an AI provider, and it posts reviews, summaries, and answers back on the pull request.

Is PR Agent a self-hosted alternative to CodeRabbit?

Yes. It reviews pull requests, leaves comments on the changes, writes summaries, and responds to commands in GitHub. Unlike CodeRabbit’s hosted product, PR Agent runs on your servers with your credentials and your AI keys.

How does PR Agent compare to Greptile?

Greptile is a cloud reviewer that indexes whole repositories. PR Agent is self-hosted and looks at each pull request from the branch and what changed. Pick it when you want to run the reviewer and choose the model provider, not another managed subscription.

Does PR Agent replace Cursor Bugbot?

PR Agent fits teams that want bug and correctness reviews on GitHub without sending that work through a hosted IDE-tied review service. Bugbot stays tied to the Cursor IDE. PR Agent is a review system you operate with your own model keys.

How does PR Agent compare to Macroscope?

Macroscope is a hosted AI code review product for GitHub pull requests. PR Agent offers a similar automatic review flow as MIT-licensed software you deploy yourself. You choose the models and where review data is processed.

Is PR Agent free?

Yes. PR Agent is MIT-licensed with no per-seat fee from us. You pay for hosting and AI usage. Add 50 developers and the PR Agent software bill stays at $0.

Which AI models does PR Agent support?

PR Agent works with OpenAI, Anthropic, Google, DeepSeek, OpenRouter, Groq, and more via the Pi provider catalog. You pick the provider and set your own API key on the machine that runs reviews.

Does PR Agent only work with GitHub?

Yes for now. PR Agent connects as a GitHub app, reviews pull requests, and replies in GitHub comments. GitLab and Bitbucket are not supported yet.

What happens if a publish is interrupted?

PR Agent checks the saved result and available evidence. If it cannot confirm the result, it stops that run rather than repeat the change. An unpublished review gets the usual failure notice with /review guidance. An existing published summary is kept. Failed or incomplete evidence reads can still retry. Recovering a run does not use another retry unless PR Agent starts another work attempt. Interrupted work attempts still count; previously failed runs are not reopened automatically.

Where should I host PR Agent?

On a VPS you control, then put HTTPS in front of the web process. A panel such as Dokploy or Coolify can give you a domain and a certificate. Hetzner is a common cheap pick. Hostinger and DigitalOcean also work. The App still needs the same Compose stack. The panel does not replace it.

Installation

Three steps from a fresh machine to a review

You need Docker, a GitHub App, and one AI provider key. GitHub must reach your host over HTTPS.

  1. Step 01

    Create a GitHub app

    Register the app, generate a private key, then install it on the test repo. Creating the app is not enough. If you pick only selected repositories, include that repo.

    Webhook URL
    https://<host>/webhooks
    Homepage URL
    This repository or your public site. Leave user login off.
    Subscribe to
    Pull requests, issue comments, pull request review comments, workflow runs, check suites, check runs, and statuses. Add pull request reviews for approval mode.
    Permissions
    Issues and pull requests: read and write. Repository contents: read and write. Metadata: read. Checks: read and write. Actions: read. Commit statuses: read on every install. Write only if you turn on commit-status posting.

    Full steps are in README Installation.

  2. Step 02

    Fill .env and start the stack

    Copy the example env. Paste the generated App private key as one line, the webhook secret, and a provider key. Then start PR Agent with Compose. The example key is not a real key.

    Terminal
    cp .env.example .env# Fill a real one-line GitHub App PEM, WEBHOOK_SECRET,# and your provider keydocker compose builddocker compose up -d

    Minimum keys to set

    .env
    GITHUB_APP_ID=...GITHUB_APP_PRIVATE_KEY=...WEBHOOK_SECRET=...PI_PROVIDER=openaiPI_MODEL=gpt-4o-miniOPENAI_API_KEY=sk-...
  3. Step 03

    Open a PR and comment /help

    Open a pull request on an installed repo. Comment /help as a repo owner, member, or collaborator. Other accounts get no reply even though GitHub accepted the webhook.

    • /reviewRun a full review; repeated commands acknowledge active work, even when cancellation races intake
    • /describeWrite a readable summary into the PR body
    • /verifyRecheck open findings
    • /cancelCancel a queued or running review
    • /review forceRestart the review on the latest commit
    • /helpList available commands
    • /ask …Ask a question about the code in that thread
    • /triageApply fixes and push. Preview is optional.
    • /triage previewShow the would-be unified diff. Nothing is pushed.
    • /triage allApply the previewed set for this head. Refused without a matching preview.

Run the reviewer yourself

Clone the repository, fill one env file, and start the stack with Compose. The first review lands on your next pull request.

git clone https://github.com/prathamdby/pr-agent