MAAD is an advanced AI orchestration system featuring 5 specialized agents (Planner, Architect, Developer, Debugger, Tester) working in a transparent pipeline. With per-agent model optimization, you can configure different LLMs for each agent to maximize quality while controlling costs.
Transform plain-English product ideas into production-ready full-stack applications.
ββββββββββββββββββββββββ
β USER PROMPT β
β "Build a todo app" β
ββββββββββββ¬ββββββββββββ
β
[ Next.js Frontend ]
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β FASTAPI ORCHESTRATOR β
β (Sequential Agent API Calls) β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββ¬βββββββββββββββΌβββββββββββββββ¬ββββββββββββββββ
β β β β β
βΌ βΌ βΌ βΌ βΌ
βββββββββ ββββββββββββ ββββββββββββββ ββββββββββ ββββββββββ
βPlannerβ βArchitect β β Developer β βDebuggerβ β Tester β
β β β β β β β β β β
βGemma4 β βLlama-70B β β Gemma-4 β βLlama-8Bβ βGemma-4 β
βββββββββ ββββββββββββ ββββββββββββββ ββββββββββ ββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β FASTAPI BACKEND + SESSION DB β
β (SQLite state persistence, model routing) β
βββββββββββββββββββββββββββββββββββββββββββββββββ
Each agent uses an optimized model for its specific task:
| Agent | Model | Task | Quality | Speed |
|---|---|---|---|---|
| Planner | Gemma-4 | Create dev plan | ββββ | β‘β‘β‘β‘β‘ |
| Architect | Llama-3-70B | Design system | βββββ | β‘β‘ |
| Developer | Gemma-4 | Write code | βββββ | β‘β‘β‘β‘ |
| Debugger | Llama-3-8B | Review & fix | ββββ | β‘β‘β‘β‘β‘ |
| Tester | Gemma-4 | Generate tests | ββββ | β‘β‘β‘β‘ |
- Sequential Agent Flow - Planner β Architect β Developer β Debugger β Tester
- Error Handling & Retries - Built-in resilience for each agent
- Easy Extensibility - Add agents or modify flow without code changes
- Session Tracking - Persist and inspect each stage output in the backend
- Persistent Storage - All agent outputs saved in SQLite
- Resumable Pipelines - Query any session to retrieve outputs
- Scalable - Drop-in PostgreSQL support for production
- Free Tier Ready - All default models available on OpenRouter free tier
- Custom Models - Switch to Claude, GPT-4, or any OpenRouter model
- Cost Optimization - Mix free and paid models strategically
- Docker & Docker Compose
- OpenRouter API key (free tier: https://openrouter.ai)
git clone https://github.com/maad-dev/maad.git
cd maad
cp .env.example .envUpdate .env with your OpenRouter API key:
OPENROUTER_API_KEY=sk-or-xxxxxxxxxxxxxdocker-compose up -dServices will be available at:
- π₯οΈ Frontend: http://localhost:3000
- π§ FastAPI Backend: http://localhost:8000
# Using cURL
curl -X POST http://localhost:8000/pipeline/init \
-H "Content-Type: application/json" \
-d '{
"task": "Build a todo app with Next.js",
"scope": "minimal"
}'
# Or use the frontend at http://localhost:3000- Backend Details - Python code structure
Edit .env to use different models:
# Free tier (default)
PLANNER_MODEL=google/gemma-4-26b-a4b-it:free
ARCHITECT_MODEL=meta-llama/llama-3-70b-instruct:free
DEVELOPER_MODEL=google/gemma-4-26b-a4b-it:free
DEBUGGER_MODEL=meta-llama/llama-3-8b-instruct:free
TESTER_MODEL=google/gemma-4-26b-a4b-it:free
# Premium models (update OpenRouter account)
# ARCHITECT_MODEL=anthropic/claude-3-opus
# DEVELOPER_MODEL=openai/gpt-4-turboDocker Compose (Development)
docker-compose upProduction Scaling
# Use PostgreSQL instead of SQLite
# Deploy multiple FastAPI instances behind nginx/k8s
# Add Redis for cachingFrontend (Next.js)
cd frontend && npm install && npm run devBackend (FastAPI)
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadTypical execution timeline:
- Planner: 10-15s
- Architect: 15-20s
- Developer: 30-45s
- Debugger: 10-15s
- Tester: 15-25s
Total: ~80-120 seconds (1.5-2 minutes) for complete pipeline
- Frontend: Next.js 14, Tailwind CSS, TypeScript
- Backend: Python 3.11+, FastAPI, Pydantic, SQLite/PostgreSQL
- Orchestration: FastAPI service layer
- AI Models: OpenRouter API (Gemma-4, Llama-3, Claude, GPT-4, etc.)
- Deployment: Docker, Docker Compose
POST /pipeline/init
{
"task": "Build a todo app",
"scope": "minimal|standard|full"
}GET /session/{session_id}POST /agent/planner
POST /agent/architect
POST /agent/developer
POST /agent/debugger
POST /agent/testerBackend not responding?
docker-compose logs backend
curl http://localhost:8000/healthModel not found?
# Verify OpenRouter API key and account
curl -H "Authorization: Bearer $OPENROUTER_API_KEY" \
https://openrouter.ai/api/v1/models | grep -i gemma- Single Instance - Perfect for development (10 concurrent requests)
- Horizontal Scaling - Run multiple backends with load balancer + PostgreSQL
- Advanced Workflows - Use parallel execution for multiple agents
- Caching - Redis for planner output reuse
- Monitoring - ELK stack or Datadog integration
- Per-agent model configuration
- API-based orchestration
- Session-based state management
- Parallel agent execution
- Custom workflow templates
- Result webhooks to external systems
- Advanced model parameter tuning
- Multi-language code generation
- Kubernetes deployment
MIT License - See LICENSE file
Contributions welcome! See CONTRIBUTING.md
Version: 2.0.0 (2026-04-18)
Status: π’ Production Ready
