PR Agent

PR Agent: AI PR reviews on your own servers

PR Agent

Same first pass every PR gets, without a per-seat bill. You run the service and Postgres, and you own the GitHub App credentials and model keys. Model-backed work sends the review context to the provider you configure.

Deploy from the README

MIT licensed. Hosting and AI usage on you.

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. 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. Someone opens a pull request

    PR Agent notices and starts a review. Your team sees a reaction on the pull request so everyone knows work has begun.

    Starts when a pull request opens

  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. 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 bot. Replies stay in the same thread.

    /review · /describe · /ask · /triage

  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

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

    Comments land next to the lines that need attention.

  • /describe

    Turn a blank PR body into a readable summary

    Summary bullets and an optional diagram go into the PR body.

  • /ask

    Ask code questions without leaving GitHub

    Get an answer in the same thread, right where the code lives.

  • /triage

    Revisit earlier findings on the pull request

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

  • automatic

    Skip AI review when the PR is only docs

    Docs-only pull requests take a lighter path instead of a full review.

What lands on the pull request

Same summary, description, ask, and triage formats PR Agent posts on a real pull request.

  • /review

    Review summary

    A summary comment on the pull request conversation.

    PR Agent

    PR conversation comment

    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

    Relevant testspartial
    SecurityNone found on this pass
    Prompt to fix
    Verify each finding against current code. Fix only still-valid issues.
  • /describe

    Description block

    A readable summary merged into the pull request body.

    PR Agent

    merged into the pull request body

    PR Agent Description

    PR Type

    Enhancement, Documentation

    Description

    • Route review concurrency knobs through the settings module.
    • Keep worker env reads out of feature modules.

    Changes Diagram

    flowchart LR
      Webhook --> Intake --> Queue --> ReviewWorker

    File Walkthrough

    Enhancement (2 files)

    src/settings/constants.ts

    • Expose REVIEW_CONCURRENCY default
  • /ask

    Ask reply

    A question and answer right on the pull request.

    PR Agent

    PR conversation reply

    Question: Why is the retry wrapper needed around the webhook dispatcher?

    Answer:

    Transient GitHub 502s were dropping webhook deliveries before durable intake completed. The retry wrapper keeps the delivery alive long enough for the Postgres write and acknowledgement reaction to finish, then the worker picks up the agent work item.

  • /triage

    Triage report

    Verdicts on earlier findings, with fixes pushed when they still apply.

    PR Agent

    PR conversation comment

    PR Agent Triage

    Full PR triage.
    Evaluated head: c4f8a91b2e3d4a5b6c7d8e9f0a1b2c3d4e5f6a7b

    1 Fixed · 1 Already resolved · 0 Skipped · 1 Dismissed · 0 Previously resolved

    Pushed commits:

    • a1b2c3d Fix webhook ack race (1 files, +12 -3)
    SeverityFindingLocationVerdictThread
    P1Webhook ack can race the durable writesrc/webhooks/intake.ts L148Fixed a1b2c3dthread
    P2Summary edit ignores stale head guardsrc/review/publish.ts L91Already resolvedthread
    P2Docs-only path skips durable ack waitsrc/webhooks/intake.ts L162Dismissedthread

    Policy suggestions for dismissed findings

    Commit these to .pr-agent/*.mdc to steer future reviews:

    Create .pr-agent/src-webhooks-intake.mdc with:

    ---
    globs:
      - "src/webhooks/intake.ts"
    alwaysApply: false
    ---
    
    Intentional: docs-only PRs skip the durable ack wait by design.

$0

No per-seat fee, ever

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

Software is free

$0 from PR Agent

No credit card. No per-seat fee. Open source under MIT.

You pay your own vendors

Hosting and AI usage only

Cover your server, database, and model bills. Add more developers without raising your PR Agent bill.

You own the full stack

Your security rules apply

Run it inside your network, choose your AI provider, and keep review traffic under your policies.

Change models without retraining your team

  • Many model providers

    Use OpenAI, Anthropic, Google, DeepSeek, OpenRouter, Groq, and more with your own API keys.

Switch from GPT to Claude to DeepSeek by changing a setting. Your GitHub workflow stays the same. See Docker Compose setup or the repo README.

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.

ToolDeploymentNotes
PR AgentSelf-hosted, MIT-licensedYou run the reviewer, hold the model keys, and choose the model provider.
CodeRabbitCloud SaaS (self-host enterprise)Hosted reviewer with subscription pricing and a managed data path.
GreptileCloud SaaS (self-host option)Managed full-repo indexing for cross-file context.
Cursor BugbotCloud (Cursor ecosystem)Bug-focused review tied to the Cursor ecosystem.
MacroscopeCloud SaaSHosted GitHub PR review with a managed pipeline.

Questions teams ask before they deploy

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 when they open, 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.

Deploy it with Docker Compose

Three steps from an empty machine to a review on a real pull request. You need Docker, a GitHub app, and one AI provider key.

  1. Create a GitHub app

    Register the app on your account or org, then point GitHub at the host where you will run PR Agent.

    Webhook URL
    https://<host>/webhooks
    Subscribe to
    Pull requests · Issue comments · Pull request review comments
    Permissions
    Issues and Pull requests: read/write · Contents: read/write · Metadata: read

    Need the click-by-click path? See README Host with Docker Compose.

  2. Fill .env and start the stack

    Copy the example env, drop in your GitHub app values and provider key, then start PR Agent with Compose.

    cp .env.example .env
    # Fill GITHUB_*, WEBHOOK_SECRET, and your provider key
    docker compose build
    docker compose up

    Minimum keys to set

    DATABASE_URL=postgres://...
    GITHUB_APP_ID=...
    GITHUB_APP_PRIVATE_KEY=...
    WEBHOOK_SECRET=...
    PI_PROVIDER=openai
    PI_MODEL=gpt-4o-mini
    OPENAI_API_KEY=sk-...
  3. Open a PR and talk to it

    Install the app on a repo, open a pull request, and wait for the automatic pass. Or type a command in the conversation when you want more.

    • /reviewRun a full review on the changes
    • /describeWrite a readable summary into the PR body
    • /ask …Ask a question about the code in that thread
    • /triagePreview with /triage preview, apply with /triage all
    • /triage previewShow the would-be unified diff. Nothing is pushed.
    • /triage allApply the previewed set. Optional exclude <thread ids>.