Multi-agent coding pipeline that takes a Git repo URL and a task description, then autonomously plans, codes, tests, reviews, and creates a PR — running in Docker.
User → [Next.js UI] → Streaming API Route (/api/run)
│
├─→ git clone (local filesystem)
│
├─→ Planner Agent (read file tree, create plan)
├─→ Coder Agent (write files locally via LLM)
├─→ Tester Agent (detect framework, run tests)
└─→ Reviewer Agent (LLM review vs task description)
│
┌──────┘
│ if test fails / review rejects → loop back to Planner
│ if approved → git push → create PR via GitHub API
Feedback loop: if tests fail or the reviewer rejects, the planner re-analyzes with failure context and tries again (up to MAX_RETRIES).
cp .env.example .env
# Edit .env — set OPENAI_API_KEY and GITHUB_TOKEN
docker compose up --build
# Open http://localhost:3000| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY |
Yes | — | OpenAI API key |
GITHUB_TOKEN |
Yes | — | GitHub PAT with repo scope |
LLM_MODEL |
No | gpt-4o |
OpenAI model for all agents |
MAX_RETRIES |
No | 3 |
Max plan→code→test→review iterations |
- Planner clones the repo locally, reads the file tree, and asks GPT-4o to produce a structured plan with per-file subtasks.
- Coder reads each file from disk, sends it + the subtask to GPT-4o, writes the new content back to disk.
- Tester auto-detects the test framework (pytest, npm test, go test, etc.) and actually runs the tests inside the container. If tests fail, feedback loops to the Planner.
- Reviewer examines all changes against the original task. If rejected, feedback loops to the Planner.
- On approval, the orchestrator pushes the branch and opens a PR via the GitHub API.
npm install
cp .env.example .env.local
# Set your keys in .env.local
npm run dev
# Open http://localhost:3000- Next.js 15 (App Router)
- TypeScript
- Tailwind CSS
- OpenAI SDK (GPT-4o)
- Octokit (GitHub API for PR creation)
- Docker (git, python, node available in container)
- SSE streaming for real-time logs