Skip to main content

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)

ModeParams
Spawn oneagent (or specialist), task (or prompt); optional memory_seed, type (isolated / fork), wait, timeout
Spawn manyagents: [{agent, task, ...}]; optional wait, timeout
Collect onerun_id, wait: true
Collect manyrun_ids: [...], wait: true
Statusrun_id (prefer wait instead of polling)
Listlist: true
Cancelcancel: 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[].