Agentic.Subagent.Coordinator (agentic v0.2.2)

Copy Markdown

Per-workspace subagent coordinator.

Manages bounded concurrent subagent execution. Each workspace gets at most one Coordinator process (started lazily via CoordinatorSupervisor).

The Coordinator:

  • Limits concurrent subagents (default 5)
  • Monitors subagent processes for crash detection
  • Delivers results back to the caller via GenServer.reply
  • Auto-shuts down when idle

Summary

Functions

Returns a specification to start this module under a supervisor.

Ensure a coordinator exists for the given workspace.

List active subagents for a workspace.

Spawn a subagent task synchronously.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

ensure_started(workspace)

Ensure a coordinator exists for the given workspace.

list_subagents(workspace)

List active subagents for a workspace.

spawn_subagent(workspace, task_prompt, opts)

Spawn a subagent task synchronously.

Blocks until the subagent completes. Returns {:ok, result} or {:error, reason}.

start_link(opts)