-
Notifications
You must be signed in to change notification settings - Fork 0
feat: wire MultiAgentCoordinator into runtime (AgentEngine, API, config) #393
Copy link
Copy link
Closed
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:large3+ days of work3+ days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:communicationDESIGN_SPEC Section 5 - Communication ArchitectureDESIGN_SPEC Section 5 - Communication Architecturespec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow EngineDESIGN_SPEC Section 6 - Task & Workflow Enginespec:toolsDESIGN_SPEC Section 11 - Tool & Capability SystemDESIGN_SPEC Section 11 - Tool & Capability Systemtype:featureNew feature implementationNew feature implementation
Description
Summary
The MultiAgentCoordinator is fully implemented and tested (PR #329 from #205) but never wired into the runtime. It exists as a standalone service — no production code path invokes it.
What exists
MultiAgentCoordinatorwith 7-phase pipeline (decompose → route → dispatch → rollup)- 4 topology dispatchers (SAS, centralized, decentralized, context-dependent)
- Wave execution via
ParallelExecutorwithasyncio.TaskGroup - Workspace isolation via git worktrees
DecompositionService,TaskRoutingService,TaskAssignmentService- Comprehensive unit + integration tests
What's missing
1. AgentEngine integration
AgentEngineonly handles single-agent execution- No
coordinatorparameter in__init__(), no conditional dispatch - Need: detect task complexity or explicit coordination request → delegate to
MultiAgentCoordinator.coordinate()
2. API endpoint
- No REST endpoint to trigger multi-agent coordination
- Need:
POST /api/v1/tasks/{id}/coordinateor similar - Need: WebSocket events for coordination progress (phase updates, wave completion)
3. Runtime bootstrap
create_app()doesn't instantiate a coordinator- No factory method to wire
DecompositionService+TaskRoutingService+ParallelExecutor+WorkspaceIsolationService+TaskEngine→MultiAgentCoordinator - Need: coordinator instantiation from company config at startup
4. Configuration
RootConfighas no coordination configuration section- Need: topology strategy, workspace isolation settings, concurrency limits in YAML config
CoordinationConfigmodel exists but isn't loaded from company config
5. MessageBus integration
- Coordination phase events are logged but not published to WebSocket subscribers
- Dashboard cannot display multi-agent coordination progress
Scope
- Add
coordinatorparameter toAgentEngine(optional, for multi-agent dispatch) - Create API endpoint for multi-agent coordination
- Add coordination config to
RootConfigYAML schema - Bootstrap coordinator in
create_app()/ company startup - Publish coordination events to MessageBus / WebSocket
- Integration test: boot from YAML → create task via API → multi-agent execution
Context
This is the remaining gap from #205 (wire runtime multi-agent coordination). The coordination layer itself is complete — this is purely a wiring/integration task.
Blocks: #321 (meta: path to 0.2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:large3+ days of work3+ days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent SystemDESIGN_SPEC Section 3 - Agent Systemspec:communicationDESIGN_SPEC Section 5 - Communication ArchitectureDESIGN_SPEC Section 5 - Communication Architecturespec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow EngineDESIGN_SPEC Section 6 - Task & Workflow Enginespec:toolsDESIGN_SPEC Section 11 - Tool & Capability SystemDESIGN_SPEC Section 11 - Tool & Capability Systemtype:featureNew feature implementationNew feature implementation