LLM Agent Orchestrator
Web-deployed multi-agent AI system for autonomous software development with Redis Queue orchestration, sandbox validation, and self-healing agent outputs.
Multi-agent AI system for autonomous software development with Redis/RQ queueing, Python-first validation, and advisory multi-language checks.
Audience: AI engineers and developers
Key Features
- Role-based multi-agent orchestration
- Redis/RQ queue runtime for long LLM jobs
- Python-first sandbox validation with advisory JS/PHP/HTML/CSS checks
- Dependency approval gate and artifact manifest
- Persistent virtual file system with versioned outputs
Use Cases
- Autonomous code generation workflows
- Multi-agent collaboration prototyping
What is the LLM Agent Orchestrator?
A sophisticated multi-agent system for autonomous software development. Built with Python, supporting a Django web interface and Redis Queue worker mode, it enables teams of specialized AI agents to collaborate on complex coding tasks through a persistent virtual file system.
Core Capabilities
- Multi-Agent Collaboration: 6+ specialized agents (Strategist, PM, Architect, Programmer, Bug-Hunter, Consensus Finder)
- Multi-Provider Support: Google Gemini, OpenAI GPT, Anthropic Claude, and Local LLMs (LM Studio)
- Virtual File System: Persistent code storage with automatic versioning and history tracking
- Self-Healing JSON: Automatic retry logic with syntax error recovery for code generation
- Context Injection: Architect plan, compact project snapshot, diffs, scratchpad decisions, and runtime constraints are injected before relevant agent turns
- Project Resume: Browser sessions can reconnect to active jobs; stopped runs keep compact state for controlled continuation
System Components
Use Cases
Technical Stack
Language Scope
Production Queue Runtime
/healthz/ reports service health.
/queue_status/ reports active and queued jobs.
System Architecture
Core Components
1. AgentSimulation (agent_logic.py)
Central orchestration engine managing conversation state, chat history, retry logic, JSON validation, and file system operations.
2. LLM Provider Layer (llm_providers.py)
Data Flow
1. User Input → Prompt
2. Select Agent (Round-Robin / QUESTION TO)
3. Load Context (Architect plan + current/ files)
4. LLM API Call (with bounded retry/backoff)
5. Parse Response (validate JSON if Programmer)
6. Save Files (current/ + versions/)
7. Update UI → Next Turn
File System Structure
output/project_name_20240115_143022/
├── logs/
│ ├── conversation.log # JSON-lines
│ └── agents.json # Config snapshot
├── current/ # EXECUTABLE
│ ├── main.py
│ └── src/
│ ├── __init__.py # Auto-generated
│ └── main.py
└── versions/ # HISTORY
├── main.py.v001
└── main.py.v002
Communication Protocols
JSON Self-Healing
- Parser detects syntax error in Programmer response
- Error message constructed with original attempt
- Correction prompt sent back to Programmer (no turn increment)
- Loop until valid JSON or retry limit is reached
- Valid JSON → Files saved → Flow continues
Agent System
1. Strategist (Konrad) - Optional
2. Project Manager (Klaus)
3. Software Architect (Eva)
.sandbox_deps are excluded from code review and test discovery.
4. Programmer (Ben)
JSON Format:
{"files": [
{"file_path": "main.py", "content": "..."},
{"file_path": "engine.py", "content": "..."}
]}
5. Bug-Hunter (Findus)
6. Consensus Finder (Judge)
Communication Patterns
Round-Robin:
PM → Architect → Programmer → Bug-Hunter → Consensus
Question-Based:
Bug-Hunter finds error → QUESTION TO Programmer
Programmer fixes → Back to Bug-Hunter
Bug-Hunter approves → Continue to Consensus
Configuration System
Agent Parameters
Recommended Configs by Role
Environment Variables
Best Practices
- System Prompts: Use ALL-CAPS for critical rules (NEVER, MUST, ALWAYS)
- Temperature: Code generation: 0.1-0.3, Design: 0.5-0.7, Brainstorming: 0.8-1.0
- Tokens: 1 token ≈ 4 characters. Account for context overhead
- Ordering: Architect MUST come before Programmer (plan cached for context injection)
last_architect_plan for injection into Programmer/Bug-Hunter/Consensus contexts.
Simulation Workflow
1. Initialization
- Launch the web application
- Load default agent config
- Check API key environment variables
- Detect available LLM providers
2. Configuration
3. Orchestration Loop
Round N:
Turn 1-5: Agents respond in sequence
If APPROVAL → Advance Round / End
If QUESTION TO → Jump to target agent
Else → Next agent
4. Multi-Pass Refinement
Pass 1: Programmer delivers → Bug-Hunter finds issue
Pass 2: Programmer fixes → Bug-Hunter approves
Pass 3: Consensus checks → Missing file found
Pass 4: Programmer adds → Consensus → APPROVAL
5. Completion
Project Resume
- Select existing project folder
- System creates backup:
backup_pre_resume_TIMESTAMP/ - Load
logs/conversation.loginto histories - Inject all files from
current/ - Add continuity mandate to prompts
- Enter new task or "Continue"
Troubleshooting Guide
API Issues
Immediate Red Error
Gemini 400 Error
Local LLM Refused
JSON Errors
Infinite Healing Loop
Import Errors
ModuleNotFoundError
Circular Import
Known Limitations
- Binary Assets: Binary assets and native GUI dependencies may require explicit requirements, approval, and manual review
- Large Projects: 50+ files may exceed context. Workaround: Split into modules
- GUI/game frameworks: Dependencies such as pygame can be installed into
.sandbox_depsafter approval. Long-running startup probes are treated as acceptable for games and event loops.
- Close app/stop server
- Delete output/ directory
- Verify API key
- Start minimal (PM, Architect, Programmer, Consensus)
- Test: "Create hello world script"
© 2026 Dr. Felix Sébastien Bourier • Senior Data Scientist & AI Engineer • Computational Physics • Hamburg • All rights reserved