This link shows a comment made to a PR by our bot: Sentinel-PR/sentinel-sandbox#4 (review)
π€ An AI-powered GitHub PR review bot using LangGraph multi-agent workflows
Sentinel automatically reviews GitHub pull requests by analyzing code changes and posting structured feedback. It behaves like a senior reviewer, focusing on correctness, security, and maintainability.
GitHub Webhook β API Service β Redis Queue β Worker β LangGraph β GitHub Review
β β β
PostgreSQL βββββββββββββββββββββ
Services:
- API Service (FastAPI) - Receives webhooks, verifies signatures, enqueues jobs
- Worker Service - Consumes jobs, runs AI review workflow, posts reviews
- PostgreSQL - Job tracking, idempotency, audit trail
- Redis - Job queue, locks, SHA coalescing
- Docker & Docker Compose
- Python 3.11+
- GitHub App credentials
- OpenAI API key
-
Clone and configure:
git clone https://github.com/your-org/sentinel.git cd sentinel cp .env.example .env # Edit .env with your credentials
-
Start services:
docker compose up -d
-
Verify:
curl http://localhost:8000/health
# Install dependencies
pip install -e ".[dev]"
# Run API service
uvicorn api.main:app --reload
# Run worker (separate terminal)
python -m worker.main
# Run tests
pytestsentinel/
βββ api/ # FastAPI webhook service
β βββ routes/ # Endpoint handlers
β βββ services/ # Business logic
β βββ models/ # Pydantic schemas
βββ worker/ # Background worker
β βββ github/ # GitHub API client
β βββ workflow/ # LangGraph review engine
β βββ output/ # Review publishing
βββ shared/ # Shared utilities
β βββ db/ # Database models & session
β βββ queue/ # Redis client
βββ tests/ # Test suite
Parse Diff β Classify PR β Fetch Context
β
βββββββββββββββββββΌββββββββββββββββββ
β β β
Correctness Agent Security Agent Maintainability Agent
β β β
βββββββββββββββββββΌββββββββββββββββββ
β
Aggregator β Guardrails β Post Review
Key environment variables (see .env.example):
| Variable | Description |
|---|---|
GITHUB_APP_ID |
GitHub App ID |
GITHUB_WEBHOOK_SECRET |
Webhook signature secret |
OPENAI_API_KEY |
OpenAI API key for LLM |
DATABASE_URL |
PostgreSQL connection string |
REDIS_URL |
Redis connection string |
- Implementation Plan - Detailed architecture and phases
- API Reference - Coming soon
- Contributing - Coming soon
MIT License - see LICENSE