DelegateTool exposes one Subagent to the model as a callable tool. The model sees "delegate_ " with the subagent's description and a single `task` parameter. When called, the subagent runs in its own agent loop and returns its final answer as the tool result. Lives in package main rat
| 20 | // cycle (tool → subagent → agent → tool). The Tool interface itself is |
| 21 | // defined in internal/tool/, so we still implement it cleanly. |
| 22 | type DelegateTool struct { |
| 23 | Subagent subagent.Subagent |
| 24 | } |
| 25 | |
| 26 | func (d *DelegateTool) Definition() api.ToolDef { |
| 27 | return api.ToolDef{ |
nothing calls this directly
no outgoing calls
no test coverage detected