Versions in this module Expand all Collapse all v0 v0.2.0 Nov 29, 2026 Changes in this version + var ErrBudget = errors.New("subagents: delegation budget exhausted") + var ErrBusy = errors.New("subagents: a child is already active") + var ErrChildFailed = errors.New("subagents: child run failed") + var ErrConfig = errors.New("subagents: invalid configuration") + var ErrNested = errors.New("subagents: nested delegation is not enabled") + var ErrOutput = errors.New("subagents: invalid or excessive child output") + var ErrTask = errors.New("subagents: invalid task") + var ErrUnknown = errors.New("subagents: unknown child") + type Child struct + Config agent.Config + Description string + Instructions string + Name string + type Config struct + Children []Child + MaxRuns int + MaxTotalSteps int + MaxTotalToolCalls int + Timeout time.Duration + type Result struct + Child string + Steps int + Text string + ToolCalls int + type Scope struct + func New(cfg Config) (*Scope, error) + func (s *Scope) Run(ctx context.Context, name, task string) (Result, error) + func (s *Scope) Stats() Stats + func (s *Scope) Tool() (agent.Tool, error) + type Stats struct + Active bool + Failed int + ReservedSteps int + ReservedToolCalls int + Started int + Succeeded int