What are Function & Class Tools?
Function & class tools allow you to extend your AI agents with specialized functionality. Whether you need simple utility functions or complex business logic, Upsonic provides multiple approaches to create tools that integrate seamlessly with your agents. They can:- Execute business logic and computations
- Integrate with external APIs and services
- Process and transform data
- Interact with databases and file systems
- Implement domain-specific algorithms
Quick Comparison
| Type | Registration | Best For |
|---|---|---|
| Function Tool | @tool decorator | Simple, standalone operations |
| Class Tool | All public methods auto-registered | Quick prototyping, utility classes |
| ToolKit | @tool on selected methods | Related tools with shared state, filtering, and configuration |
Navigation
- Creating Function Tool - Create tools from Python functions
- Creating Class Tool - Auto-register all public methods as tools
- Creating ToolKit - Organize multiple tools into toolkits with shared state
- Tool Attributes - Complete reference for all
@toolconfiguration options

