The orchestrator implements a manager-worker pattern. It uses an LLM to decompose complex tasks into subtasks, then dispatches them to parallel subagent workers. Results are synthesized into a final response.
ID nexus.agent.orchestrator
Dependencies nexus.agent.subagent
Key Type Default Description
max_workersint 5Maximum concurrent subagent workers
max_subtasksint 8Maximum number of subtasks to decompose into
worker_max_iterationsint 10Max iterations per worker subagent
orchestrator_model_rolestring reasoningModel for task decomposition
worker_model_rolestring balancedModel for worker execution
synthesis_model_rolestring balancedModel for result synthesis
fail_fastbool falseStop all workers if one fails
system_promptstring (none) System prompt for the orchestrator
system_prompt_filestring (none) Path to system prompt file
Event Priority Purpose
io.input50 Receives user tasks
tool.result50 Tool results during decomposition
llm.response / llm.stream.*50 LLM responses
skill.loaded50 Skill content
tool.register50 Tool discovery
subagent.started50 Worker started notification
subagent.iteration50 Worker progress
subagent.complete50 Worker finished
cancel.active / cancel.resume5 Cancellation
memory.compacted50 History compaction
Event When
llm.requestDecomposition and synthesis LLM calls
before:tool.invoke / tool.invokeTool invocation
before:tool.resultBefore tool result propagation (vetoable)
thinking.stepDecomposition and synthesis reasoning
io.statusPhase transitions
agent.turn.start / agent.turn.endTurn boundaries
stateDiagram-v2
direction LR
[*] --> idle
idle --> decomposing: agent.turn.start
decomposing --> dispatching: subtasks ready
dispatching --> executing: workers spawned
executing --> executing: subtask completed
executing --> synthesizing: all subtasks done
synthesizing --> idle: agent.turn.end
idle --> [*]
note right of decomposing
orchestrator LLM
breaks task into
subtasks
end note
note right of executing
parallel workers
respect max_workers
end note
Decomposing — The orchestrator LLM breaks the task into subtasks with descriptions and optional dependencies
Dispatching — Subtasks are queued and sent to subagent workers (respecting max_workers concurrency)
Executing — Workers run in parallel; the orchestrator tracks progress and collects results
Synthesizing — All results are gathered and the synthesis LLM produces a unified response
The orchestrator can recognize dependencies between subtasks. Dependent subtasks wait until their prerequisites complete before dispatching.
fail_fast: false (default) — Other workers continue even if one fails. Failed results are included in synthesis.
fail_fast: true — All remaining workers are cancelled when any worker fails.
plugins:
active:
- nexus.io.tui
- nexus.llm.anthropic
- nexus.agent.orchestrator
- nexus.agent.subagent
- nexus.agent.react
- nexus.tool.shell
- nexus.tool.file
- nexus.memory.capped
- nexus.control.cancel
nexus.agent.orchestrator:
max_workers: 3
max_subtasks: 6
orchestrator_model_role: reasoning
worker_model_role: balanced
synthesis_model_role: balanced
fail_fast: false
nexus.agent.subagent:
max_iterations: 10
The orchestrator is ideal for:
Complex tasks that naturally decompose into independent subtasks
Research across multiple topics that can be explored in parallel
Code analysis across multiple files or modules simultaneously
Any task where parallel execution significantly reduces total time