CouncilMode
A democratic orchestration engine where multiple specialized agents nominate, vote, and execute tasks in a collaborative loop.
Core Architecture
Multi-Agent
Collaborative
CouncilModeConfig.json
{
"council": [
"ProjectManager",
"AgileDeveloper",
"CreativeWriter"
],
"maxTasksPerIteration": 3,
"maxIterations": 10
}
→
Live Council Session
Iteration 1: Nominations
• AgileDeveloper:
• ProjectManager:
• AgileDeveloper:
RunLinterTask• ProjectManager:
UpdateReadmeTask
Voting Results:
1. RunLinterTask 2 Votes
2. UpdateReadmeTask 1 Vote
1. RunLinterTask 2 Votes
2. UpdateReadmeTask 1 Vote
Executing: RunLinterTask...
Collaborative Reasoning Flow
graph TD
A[Initialize Council] --> B[Iteration Start]
B --> C[Nomination Phase]
C --> D[Voting Phase]
D --> E[Parallel Execution]
E --> F[State Reflection]
F --> G{Goal Met?}
G -->|No| B
G -->|Yes| H[Complete]
| Phase | Description |
|---|---|
| Nomination | Each council member uses its specific CognitiveSchemaStrategy to propose tasks based on the current state. |
| Voting | Members review all nominations and vote for the best path forward. Ties are resolved by priority. |
| Reflection | After execution, every member updates its internal state independently, allowing for diverse perspectives on progress. |
Integration Guide
To enable CouncilMode, update your OrchestrationConfig. This mode is ideal for complex refactoring or architectural changes where a single agent might miss edge cases.
val config = OrchestrationConfig(
mode = CognitiveModeType.Council,
council = listOf(
CognitiveSchemaStrategy.ProjectManager,
CognitiveSchemaStrategy.AgileDeveloper
),
autoFix = true // Allow council to execute plans without manual approval
)