2.0.30
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
<!--
|
||||
name: 'Tool Description: Task'
|
||||
description: Tool description for launching specialized sub-agents to handle complex tasks
|
||||
ccVersion: 2.0.29
|
||||
ccVersion: 2.0.30
|
||||
variables:
|
||||
- AGENT_TYPE_REGISTRY
|
||||
- agentTypeEntry
|
||||
- propertiesText
|
||||
- runsInBackground
|
||||
- hasAccessToCurrentContext
|
||||
- TOOL_REGISTRY
|
||||
- TASK_TOOL
|
||||
- AGENT_TYPE_REGISTRY_STRING
|
||||
- READ_TOOL
|
||||
- GLOB_TOOL
|
||||
- TASK_TOOL
|
||||
@@ -16,23 +12,23 @@ variables:
|
||||
-->
|
||||
Launch a new agent to handle complex, multi-step tasks autonomously.
|
||||
|
||||
The ${TASK_TOOL} 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:
|
||||
${AGENT_TYPE_REGISTRY.map((agentTypeEntry)=>{let propertiesText="";if(agentTypeEntry?.runsInBackground||agentTypeEntry?.hasAccessToCurrentContext)propertiesText="Properties: "+(agentTypeEntry?.runsInBackground?"runs in background; ":"")+(agentTypeEntry?.hasAccessToCurrentContext?"access to current context; ":"");return`- ${agentTypeEntry.agentType}: ${agentTypeEntry.whenToUse} (${propertiesText}Tools: ${agentTypeEntry.tools.join(", ")})`}).join(`
|
||||
`)}
|
||||
${AGENT_TYPE_REGISTRY_STRING}
|
||||
|
||||
When using the ${TOOL_REGISTRY} tool, you must specify a subagent_type parameter to select which agent type to use.
|
||||
When using the ${TASK_TOOL} tool, you must specify a subagent_type parameter to select which agent type to use.
|
||||
|
||||
When NOT to use the Agent tool:
|
||||
- If you want to read a specific file path, use the ${READ_TOOL.name} or ${GLOB_TOOL.name} tool instead of the Agent tool, to find the match more quickly
|
||||
When NOT to use the ${TASK_TOOL} tool:
|
||||
- If you want to read a specific file path, use the ${READ_TOOL.name} or ${GLOB_TOOL.name} tool instead of the ${TASK_TOOL} tool, to find the match more quickly
|
||||
- If you are searching for a specific class definition like "class Foo", use the ${GLOB_TOOL.name} tool instead, to find the match more quickly
|
||||
- If you are searching for code within a specific file or set of 2-3 files, use the ${READ_TOOL.name} tool instead of the Agent tool, to find the match more quickly
|
||||
- If you are searching for code within a specific file or set of 2-3 files, use the ${READ_TOOL.name} tool instead of the ${TASK_TOOL} tool, to find the match more quickly
|
||||
- Other tasks that are not related to the agent descriptions above
|
||||
|
||||
|
||||
Usage notes:
|
||||
- Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses
|
||||
- When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.
|
||||
- For agents that run in the background, you will need to use AgentOutputTool to retrieve their results once they are done. You can continue to work while async agents run in the background - when you need their results to continue you can use AgentOutputTool in blocking mode to pause and wait for their results.
|
||||
- Each agent invocation is stateless. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.
|
||||
- The agent's outputs should generally be trusted
|
||||
- Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, web fetches, etc.), since it is not aware of the user's intent
|
||||
@@ -64,7 +60,7 @@ function isPrime(n) {
|
||||
Since a signficant piece of code was written and the task was completed, now use the code-reviewer agent to review the code
|
||||
</commentary>
|
||||
assistant: Now let me use the code-reviewer agent to review the code
|
||||
assistant: Uses the ${TASK_TOOL.name} tool to launch the with the code-reviewer agent
|
||||
assistant: Uses the ${TASK_TOOL.name} tool to launch the code-reviewer agent
|
||||
</example>
|
||||
|
||||
<example>
|
||||
@@ -72,5 +68,5 @@ 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 ${TASK_TOOL.name} tool to launch the with the greeting-responder agent"
|
||||
assistant: "I'm going to use the ${TASK_TOOL.name} tool to launch the greeting-responder agent"
|
||||
</example>
|
||||
|
||||
Reference in New Issue
Block a user