DelegateTool delegates a task to a specific named agent and waits for the result. Unlike spawn (async, fire-and-forget) or subagent (sync but generic), delegate targets a named agent and runs the task using that agent's own workspace, model, and tools.
| 13 | // generic), delegate targets a named agent and runs the task using that |
| 14 | // agent's own workspace, model, and tools. |
| 15 | type DelegateTool struct { |
| 16 | spawner SubTurnSpawner |
| 17 | allowlistCheck func(targetAgentID string) bool |
| 18 | selfAgentID string |
| 19 | } |
| 20 | |
| 21 | func NewDelegateTool() *DelegateTool { |
| 22 | return &DelegateTool{} |
nothing calls this directly
no outgoing calls
no test coverage detected