Skip to main content

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 the PARALLEL_REVIEW_AGENTS environment variable to enable parallel specialized agents:
When to use parallel mode:
  • 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)
When to use standard mode:
  • 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:
If not set, Nectr silently skips that integration — reviews still work without them.

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
If the PR review fails completely, check the /api/v1/events endpoint to see the error details stored in the Event record.
  • 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)