Documentation
¶
Overview ¶
Package subagent implements sub-agent spawning for the spawn_agent tool. It builds the SubagentDispatcher that is injected into the run context by both the TUI (ui/cmd_handlers.go) and the web handler (web/handlers.go).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶
func NewDispatcher( allAdapters []models.ModelAdapter, cfg config.Config, mcpDispatchers map[string]tools.MCPDispatcher, onEvent func(modelID string, e models.AgentEvent), ) tools.SubagentDispatcher
NewDispatcher returns a SubagentDispatcher that builds and runs sub-agents.
allAdapters is the full list of configured adapters; model routing for spawn_agent's optional model_id arg searches this list.
cfg supplies SubagentModel (default model override) and SubagentMaxDepth (recursion limit; 1 = no recursion by default).
mcpDispatchers is the MCP dispatcher table so sub-agents can call MCP tools.
onEvent routes sub-agent tool events to the parent's UI panel; the modelID string is the sub-agent's model ID (used for panel routing).
Types ¶
This section is empty.