Agent seriesMedium complexityGitHub

PR Review Agent

AI-powered GitHub pull request reviewer that analyzes diffs, retrieves relevant code context (RAG), and posts production-grade feedback directly on PRs.

Video

Walkthrough of the workflow end-to-end.

Tech stack

Tools and frameworks involved.

GitHubLangGraphFastAPIPythonGoogle GeminiFAISSSQLiteSlack

GitHub repository

Enter your email to view the repo link.

What it helps with

Code reviews create bottlenecks and inconsistency. Reviewers spend time on obvious issues and context gathering instead of focusing on architecture and correctness. PRs wait in the queue, quality varies, and production risks slip through.

What it does

  • Receives GitHub pull_request events (opened, synchronize, reopened) via webhook
  • Validates and chunks large diffs to stay efficient and reliable
  • Uses RAG to retrieve relevant repository code for better context
  • Reviews changes across a 9-dimension framework (critical issues, reliability, database safety, resources, code quality, validation, performance, architecture, production readiness)
  • Posts review findings directly on the PR (and optionally sends a Slack summary)
  • Gracefully degrades on timeouts/quota issues and posts partial results when needed

How it works (high level)

  1. 1GitHub webhook triggers the FastAPI webhook receiver for PR events
  2. 2LangGraph orchestrates the state machine: fetch PR metadata → validate → analyze diff → build RAG index → review chunks → merge + validate findings → publish results
  3. 3FAISS is used for semantic retrieval of relevant code context
  4. 4Google Gemini performs the LLM analysis on each chunk
  5. 5Results are published to GitHub PR comments and optionally to Slack; SQLite checkpoints preserve progress across restarts

Want this for your team?

We'll adapt the workflow to your rules, approvals, and systems—then harden it for production.

Have a similar workflow in mind?

We'll scope it, build a proof-of-concept, and get it running.

    PR Review Agent | Agent series | Kwanso | Kwanso