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
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