FOR DEVELOPERS
📙 Understanding Tool Types¶
UnifAI offers different ways to access and use tools in your agents. You can choose between dynamic discovery, static toolkits, or specific static actions based on your application's needs.
Dynamic Tools ¶
Dynamic tools allow your agent to discover and use tools on-the-fly based on the context. This is the default behavior.
Benefits of dynamic tools:
- Automatic discovery of relevant tools based on context
- Access to the full UnifAI tool ecosystem
- Tools are filtered to match the current user query
- New tools become available without code changes
Static Toolkits ¶
Static toolkits give you more control by specifying entire toolkits to be made available to your agent.
Benefits of static toolkits:
- Predictable set of available tools
- Reduced latency (no tool discovery needed)
- Full control over which toolkits your agent can access
Static Actions ¶
Static actions provide the most granular control, allowing you to specify individual actions (tools).
Benefits of static actions:
- Maximum control over individual tools
- Minimal set of tools for specialized agents
- Ability to combine specific actions from different toolkits
Combining Approaches ¶
You can combine these approaches to create a customized tool setup:
This approach gives you the flexibility of dynamic discovery while ensuring that certain critical tools are always available to your agent.
Caching Behavior ¶
You can control the caching behavior of tool results:
When cache control is enabled, the LLM provider will treat tool results as ephemeral content that shouldn't be stored long-term.