PR Agent

PR Agent

AI reviews your pull requests on your own servers

Same first pass every PR gets, without a per-seat bill. Your infrastructure, your model keys, your code never leaves.

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 PR follows the same path inside GitHub - no extra dashboard, no per-seat bill from PR Agent.

  1. Deploy once on infrastructure you control

    Stand up the GitHub App, Postgres, and workers. Your installation credentials and model keys stay in your environment - not a vendor account.

    Your servers · your keys

  2. A pull request opens

    GitHub delivers a signed webhook. PR Agent records it, reacts with eyes so the team knows work started, and queues a review for that head.

    pull_request opened

  3. A worker inspects the change set

    The agent checks out the PR head, reads the diff, and looks for bugs and correctness issues. When the diff touches dangerous APIs, it also hunts for security tripwires.

    Local PR workspace on the worker

  4. Results land in the pull request

    Inline threads show up on Files changed. A review summary lands in the conversation. Need more? Comment /describe, /review-security, /review-quality, /ask, or @-mention the bot - answers stay in the same thread.

    /review · /describe · /ask · @bot

  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

Trigger a pass from a pull request comment, or let the automatic path run when a PR opens.

  • /review

    Catch review basics before a human opens the diff

    Inline comments appear on the Files changed tab.

  • /describe

    Turn a blank PR body into a readable summary

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

  • /review-security

    Ask for a security pass when the change touches risk

    Security notes are posted as a separate summary.

  • /review-quality

    Ask for a quality pass before merge

    Maintainability notes land in the PR conversation.

  • /ask

    Ask code questions without leaving GitHub

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

  • 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

Built from the same summary, description, and ask formats the worker publishes to GitHub.

  • /review

    Review summary

    PR conversation comment under ## PR Agent Review.

    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.
    EffortModerate · 3/5
    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
    Merge verdict3/5 · Fix the intake race before merge on this pass.
    Prompt to fix
    Verify each finding against current code. Fix only still-valid issues.
  • /describe

    Description block

    Merged into the PR body under ## PR Agent Description.

    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

    Question and answer on the PR conversation.

    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.

  • /review-security

    Security review

    Same summary shape under ## PR Agent Security Review.

    PR Agent

    PR conversation comment

    PR Agent Security Review

    Note

    Security pass on webhook intake and publish paths for auth and secret-handling risks.
    EffortModerate · 3/5
    P1 · c4

    Webhook secret compared with a non-constant-time check

    On the diff · src/webhooks/verify.ts · lines 36-41

    P2 · c3

    Error path may echo provider response bodies

    Summary only · src/agent/providerErrors.ts · lines 88-94

    Relevant testspartial
    SecurityTiming-safe compare gap on webhook verification.
    Merge verdict2/5 · Resolve the timing-safe compare before merge on this pass.
    Prompt to fix
    Verify each finding against current code. Fix only still-valid issues.
  • /review-quality

    Quality review

    Same summary shape under ## PR Agent Quality Review.

    PR Agent

    PR conversation comment

    PR Agent Quality Review

    Note

    Maintainability pass on settings routing and publish helpers.
    EffortModerate · 3/5
    P2 · c3

    Settings read duplicated across three call sites

    On the diff · src/settings/runtime.ts · lines 44-61

    P3 · c2

    Publish helper mixes formatting and I/O

    Summary only · src/review/publish/publishReview.ts · lines 210-240

    Relevant testspartial
    SecurityNone found on this pass
    Merge verdict4/5 · No blocking findings on this pass.
    Prompt to fix
    Verify each finding against current code. Fix only still-valid issues.

$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.

  • Cursor models

    Use Cursor models while keeping the review pipeline on your own servers.

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 a hosted review layer. 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-licensedRuns the reviewer, queue, model keys, and data path in your account.
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 reviews GitHub pull requests on your servers. You deploy webhook intake, a Postgres job queue, background workers, and AI agents. It posts reviews, PR descriptions, security notes, quality notes, and Q&A replies back to GitHub.
Is PR Agent a self-hosted alternative to CodeRabbit?
Yes. PR Agent covers GitHub reviews on PR open, verification on sync, inline comments, PR summaries, descriptions, and slash-command triggers. Unlike CodeRabbit's hosted SaaS, PR Agent runs on your servers, uses your GitHub App credentials, and lets you bring your own LLM provider.
How does PR Agent compare to Greptile?
Greptile is a cloud AI code reviewer that indexes full repositories for cross-file context. PR Agent is self-hosted and investigates each pull request from a shallow checkout of the PR head plus GitHub diff metadata. PR Agent fits teams that want data residency, infrastructure control, and open-source deployment instead of a managed Greptile subscription.
Does PR Agent replace Cursor Bugbot?
PR Agent fits teams that want bug-and-correctness reviews on GitHub without Cursor's cloud review service. PR Agent supports the Cursor SDK as one LLM backend, so Cursor users keep familiar models while self-hosting the review pipeline. Bugbot remains tied to the Cursor IDE workflow; PR Agent is a review platform you operate.
How does PR Agent compare to Macroscope?
Macroscope is a hosted AI code review product focused on GitHub pull requests. PR Agent offers a similar automated review and publish flow but as an MIT-licensed platform you deploy yourself. You control Postgres, queue workers, model choice, and where review data is processed.
Is PR Agent free?
Yes. PR Agent is MIT-licensed software with no per-seat fee from PR Agent. You pay for your hosting, Postgres, and LLM token usage. Add 50 developers and your PR Agent software bill stays at $0.
Which AI models does PR Agent support?
PR Agent supports Pi providers (OpenAI, Anthropic, Google, DeepSeek, OpenRouter, Groq, and more) and the Cursor SDK for Cursor models. You configure the provider with environment variables on your worker.
Does PR Agent only work with GitHub?
Today PR Agent is a GitHub App. It listens for pull_request, issue_comment, and pull_request_review_comment webhooks and publishes reviews and replies on GitHub pull requests. 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 the webhook at the host where you will run PR Agent.

    Webhook URL
    https://<host>/webhooks
    Subscribe to
    pull_request · issue_comment · pull_request_review_comment
    Permissions
    Issues and Pull requests: read/write · Contents: read/write · Metadata: read

    Need the click-by-click path? See README Getting Started.

  2. Fill .env and start the stack

    Copy the example env, drop in your GitHub App values and provider key, then bring the web + worker services up 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=...
    AGENT_PROVIDER=pi
    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 slash command in the conversation when you want a specific lens.

    • /reviewGeneral bug-and-correctness pass on the diff
    • /describeWrite a readable summary into the PR body
    • /review-securitySecurity lens when the change touches risk
    • /review-qualityMaintainability notes before you merge
    • /ask …Ask a question about the code in that thread