Self-hosted AI pull request review platform
PR Agent is a full platform you deploy yourself: webhook intake, durable job queues, AI workers, and publish back to GitHub. An open-source alternative to hosted reviewers like CodeRabbit, Greptile, and Cursor Bugbot.
Reviews, descriptions, and Q&A on pull requests. Your infrastructure, your credentials, your model provider.
Or scroll to usage for Docker Compose quickstart.
How AI code review works on PR Agent
Fast intake. GitHub webhooks are verified, deduplicated, and enqueued in Postgres before the HTTP response returns. A review backlog does not block webhook acceptance.
Self-hosted. You run the web intake and worker processes on your infrastructure. Postgres, pg-boss, and GitHub App credentials stay under your control.
AI on pull requests. Workers clone the PR head, run an AI investigation pass, and publish structured reviews, descriptions, and answers back to GitHub.
Slash commands. Trigger reviews, descriptions, and Q&A from PR comments with /review, /describe, /ask, and more.
Large PRs. File listing and patch caps keep runs bounded. Truncation is explicit when the change set is clipped.
GitHub pull request review features
AI code reviews
Auto on PR open and sync, or /review
Automated pull request review with inline comments on the Files changed tab.
PR descriptions
Auto on PR open, or /describe
AI-generated summary bullets and optional diagram merged into the PR body.
Security reviews
/review-security
Security-focused code review as a separate summary on the pull request.
Quality reviews
/review-quality
Code quality and maintainability review on demand.
Q&A on PRs
/ask <question>
Ask questions about PR code from the conversation or an inline diff thread.
Docs-only fast path
Auto on trivial doc-only PRs
Skips full AI review when every changed file is documentation.
AI pull request review examples on GitHub

/review
/describe
/ask
/review-security
/review-qualityBring your own AI model
Pi (default)
OpenAI, Anthropic, Google, DeepSeek, OpenRouter, Groq, and more. Bring your own API keys.
Cursor SDK
Run AI code review with Cursor models. Option for teams comparing Cursor Bugbot vs self-hosted review.
Unlike fixed-model SaaS reviewers, PR Agent lets you switch LLM providers without changing your GitHub review workflow. See usage or the repo README for setup.
Self-hosted alternative to hosted AI reviewers
Teams evaluating CodeRabbit, Greptile, Cursor Bugbot, or Macroscope often need a GitHub pull request reviewer that runs on their own infrastructure. PR Agent is built for that.
| Tool | Deployment | Notes |
|---|---|---|
| PR Agent | Self-hosted (open source) | Full platform on your infra. BYO model. No per-seat fee. |
| CodeRabbit | Cloud SaaS (self-host enterprise) | Polished hosted reviewer. Multi-platform. Subscription pricing. |
| Greptile | Cloud SaaS (self-host option) | Full-repo indexing for cross-file context. Managed service. |
| Cursor Bugbot | Cloud (Cursor ecosystem) | Low-noise bug focus. Tight Cursor IDE integration. |
| Macroscope | Cloud SaaS | Hosted GitHub PR review. Managed pipeline. |
Frequently asked questions
- What is PR Agent?
- PR Agent is an open-source, self-hosted AI pull request review platform for GitHub. You deploy webhook intake, a durable job queue, background workers, and AI agents on your own infrastructure. It publishes automated reviews, PR descriptions, security and quality reviews, and Q&A replies on pull requests.
- Is PR Agent a self-hosted alternative to CodeRabbit?
- Yes. PR Agent covers the core CodeRabbit workflow on GitHub: automated reviews on PR open and sync, inline comments, PR summaries, descriptions, and slash-command triggers. Unlike CodeRabbit's hosted SaaS, PR Agent runs entirely 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.
- Can PR Agent replace Cursor Bugbot?
- PR Agent can replace Bugbot for teams that want automated 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 can keep familiar models while self-hosting the review pipeline. Bugbot remains tighter to the Cursor IDE workflow; PR Agent is a full 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?
- PR Agent is open source under the MIT license. Software is free; you pay for your own hosting, Postgres, and LLM API usage. There is no per-developer SaaS fee from PR Agent itself.
- Which AI models does PR Agent support?
- PR Agent supports many providers through Pi (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 self-hosted AI code review
1. Create a GitHub App
- Webhook URL:
https://<host>/webhooks - Events:
pull_request,issue_comment,pull_request_review_comment - Permissions: Issues and Pull requests read/write, Contents read
Full steps in the README Getting Started.
2. Docker Compose
cp .env.example .env
# Set GITHUB_*, WEBHOOK_SECRET, and provider API keys
docker compose build
docker compose up3. Slash commands
/review
/describe
/review-security
/review-quality
/ask Why is this function async?Minimal env
DATABASE_URL=...
GITHUB_APP_ID=...
GITHUB_APP_PRIVATE_KEY=...
WEBHOOK_SECRET=...
AGENT_PROVIDER=pi
PI_PROVIDER=openai
PI_MODEL=gpt-4o-mini
OPENAI_API_KEY=sk-...