Skip to main content

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

TypeSourceDescription
Patterntypes.goOrchestration pattern enum (delegate, broadcast, debate, pipeline, map_reduce, voting, saga)
SupervisorRunInputtypes.goWorkflow input: agents, pattern, tool registry, memory refs
AgentSpectypes.goChild agent specification: name, prompt, config, timeouts
SagaSteptypes.goDistributed saga step with action and compensation
Messagetypes.goMessage between supervisor and agents
Eventtypes.goEvent on a blackboard topic with payload
SupervisorStatetypes.goExecution state: pattern, per-agent results, messages, events

Key Files

FilePurpose
workflow.goSupervisor workflow orchestration
types.goAll supervisor types and pattern definitions
trust.goTrust scoring and delegation policies
delegation.goTrust-based agent delegation
activities.goSupervisor-specific Temporal activities