Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Checkpoint ¶
type Checkpoint struct {
ID string
ProcessType string
Phase string
NodeStates map[string]*NodeState
OrderedTaskIDs []string // preserves task execution order for resume
CreatedAt time.Time
UpdatedAt time.Time
}
Checkpoint represents a snapshot of crew execution state.
type CheckpointStore ¶
type CheckpointStore interface {
Save(ctx context.Context, ckpt *Checkpoint) error
Load(ctx context.Context, id string) (*Checkpoint, error)
List(ctx context.Context, filter map[string]any) ([]*Checkpoint, error)
Delete(ctx context.Context, id string) error
}
CheckpointStore defines the interface for checkpoint persistence. The implementation is provided by the checkpoint package to avoid circular dependency.
type Config ¶
type Config struct {
Agents []*agent.Agent
Tasks []*task.Task
Process ProcessType
ManagerLLM llm.Client
ManagerAgent *agent.Agent
Verbose bool
MaxRPM int
MaxCycles int
StepCallback callback.Callback
CheckpointStore CheckpointStore
}
Config defines the configuration for a Crew.
type Crew ¶
type Crew struct {
// contains filtered or unexported fields
}
Crew orchestrates a group of agents to execute a collection of tasks.
func (*Crew) Resume ¶
Resume restores crew execution from a checkpoint, using a fresh crew for agents/LLMs. Completed tasks are not re-executed (matched by index position in the tasks slice); remaining tasks execute normally.
func (*Crew) SetStepCallback ¶
SetStepCallback replaces the crew's step callback. Used by telemetry bridge.
func (*Crew) StepCallback ¶
StepCallback returns the crew's current step callback.
type NodeState ¶
NodeState represents the execution state of a single task or flow node within a checkpoint.
type ProcessType ¶
type ProcessType string
ProcessType defines the execution strategy for a crew.
const ( ProcessSequential ProcessType = "sequential" ProcessHierarchical ProcessType = "hierarchical" ProcessConsensual ProcessType = "consensual" ProcessReflective ProcessType = "reflective" ProcessFlow ProcessType = "flow" ProcessStateMachine ProcessType = "state_machine" )
Supported crew process types.