agent_spawn
System catalog module. One tool: agent (alias Agent). Handled by
internal/runtime/context/meta/agent.go. Requires a
coordinator-role agent.
When agent spawn is enabled, the injected spec also includes
context_builder.kv (session-tree key-value store) from
AgentToolSpec().
Modes (params)
| Mode | Params |
|---|---|
| Spawn one | agent (or specialist), task (or prompt); optional memory_seed, type (isolated / fork), wait, timeout |
| Spawn many | agents: [{agent, task, ...}]; optional wait, timeout |
| Collect one | run_id, wait: true |
| Collect many | run_ids: [...], wait: true |
| Status | run_id (prefer wait instead of polling) |
| List | list: true |
| Cancel | cancel: true, run_id (optional cancel_tree) |
Default spawn is non-blocking (wait defaults false).
type: fork / inherit_context inherits parent conversation context.
Catalog YAML only lists agent / task on the Spec; the live tool
schema from AgentToolSpec() is authoritative for the LLM.
Enable
Coordinator agent + grant / enable path used by the app. Sub-agents
are specialist ids from agents[].