A production-grade, multi-agent AI system built on LangGraph that plans, codes, tests, and reviews software autonomously in a sandboxed environment.
This project implements a sophisticated orchestration pipeline where specialised AI agents collaborate to break down natural language requirements into architectural designs, write backend and frontend code, run tests, review code for security flaws, and gracefully manage their own token memory.
At the core of this system is the Builder-as-Architect philosophy. Rather than having a single massive LLM context try to generate an entire application at once, the system delegates responsibilities strictly:
- Design First: The Architect designs the entire project structure and APIs upfront. No code is written until the architecture is agreed upon.
- Atomic Execution: The Task Planner decomposes the architecture into tiny, atomic tasks.
- Specialized Workers: Frontend and Backend engineers execute single tasks from a queue with bounded autonomy.
- Validation Pipeline: Every artifact is subjected to deterministic tests and static analysis before being accepted.
This philosophy guarantees high-quality, reproducible outputs, avoiding the "infinite loop" and "hallucination cascade" problems common in agentic systems.
- Orchestration: LangGraph (StateGraph)
- Language Models: LangChain, OpenAI (or compatible API)
- State Management: Pydantic (data validation) & Python TypedDict
- Observability: LangSmith (Distributed tracing of LLM and graph node execution)
- Tooling: Sandboxed Subprocess Executors, Git integration, Python FileSystem Manager
- Infrastructure: FastAPI (API Endpoints), Docker Compose, PostgreSQL (State Persistence), Redis (Task Queueing)
graph TD
INIT(Initializer) --> REQ[Requirement Analyzer]
REQ --> ARCH[Architect Agent]
ARCH --> TASK[Task Planner]
TASK --> |If Tasks Exist| ROUTER{Task Router}
ROUTER --> |Frontend Task| FRONTEND[Frontend Engineer]
ROUTER --> |Backend Task| BACKEND[Backend Engineer]
FRONTEND --> ROUTER
BACKEND --> ROUTER
ROUTER --> |Queue Empty| MEM[Memory Compression]
MEM --> QA[QA Tester]
QA --> |Failures| WATCHDOG{Watchdog Node}
QA --> |Pass| REV[Code Reviewer]
REV --> |Issues Found| WATCHDOG
REV --> |Pass| END_NODE(((End)))
WATCHDOG --> |Retry Count < 3| ROUTER
WATCHDOG --> |Retry Count >= 3| HUMAN[Human Approval / Halt]
HUMAN --> END_NODE
-
Clone the repository and set up a virtual environment
git clone <repository_url> cd <repository_dir> python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
-
Install Dependencies
pip install -e . -
Configure Environment Variables
cp .env.example .env # Edit .env — at minimum set OPENAI_API_KEY and LANGSMITH_API_KEYSee .env.example for all available options.
-
Start the FastAPI orchestration server
uvicorn src.app:app --host 0.0.0.0 --port 8000 --reload
-
Kick off a new project
curl -X POST http://localhost:8000/api/v1/execute \ -H "Content-Type: application/json" \ -d '{ "requirements": "Build a simple to-do application with a FastAPI backend and React frontend.", "project_name": "ToDoApp" }'
Full distributed tracing of every LLM call, LangGraph node transition, and tool invocation via LangSmith — zero code changes required once LANGSMITH_API_KEY is set.
See src/core/observability.py for the implementation details.
Next Steps: See ARCHITECTURE.md and AGENTS.md for deeper technical insights.