An autonomous software engineering system built with LangGraph, OpenAI, and the Model Context Protocol (MCP).
The system accepts a software development task, generates an implementation plan, writes production-ready code, reviews its own work, executes the generated project, detects runtime failures, repairs the responsible files, and repeats until the project successfully executes.
- Multi-agent architecture
- LangGraph orchestration
- Structured LLM outputs
- Automatic planning
- Code generation
- Code review with retry loops
- Runtime execution
- Execution-aware repair loop
- MCP filesystem integration
- Stateful workflow execution
The system consists of six specialized agents:
| Agent | Responsibility |
|---|---|
| Planner | Breaks a software task into implementation steps |
| Coder | Generates production-ready code for a single step |
| Reviewer | Reviews generated code and requests revisions if necessary |
| Filesystem | Writes approved files using MCP |
| Executor | Executes the generated project (install, test, run) |
| Execution Reviewer | Analyses runtime failures and identifies the file responsible |
- User provides a software engineering task.
- Planner creates an implementation plan.
- Coder implements the current step.
- Reviewer validates generated code.
- Failed reviews are sent back to the coder.
- Approved files are written through MCP.
- After all files are generated, the executor:
- installs dependencies
- runs automated tests
- validates application startup
- If execution fails:
- an Execution Reviewer analyses the failure
- identifies the file responsible
- sends only that file back for repair
- The workflow repeats until execution succeeds.
- Python
- LangGraph
- LangChain
- OpenAI Structured Outputs
- Pydantic
- FastAPI
- MCP (Filesystem Server)
Execution Failed
↓
pytest reports failing tests
↓
Execution Reviewer
↓
Target file:
test_main.py
↓
Coder regenerates test_main.py
↓
Reviewer approves
↓
File written via MCP
↓
Tests rerun
↓
Success
backend/
│
├── agents/
│ ├── planner.py
│ ├── coder.py
│ ├── reviewer.py
│ ├── filesystem.py
│ ├── executor.py
│ └── execution_reviewer.py
│
├── graphs/
│
├── prompts/
│
├── services/
│
├── models/
│
└── generated_project/
- Docker execution
- Ruff / Black / MyPy validation
- Git integration
- Parallel execution
- Dependency-aware execution
- Incremental builds
- Web interface for workflow visualization
Most code-generation agents stop after producing source code.
This project continues until the generated software actually executes successfully, creating an autonomous software engineering workflow rather than a simple code generator.