selected_tools parameter allows you to configure which tools are available to the agent when using the autonomous looper mode (max_loops="auto").
Overview
When an agent is set tomax_loops="auto", it enters autonomous loop mode where it can:
- Create a plan by breaking down tasks into subtasks
- Execute each subtask using available tools
- Generate a comprehensive summary when complete
selected_tools parameter gives you fine-grained control over which tools the agent can use during this autonomous execution. By default, all tools are enabled (selected_tools="all").
Available Tools
| Tool Name | Description |
|---|---|
create_plan | Create a detailed plan for completing a task |
think | Analyze current situation and decide next actions |
subtask_done | Mark a subtask as completed and move to the next task |
complete_task | Mark the main task as complete with comprehensive summary |
respond_to_user | Send messages or responses to the user |
create_file | Create a new file with specified content |
update_file | Update an existing file (replace or append) |
read_file | Read the contents of a file |
list_directory | List files and directories in a path |
delete_file | Delete a file (use with caution) |
run_bash | Execute bash/shell commands on the terminal (returns stdout/stderr) |
create_sub_agent | Create specialized sub-agents for delegation |
assign_task | Assign tasks to sub-agents for asynchronous execution |
Usage
Default Behavior (All Tools Available)
Restricted Tools
File Operations Enabled
File Operations + Terminal (run_bash)
Enable file operations and terminal command execution:Minimal Configuration
Use Cases
Research Agent (No File Operations)
For agents focused on research and analysis without needing to create or modify files:Code Generation Agent (With File Operations)
For agents that need to create and modify code files:Data Analysis Agent (Read-Only Files)
For agents that need to read files but shouldn’t modify them:Terminal / DevOps Agent (With run_bash)
For agents that need to run shell commands (e.g. scripts, CLI tools, git):Best Practices
- Start Restrictive: Begin with a minimal set of tools and add more as needed
- Security: Avoid giving file deletion capabilities unless absolutely necessary
- Task Alignment: Choose tools that align with the agent’s primary purpose
- Testing: Test your agent with the tool configuration before production use
Notes
selected_toolsdefaults to"all", which enables all tools- When set to a list, the agent will only have access to the tools you specify
- Tool handlers are automatically filtered based on your configuration
- Invalid tool names are ignored (only valid tool names from the list above are used)
See Also
- Run Bash Tool Tutorial – Using
run_bashto execute terminal commands - Autonomous Loop Documentation
- Agent Configuration Guide
- Tool System Overview