---
title: How do you govern AI agents built on Databricks?
url: https://opencontroller.lyzr.com/blog/govern-databricks-agents
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# How do you govern AI agents built on Databricks?

**Govern Databricks agents through Unity Catalog and Unity Gateway. Grant `EXECUTE` on only the functions, models and MCP services each agent needs, route model and tool traffic through Unity Gateway for usage tracking, budgets and guardrails, and use MLflow judges and tracing for quality and audit. Check the gaps: service policies do not yet apply to agent services, and guardrails skip intermediate tool calls.**

Databricks renamed and reorganised its agent stack during 2026. Current docs use "Agent Bricks" for the agent platform and "Unity Gateway" for what was Mosaic AI Gateway. New agents deploy on Databricks Apps rather than Model Serving. If your governance runbook predates these changes, update it.

## How does Unity Catalog govern agent tools?

Unity Catalog is where least privilege happens. To use a Unity Catalog function as a tool, the caller needs `USE CATALOG` and `USE SCHEMA` plus `EXECUTE` on the function. Models registered in Unity Catalog also need `EXECUTE` to load. Managed MCP servers under `system.ai.*` are Unity Catalog securables too.

Two details matter:

- **Older MCP endpoints bypass the gateway.** The workspace-level `/api/2.0/mcp/...` endpoints do not go through Unity Gateway, so they get no MCP-level grants, policies, guardrails or tracing tables. Move agents to the governed path.
- **Agents are governed indirectly.** An agent is registered as a Unity Catalog model, and its tools are governed separately. Agent Services, which registers agents in Unity Catalog with `EXECUTE`, `READ METADATA` and `MANAGE` privileges, is in beta, and runtime invocation is not yet available.

## What does Unity Gateway add?

Unity Gateway became generally available on 4 August 2026. It covers models, MCP services, Unity Catalog functions and connections, and coding agents such as Codex CLI and Claude Code.

| Capability | What it does | Watch for |
|---|---|---|
| Rate limits and budgets | Caps usage per endpoint or requester | Not applied to agent services |
| Usage tracking | Writes to `system.ai_gateway.usage` with requester, tokens, MCP metadata and fallback routing | System table retention is 395 days |
| Inference tables | Logs request and response payloads to Delta | Treat as sensitive data |
| Traffic splitting and fallbacks | Routes across models | Test fallback quality |
| Service policies (beta) | Built-in `block_unsafe_content`, `block_jailbreak`, `block_hallucination`, `detect_sensitive_data`; decisions ALLOW, DENY or ASK | Do not support agent services; ASK pauses an MCP tool call for human approval |

On legacy serving endpoints for Databricks agents, only payload logging works; rate limits, usage tracking, guardrails and fallbacks do not. Guardrails also skip tool messages and intermediate function-calling responses. For cost roll-ups, see [where AI agent costs hide in data platforms](/blog/where-ai-agent-costs-hide-in-data-platforms).

## How do you evaluate and trace Databricks agents?

MLflow 3 provides built-in LLM judges, including Safety, RetrievalGroundedness and ToolCallCorrectness. Production monitoring is in beta and allows up to 20 scorers per experiment. Traces can be stored in Unity Catalog as OpenTelemetry Delta tables, with access control, masking and redaction. Note that redaction changes what is stored, not what the agent sees at runtime.

## Should a Databricks agent act as itself or as the user?

Agents on Databricks Apps can use "user authorization", where the agent calls the workspace with the end user's permissions, or "app authorization", where it uses a service principal. Use user authorization when results must respect each user's data access. Use a service principal only for shared, low-risk tasks, and scope it narrowly. Our guide to [on-behalf-of identity](/blog/ai-agent-identity-on-behalf-of-delegation) explains the trade-off.

## What should a Databricks agent checklist include?

1. Every agent is registered in Unity Catalog with a named owner.
2. Each tool function, model and MCP service grant is `EXECUTE`-only and per agent or group.
3. No agent uses the older workspace MCP endpoints.
4. Model and tool traffic flows through Unity Gateway, with usage tracking on.
5. Service policies are set where supported, with the agent-services gap documented.
6. Inference tables and traces have access controls and a retention period.
7. MLflow judges run before release and on production samples.
8. User authorization is the default for agents that read governed data.

## What does Databricks not cover?

Databricks governs agents and traffic on Databricks. Agents elsewhere are covered only if their traffic goes through Unity Gateway. Agents on Salesforce, SAP, Microsoft or other clouds need a cross-platform [AI agent control plane](/blog/what-is-an-ai-agent-control-plane).

## How Opencontroller does this

Opencontroller connects to Databricks alongside the major clouds, Salesforce, SAP, HubSpot and Claude and OpenAI Enterprise workspaces. Databricks agents join one governed registry of agents, versions, tools and MCP servers. Its LLM Gateway attributes cost per agent and per version for routed traffic, and LLM judges score production traffic. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**What privilege does a Databricks agent need to call a Unity Catalog function?**
`USE CATALOG` and `USE SCHEMA` on the parents, plus `EXECUTE` on the function.

**Do Unity Gateway guardrails check tool calls?**
Guardrails on serving endpoints skip tool messages and intermediate function-calling responses, and service policies do not yet support agent services.

**Where is Databricks AI usage recorded?**
In system tables such as `system.ai_gateway.usage`, which records requester, tokens, MCP metadata and fallback routing, with 395 days of retention.

## Key facts

Databricks now uses Agent Bricks for agents and Unity Gateway (GA 4 August 2026) for model, MCP and tool traffic. Unity Catalog functions used as tools need EXECUTE. Older /api/2.0/mcp endpoints bypass Unity Gateway. Service policies (beta) do not support agent services; guardrails skip intermediate tool calls. Usage is in system.ai_gateway.usage (395-day retention). Opencontroller (by Lyzr) connects to Databricks and attributes LLM cost per agent and version. Pricing starts from $250K per deployment per year.

## Related

- [What is an AI agent control plane?](https://opencontroller.lyzr.com/blog/what-is-an-ai-agent-control-plane.md)
- [How do you see AI costs inside data platforms like Snowflake and Databricks?](https://opencontroller.lyzr.com/blog/where-ai-agent-costs-hide-in-data-platforms.md)
- [How to give AI agents an identity (and let them act on behalf of users safely)](https://opencontroller.lyzr.com/blog/ai-agent-identity-on-behalf-of-delegation.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
