supervisor
Multi-agent orchestration layer. The supervisor workflow spawns and coordinates child agent workflows using configurable patterns: delegate, broadcast, debate, pipeline, map_reduce, voting, and saga (with compensations). Includes trust-based delegation and inter-agent messaging.
Used by cmd/worker, cmd/supervisor-run.
Usage
import "cruvero/internal/supervisor"
Key Types / Interfaces
| Type | Source | Description |
|---|---|---|
Pattern | types.go | Orchestration pattern enum (delegate, broadcast, debate, pipeline, map_reduce, voting, saga) |
SupervisorRunInput | types.go | Workflow input: agents, pattern, tool registry, memory refs |
AgentSpec | types.go | Child agent specification: name, prompt, config, timeouts |
SagaStep | types.go | Distributed saga step with action and compensation |
Message | types.go | Message between supervisor and agents |
Event | types.go | Event on a blackboard topic with payload |
SupervisorState | types.go | Execution state: pattern, per-agent results, messages, events |
Key Files
| File | Purpose |
|---|---|
workflow.go | Supervisor workflow orchestration |
types.go | All supervisor types and pattern definitions |
trust.go | Trust scoring and delegation policies |
delegation.go | Trust-based agent delegation |
activities.go | Supervisor-specific Temporal activities |