Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article provides an overview of building AI agent tools using the Mosaic AI Agent Framework.
AI agent tools enable agents to perform tasks beyond language generation, such as retrieving structured or unstructured data and executing custom code.
Unity Catalog function tools vs. agent code tools
There are two main ways to create tools in Agent Framework: define the tool as a Unity Catalog function or define it directly in the agent's code.
Your agent can use any combination of Unity Catalog function tools or agent code tools. Both types of tools work with agents authored using native Python or using gen AI authoring libraries like LangGraph and OpenAI SDK.
Unity Catalog function tool | Agent code tool |
---|---|
|
|
Create agent tools
To learn how to create agent tools, see Create custom AI agent tools with Unity Catalog functions.
Common types of agent tools include:
- Code interpreter tools: Allow agents to run arbitrary Python code.
- Structured data retrieval tools: Query structured data sources like SQL tables.
- Unstructured data retrieval tools: Query unstructured data sources like document collections to perform retrieval augmented generation.
- External connection tools: Connect to external services and APIs to fetch data or perform tasks.
Manage Unity Catalog tools
Use the Databricks Function Client to manage Unity Catalog tools. The Databricks Function Client is based on the open source Unity Catalog Function Client but offers several improvements unique to Databricks.
For information about managing Unity Catalog functions, see Unity Catalog documentation - Function client.
Add Unity Catalog tools to agents
Unlike agent code tools, which are defined directly in the agent’s code, Unity Catalog tools must be explicitly added to agents to make them available.
Databricks recommends using UCFunctionToolkit
to integrate Unity Catalog tools with agent authoring frameworks like LangChain, OpenAI or other SDKs. The toolkit ensures consistency across different frameworks and automates helpful features. See Create custom AI agent tools with Unity Catalog functions.
You can use the AI Playground to quickly add Unity Catalog tools to agents and prototype their behavior before deploying them. See Prototype tool-calling agents in AI Playground.