Snarky Squirrel

Agentic PR Reviewer

Automated pull-request reviewer that runs a multi-agent LangGraph pipeline, scores code quality and security findings on a 0–10 scale, and optionally posts a structured review comment to GitHub. Built on AWS Bedrock (Claude Haiku), DynamoDB, FastAPI, and Cognito auth.

Sample Output

Security
8.5
Code Quality
7.0
Critical Findings
0
Should Block
No

Agent Pipeline

01

Supervisor

Routes the pipeline and decides agent execution order via the LLM.

02

Security Agent

Scans the PR diff for vulnerabilities. Runs first.

→ security_findings
03

Code Quality Agent

Checks style, complexity, and best practices using prior findings.

→ code_quality_findings
04

PR Reviewer Agent

Produces a holistic review reading all prior findings.

→ pr_review_findings
05

Summary Agent

Aggregates all findings into a scored report and lineage trace.

→ summary_report

Score Formula

score = 10 − (CRITICAL × 5 + HIGH × 2 + MEDIUM × 1 + LOW × 0.5)

A CRITICAL finding sets should_block = true.

Setup

Local — Ollama Ollama (Gemma) in Docker DynamoDB Local Local — Docker Model Docker Desktop built-in DynamoDB Local AWS Bedrock — Claude Haiku AWS DynamoDB

Features

Multi-agent pipeline LangGraph supervisor + specialist agents with shared DynamoDB memory.
Flexible LLM backends Ollama, Docker Model Runner, or AWS Bedrock — switched via one env var.
Cognito auth OAuth2 via AWS Cognito Hosted UI with RS256 JWT validation and invite-only access.
Data lineage Per-run agent trace stored in DynamoDB, surfaced in the web UI sidebar.
GitHub integration Fetches PR diffs via GitHub API. Posts review comments back — HMAC-verified webhooks.
Evaluation framework Offline, shadow, and online eval modes with thumbs feedback and aggregate metrics.
Cost ~$0.05–0.12 per PR review on AWS (Bedrock Haiku + DynamoDB on-demand + t3.micro).

Links

Questions, issues, or ideas — open a GitHub issue or reach out directly.