Basic Usage
Add tools to agents as functions orTool objects:
Tool Configuration
UseTool for custom descriptions and parameter control:
schema_params_mode="required" to reduce tokens and avoid overwhelming the LLM with unnecessary options:
Agent as a Tool
You can use an Agent as a tool within another Agent, enabling hierarchical agent compositions where specialized agents handle specific tasks. SinceAgent instances can be treated as Tool objects, they inherit the same parameter control configurations available to regular tools.
Dynamic Tools via ToolSets
Instead of providing a static list of tools, you can use aToolSet to dynamically determine which tools are available based on runtime conditions.
Refer to Dynamic Agents for a more detailed explanation.
Summary
- Automatic Introspection: Function signatures become tool schemas automatically
- Enhanced Validation: Pydantic-based parameter validation
- Execution Flexibility: Support for all Python callable types
- Better Configuration: Fine-grained parameter control
- Performance: Concurrent execution and optimized patterns
- Robustness: Improved error handling and tracing
- Tool Sets: Dynamic tool resolution
- Slash Commands: Shortcuts for direct tool invocation