demo.mp4
"DevAgent reviewing a live pull request end to end — webhook to posted review."
An autonomous developer agent that reviews GitHub pull requests and diagnoses GPU-memory issues in PyTorch/CUDA code — with a dashboard to see everything it does.
DevAgent has three parts working together:
- PR review — listens for GitHub pull-request webhooks and posts an automated code review, using a LangGraph pipeline and an LLM.
- Memory debugger — scans a repository (or a specific error traceback) for common GPU-memory antipatterns, combining static analysis with RAG-based retrieval over the codebase to suggest concrete fixes.
- Dashboard — a Next.js console showing review history and a live interface for running debug scans.
+---------------------------+
GitHub PR ------> | FastAPI backend (:8000) |
| |
Browser -------> | /reviews (history) | <----- Next.js frontend (:3000)
| /debug/* (analysis) |
| /webhook/github |
| |
| SQLite . ChromaDB . Docker
+---------------------------+
- Backend — FastAPI. Reviews run through a LangGraph pipeline
(
fetch_diff -> analyze -> post_review); an optional Docker sandbox runs the code under review; the debug module uses ChromaDB for code retrieval. State is persisted in SQLite so the dashboard has history to show. - Frontend — Next.js (App Router) + TypeScript + Tailwind. Talks to the backend over HTTP.
devagent/
├── backend/ FastAPI service
│ ├── app/
│ │ ├── main.py app + routes (/health, /reviews)
│ │ ├── github_webhook.py
│ │ ├── debug_routes.py
│ │ ├── agent/ LangGraph review pipeline
│ │ ├── debug/ analyzer, indexer, static patterns
│ │ └── sandbox/ Docker code-runner
│ ├── cli.py run the debugger from the terminal
│ ├── requirements.txt
│ └── .env.example
├── frontend/ Next.js dashboard
│ └── src/
│ ├── app/ pages (/ and /debug)
│ ├── components/
│ └── lib/ typed API client
└── README.md
You'll run the backend and frontend in two separate terminals.
Requires Python 3.10+.
cd backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\Activate.ps1
pip install -r requirements.txt
cp .env.example .env # then add your LLM API key (see below)
uvicorn app.main:app --reload --port 8000Check http://localhost:8000/health — it should return {"status":"ok"}.
Requires Node.js 18+.
cd frontend
npm install
cp .env.local.example .env.local
npm run devOpen http://localhost:3000. With the backend running, the sidebar status
dot turns green.
DevAgent uses any OpenAI-compatible LLM. Set these in backend/.env:
| Variable | Purpose |
|---|---|
OPENAI_API_KEY |
Your LLM key (OpenAI, or a free Groq key) |
OPENAI_MODEL |
Model name, e.g. gpt-4o-mini or llama-3.3-70b-versatile |
OPENAI_BASE_URL |
Blank for OpenAI; https://api.groq.com/openai/v1 for Groq |
GITHUB_TOKEN |
PAT with Pull requests: Read & Write — only for PR reviews |
GITHUB_WEBHOOK_SECRET |
Matches the secret set on the GitHub webhook |
The debug features need only the LLM key. The GitHub values are required only
for the automated PR-review flow — see backend/README.md
for the full webhook setup (including exposing your local server with ngrok).
The memory debugger also runs standalone, without the dashboard:
cd backend
python cli.py scan /path/to/repo
python cli.py analyze /path/to/repo --traceback-text "RuntimeError: CUDA out of memory..."- LangGraph for the review pipeline. The review is a small state machine
(
fetch_diff -> analyze -> post_review). Modeling it as a graph keeps each step isolated and testable, and makes it easy to add nodes later (e.g. a sandbox-run step) without rewriting the flow. - Webhook returns immediately, reviews run in the background. GitHub expects
a fast response to webhook deliveries, so the endpoint verifies the payload,
queues the agent as a background task, and returns
200right away. - RAG over the codebase for debugging. Rather than sending a whole repo to the LLM, the debug module indexes the code into ChromaDB and retrieves only the snippets relevant to a traceback or a flagged pattern — cheaper, and more focused diagnoses.
- Static checks feed the LLM, not the user directly. Heuristic pattern checks are noisy on their own, so they're used as hints the LLM reasons about with real code context, rather than shown as raw warnings.
FastAPI · LangGraph · ChromaDB · Docker · SQLite · Next.js · TypeScript · Tailwind CSS