tools
parameter and can include custom functions, built-in tools, or tool collections.
Single Tool
Multiple Tools
Tool Collections
Tool Configuration
Available Tool Configurations
Configuration | Type | Description |
---|---|---|
requires_confirmation | bool | Pause for user confirmation before execution |
requires_user_input | bool | Prompt user for input during execution |
user_input_fields | List[str] | Fields to prompt user for when requires_user_input is True |
external_execution | bool | Handle execution externally (advanced use-cases) |
show_result | bool | Display result directly to user without LLM processing |
stop_after_tool_call | bool | Terminate agent after this tool call |
Best Practices
- Tool Validation: All tools must have type hints and docstrings
- Single Responsibility: Each tool should have a clear, focused purpose
- Error Handling: Implement proper error handling within tool functions
- Configuration: Use tool configurations appropriately for security and user experience
- Documentation: Write clear docstrings that explain the tool’s purpose to the LLM