PR Pilot autonomously reviews pull requests using a 5-agent pipeline: Reviewer reviews, Fixer patches, Tester validates, Verifier gates, Escalator decides. Built for the Build with Gemini XPRIZE.
Each agent specializes in one phase of review. Context flows through the chain — the Fixer sees what the Reviewer found, the Verifier checks the Fixer's patches, and the Escalator makes the final call.
FastAPI webhook → AgentChain orchestration → Gemini API → GitHub comment/post
Deploy on Google Cloud Run with zero-downtime, auto-scaling, and request concurrency. One gcloud run deploy command.
Every agent's reasoning, every fix generated, every decision logged to data/reviews/. Structured JSON for compliance and transparency.
PR Pilot doesn't just approve or reject. It operates at three graduated levels — each escalating only when confidence demands it. This is the safety gate that separates autonomous review from automated rubber-stamping.
Issues found, fixes attached as review comments. The PR author sees what to change and why. No merge blocked. Low confidence findings.
Medium-confidence issues that should block merge until addressed. Fixes provided inline. PR blocked until author responds.
All agents agree: the PR is clean, fixes are verified, tests pass. PR Pilot auto-approves and merges. No human in the loop.
Built for the Build with Gemini XPRIZE. Every requirement is met with documentation to match.
| Requirement | Implementation |
|---|---|
| Gemini API | All 5 agents use Gemini 2.5 Flash via google-generativeai. Structured output support. Exponential retry. |
| Google Cloud Deploy | Cloud Run (serverless), Cloud Build (CI/CD), Artifact Registry (containers). cloudbuild.yaml included. |
| Stripe Integration | Stripe Checkout for premium features. Usage-based billing via Stripe Metered billing API. Webhook handling. |
| Code Quality | Type hints throughout. Structured logging (structlog). 85%+ test coverage. Pre-commit hooks. |
| Open Source | MIT licensed. Public repo with contribution guide, issue templates, and pull request template. |
gcloud run deploy pr-pilot \
--source . \
--region us-central1 \
--allow-unauthenticated \
--set-env-vars \
GEMINI_API_KEY=...,\
GITHUB_APP_ID=...
# Visit the GitHub App install page:
# https://github.com/apps/pr-pilot
# Select repos, configure webhook:
# → https://pr-pilot-xxx-uc.a.run.app/webhook
$ git checkout -b feat/new-feature
$ # ... make changes ...
$ git push && gh pr create
# Seconds later:
# @pr-pilot-bot commented: "Reviewed. 2 suggestions. 0 issues."