API Reference agentsea_crews v#0.1.0

Copy Markdown

Modules

A crew of agents that collaborate on a task DAG.

Drives a crew's task DAG, modeled as a :gen_statem whose states are the crew lifecycle: :idle → :running → :completed, with :paused (pause/resume) and :aborted branches.

Strategy behaviour for assigning a task to an agent. Each strategy is a module implementing delegate/3; the coordinator selects one by config.

Agents bid on the task; the best bid wins.

Selects the agent whose role capabilities best fit the task. Prefers agents that can fully execute the task, breaking ties by capability score. Pure — uses the role on each agent_ref, no process calls.

The outcome of a delegation decision.

Cycles through agents by position. The position is supplied via ctx.counter (the coordinator owns and advances it), keeping the strategy pure.

Declarative crew configuration.

Per-crew supervision subtree: a Task.Supervisor for delegated work, a DynamicSupervisor for the crew's agents, and the coordinator. All three are registered in AgentSea.CrewRegistry keyed by {crew_name, key}.

A unit of work for a crew, with optional capability requirements and dependencies.