Share via


AI agent tools

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
  • Defined as Unity Catalog UDFs
  • Managed in Unity Catalog as a central registry for tools
  • Built-in security and compliance features
  • Grants easier discoverability and reuse
  • Good for applying transformations and aggregations on large datasets
  • Defined directly in your agent’s code
  • Lacks the built-in governance and discoverability of Unity Catalog functions
  • Good for calling REST APIs, running arbitrary code, or running low-latency tools

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:

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.

Next steps