Skip to main content

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

TypeRegistrationBest For
Function Tool@tool decoratorSimple, standalone operations
Class ToolAll public methods auto-registeredQuick prototyping, utility classes
ToolKit@tool on selected methodsRelated tools with shared state, filtering, and configuration