How arturitu/the-delegation works
The Delegation is a no-code playground for designing multi-agent teams and observing them collaborate in a 3D office. Users configure a team, interact with agents, review proposed work, and inspect generated outputs and activity. The runtime combines agent reasoning and tool actions with a Three.js simulation of embodied characters. The README documents multimodal generation, per-agent models, cost tracking, guardrails, and review workflows; unsampled implementation details and their wiring are represented only where the tree or excerpts support them.
Main entry points: SceneManager.ts Scene Coordinator · App.tsx Application Shell · CharacterController.ts Character Control · AgentSimulation.ts Agent Simulation
Components 27
Product Experience
- Application Shell
src/App.tsx - 3D Workspace
src/interface/SimulationView.tsx - Review & Outputs
src/interface/OutputReviewModal.tsx - Activity & Tasks
src/interface/ActionLogPanel.tsx
Team Design & State
- Team Editor
src/interface/VisualConfigurator/VisualConfigurator.tsx - Team Templates
src/data/agents.ts - Team State
src/integration/store/teamStore.ts - UI State
src/integration/store/uiStore.ts - Workflow State
src/integration/store/coreStore.ts
Agent Workflow
- Agent Simulation
src/simulation/core/AgentSimulation.ts - Agent Reasoning
src/core/agent/AgentBrain.ts - Prompt Builder
src/core/agent/PromptBuilder.ts - Tool Registry
src/core/agent/ToolRegistry.ts - Task Actions
src/core/agent/tools/proposeTask.ts - Project Delivery
src/core/agent/tools/deliverProject.ts
Model Integration
- Gemini Provider
src/core/llm/providers/GeminiProvider.ts - Usage Pricing
src/core/llm/pricing.ts
Embodied Simulation
- Scene Coordinator
src/simulation/SceneManager.ts - Office World
src/simulation/world/WorldManager.ts - Character Control
src/simulation/CharacterController.ts - Agent Drivers
src/simulation/drivers/DriverManager.ts - Character Rendering
src/simulation/entities/CharacterManager.ts - Navigation Mesh
src/simulation/pathfinding/NavMeshManager.ts - Workspace Locations
src/simulation/world/PoiManager.ts - Character States
src/simulation/behavior/CharacterStateMachine.ts
Other components
- User
- Gemini API
Connections 35
- User → Application Shell: interacts
- Application Shell → Team Editor: renders
- Application Shell → 3D Workspace: renders
- Application Shell → Scene Coordinator: creates
- Application Shell → Review & Outputs: renders
- Application Shell → Activity & Tasks: renders
- Team Editor → Team State: configures
- Team Templates → Team State: supplies teams
- Scene Coordinator → Team State: reads active team
- Scene Coordinator → Agent Simulation: creates
- Scene Coordinator → Office World: creates
- Scene Coordinator → Character Rendering: creates
- Scene Coordinator → Character Control: creates
- Scene Coordinator → Agent Drivers: creates
- Scene Coordinator → UI State: updates chat state
- Agent Simulation → Agent Reasoning: runs agents
- Agent Reasoning → Prompt Builder: builds prompts
- Agent Reasoning → Tool Registry: dispatches tools
- Tool Registry → Task Actions: dispatches task actions
- Tool Registry → Project Delivery: dispatches delivery
- Agent Reasoning → Gemini Provider: requests generation
- Gemini Provider → Gemini API: sends requests
- Agent Simulation → Usage Pricing: estimates usage
- Agent Simulation → Workflow State: records workflow
- Office World → Navigation Mesh: loads navigation
- Office World → Workspace Locations: loads locations
- Character Control → Navigation Mesh: queries paths
- Character Control → Workspace Locations: claims locations
- Character Control → Character Rendering: moves characters
- Character Control → Character States: changes states
- Agent Drivers → Character Control: controls characters
- Scene Coordinator → Agent Drivers: updates drivers
- Character Rendering → 3D Workspace: renders in
- Review & Outputs → Workflow State: reads workflow
- Activity & Tasks → Workflow State: reads activity