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