()
| 31 | type AgentTool struct{ coretools.BaseTool } |
| 32 | |
| 33 | func NewAgentTool() *AgentTool { |
| 34 | return &AgentTool{BaseTool: coretools.BaseTool{Spec: coretools.ToolSpec{ |
| 35 | Name: "Agent", |
| 36 | Description: "Launch a new agent to handle complex, multi-step tasks.\n\nAvailable agent types:\n- general-purpose: all tools.\n- Explore: read-only code search.\n- Plan: read-only implementation planning.\n- Coordinator: task orchestration only. Always use run_in_background=true when spawning workers. Never use sync mode. Use TaskWait to wait for workers. Never busy-poll with repeated TaskList calls. Use TaskList and TaskGet for inspection and result retrieval only. After all target workers settle, synthesize their results into one final answer. Workers are automatically isolated via git worktrees.\n- docs-lookup: documentation lookup.", |
| 37 | InputPrototype: AgentInput{}, |
| 38 | TimeoutSeconds: AgentToolDefaultHardTimeoutSeconds, |
| 39 | ReadOnly: coretools.BoolPtr(false), |
| 40 | ConcurrencySafe: coretools.BoolPtr(true), |
| 41 | Destructive: coretools.BoolPtr(false), |
| 42 | }}} |
| 43 | } |
| 44 | |
| 45 | func (t *AgentTool) ValidateInput(_ coretools.ExecutionContext, input any) (bool, string) { |
| 46 | in := derefAgentInput(input) |
no outgoing calls