Skip to main content

Module subagent

Module subagent 

Source
Expand description

Sub-agent tool handlers: turn spawn_agent / check_agent / wait_for_agent / send_to_agent / kill_agent tool calls into SubAgentOps serviced by the host (which owns the world + spawner). The tool lane runs off the world, so it blocks on the host applying each op via a oneshot - the same shape as an interaction.

Structs§

SubAgentHandle
Per-agent state needed to service the sub-agent tools: a sender into the host’s SubAgentOp channel plus the spawning agent’s identity and the context children inherit.

Constants§

SUBAGENT_TOOLS
The tool names routed to the sub-agent handler.

Functions§

handle
Dispatch one sub-agent tool call, returning the textual result for the model.
is_subagent_tool
Whether name is a sub-agent tool (routed here rather than to builtin/MCP).