Overview
Nectr automatically reviews every pull request using an AI-powered workflow that combines diff analysis, contextual intelligence from Neo4j and Mem0, and optional MCP integrations. When a PR is opened or updated, GitHub sends a webhook that triggers the review pipeline.The entire review process runs asynchronously in the background, returning an HTTP 200 immediately to avoid webhook timeouts.
Architecture Diagram
Workflow Stages
Configuration
Standard vs Parallel Mode
Set thePARALLEL_REVIEW_AGENTS environment variable to enable parallel specialized agents:
- Larger PRs (>500 lines) where specialized analysis helps
- Security-critical repos that need thorough security review
- High-traffic repos where you want faster turnaround (parallel = faster)
- Small to medium PRs (<500 lines)
- Repos where context depth matters more than speed
- When you want Claude to follow its own reasoning thread
MCP Integration (Optional)
Set these environment variables to enable MCP context sources:Performance
Average Review Time
Standard mode: 15-30 secondsParallel mode: 10-20 seconds
Context Sources
GitHub: PR diff, files, issuesNeo4j: File experts, related PRsMem0: Project patterns, developer habitsMCP: Linear, Sentry, Slack (optional)
Error Handling
Nectr handles failures gracefully at every stage:- GitHub API errors: Logged, workflow marked as failed, no review posted
- Neo4j unavailable: Silently skips graph queries, continues with Mem0 context
- Mem0 unavailable: Silently skips memory queries, continues with Neo4j context
- MCP integration errors: Logged, continues without that integration’s data
- Review posting failure: Attempts GitHub review first, falls back to flat comment
Related Files
app/services/pr_review_service.py— Main orchestrator (view source)app/services/ai_service.py— Claude integration + parallel agents (view source)app/integrations/github/client.py— GitHub REST API client (view source)app/api/v1/webhooks.py— Webhook receiver (view source)