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