Toolkit class provides a way to group related tools together with shared configuration. It handles registration of sync and async tools, filtering, and connection management.
Constructor
Core Parameters
Descriptive name for the toolkit.
List of tools (functions or Function objects from @tool decorator).
List of (async_callable, tool_name) tuples for async variants.
Instructions for using the toolkit.
Whether to add instructions to the agent’s system message.
Tool Filtering
List of tool names to include from the toolkit.
List of tool names to exclude from the toolkit.
HITL Configuration
Tools that require user confirmation before execution.
Tools that will be executed outside the agent loop.
Tools that stop the agent after execution.
Tools whose results should be shown to the user.
Caching
Enable in-memory caching of function results.
Time-to-live for cached results in seconds.
Directory to store cache files.
Whether to automatically register all methods in the class.
Methods
register()
Register a function with the toolkit.get_functions()
Get sync functions dict.get_async_functions()
Get functions optimized for async execution.connect()
Establish any required connections (override in subclasses).close()
Close any open connections (override in subclasses).Creating Custom Toolkits
Example Usage
Built-in Toolkits
Agno provides several pre-built toolkits:- DuckDuckGoToolkit: Web search capabilities
- FileSystemToolkit: File operations
- GitHubToolkit: GitHub API integration
- SlackToolkit: Slack messaging
- EmailToolkit: Email operations
- DatabaseToolkit: Database queries