crates/forge_domain/src/tools/descriptions/task.md
Launch a new agent to handle complex, multi-step tasks autonomously.
The {{tool_names.task}} tool launches specialized agents (subprocesses) that autonomously handle complex tasks. Each agent type has specific capabilities and tools available to it.
Available agent types and the tools they have access to: {{#each agents}}
When using the {{tool_names.task}} tool, you must specify a agent_id parameter to select which agent type to use.
When NOT to use the {{tool_names.task}} tool:
Usage notes:
Example usage:
<example_agent_descriptions> "test-runner": use this agent after you are done writing code to run tests "greeting-responder": use this agent when to respond to user greetings with a friendly joke </example_agent_description>
<example> user: "Please write a function that checks if a number is prime" assistant: Sure let me write a function that checks if a number is prime assistant: First let me use the {{tool_names.write}} tool to write a function that checks if a number is prime assistant: I'm going to use the {{tool_names.write}} tool to write the following code: <code> function isPrime(n) { if (n <= 1) return false for (let i = 2; i * i <= n; i++) { if (n % i === 0) return false } return true } </code> <commentary> Since a significant piece of code was written and the task was completed, now use the test-runner agent to run the tests </commentary> assistant: Now let me use the test-runner agent to run the tests assistant: Uses the {{tool_names.task}} tool to launch the test-runner agent </example> <example> user: "Hello" <commentary> Since the user is greeting, use the greeting-responder agent to respond with a friendly joke </commentary> assistant: "I'm going to use the {{tool_names.task}} tool to launch the greeting-responder agent" </example>