whatisgithub

What is pr-agent?

prathamdby/pr-agent — explained in plain English

Analysis updated 2026-05-18

2TypeScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

A GitHub App that automatically reviews pull requests using an AI agent loop and posts findings as comments.

Mindmap

mindmap
  root((pr-agent))
    What it does
      Reviews pull requests
      Posts AI summary comments
      Responds to review command
    Tech stack
      TypeScript
      Effect TS
      Docker
      Zod
    Use cases
      Automatic PR review
      Manual review trigger
      Self hosted GitHub App
    Audience
      Developers
      Engineering teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically post an AI-generated review comment when a pull request opens or updates

USE CASE 2

Trigger a manual PR review on demand with a /review slash command

USE CASE 3

Deploy a self-hosted GitHub App that reviews pull requests using an AI agent loop

What is it built with?

TypeScriptEffect TSDockerZod

How does it compare?

prathamdby/pr-agentarashthr/hugo-flowargeneau12e/kairos-tx
Stars222
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatehard
Complexity4/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires a configured GitHub App plus an LLM provider API key.

So what is it?

pr-agent is a GitHub App webhook service that automatically reviews pull requests using an AI agent. When someone opens, updates, or reopens a pull request, the service receives a webhook notification from GitHub, runs an agent loop that inspects the PR, and posts a review comment summarizing its findings. It also responds to slash commands typed in PR comments: /review triggers a manual review on demand. The agent loop works by giving an AI model access to GitHub's REST API through a tool-based interface. The model calls these tools to examine code changes, read file contents, and post a review. The loop runs until the model finishes or hits a configurable round limit (MAX_TOOL_ROUNDS). A finalization step ensures the loop always ends with a complete text response rather than an unfinished tool call. Webhook deliveries are deduplicated using the X-GitHub-Delivery header (or a SHA-256 hash of the body as fallback), so retries from GitHub do not trigger duplicate reviews. Concurrent review runs are bounded by a REVIEW_CONCURRENCY setting (default 2) to prevent large bursts of pull request activity from spawning unbounded parallel AI calls. Incoming webhook payloads are validated with Zod shapes before processing. The service is built with TypeScript and uses Effect TS as its runtime. It can be deployed using Docker Compose with a multi-stage Dockerfile, exposes a /health endpoint, and requires a GitHub App configured with repository permissions for issues, pull requests, and contents. A provider API key (for the underlying LLM) must also be set in the environment.

Copy-paste prompts

Prompt 1
Help me set up pr-agent as a GitHub App to auto-review pull requests.
Prompt 2
Show me how to configure REVIEW_CONCURRENCY and MAX_TOOL_ROUNDS in pr-agent.
Prompt 3
Explain how pr-agent deduplicates webhook deliveries using the X-GitHub-Delivery header.

Frequently asked questions

What is pr-agent?

A GitHub App that automatically reviews pull requests using an AI agent loop and posts findings as comments.

What language is pr-agent written in?

Mainly TypeScript. The stack also includes TypeScript, Effect TS, Docker.

How hard is pr-agent to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is pr-agent for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.