LLM Agent Orchestrator
Web-deployed multi-agent AI system for autonomous software development with role-based orchestration and self-healing agent outputs.
Multi-agent AI system for autonomous software development. Role-based orchestration with self-healing outputs.
Audience: AI engineers and developers
Key Features
- Role-based multi-agent orchestration
- Self-healing JSON output recovery
- Persistent virtual file system
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 both Django web interface and CustomTkinter desktop application, 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: Full codebase automatically loaded into agent context before each response
- Project Resume: Load existing projects and continue from any checkpoint
System Components
Use Cases
Technical Stack
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 3-attempt retry)
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
│ ├── run.py
│ └── src/
│ ├── __init__.py # Auto-generated
│ └── main.py
└── versions/ # HISTORY
├── run.py.v001
└── run.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 exhaustion
- Valid JSON → Files saved → Flow continues
Agent System
1. Strategist (Konrad) - Optional
2. Project Manager (Klaus)
3. Software Architect (Eva)
run.py sets sys.path and calls
src.main. All imports use src. prefix. Prevents ImportError.
4. Programmer (Ben)
JSON Format:
{"files": [
{"file_path": "run.py", "content": "..."},
{"file_path": "src/main.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 application (desktop/web)
- 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: Cannot generate images/audio. Workaround: URLs or manual placeholders
- Large Projects: 50+ files may exceed context. Workaround: Split into modules
- Complex GUIs: Often incomplete. Workaround: Explicit feature list in prompt
- 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