The code-first way to author, log, evaluate, deploy, and trace production AI agents on Databricks — built around MLflow and governed by Unity Catalog.
Mosaic AI Agent Framework is a code-first SDK for building tool-calling and multi-agent apps in any framework, wrapping them in MLflow so you get logging, tracing, evaluation, and one-call deployment to Model Serving.
It turns a prototype agent into a governed production endpoint without leaving Databricks: you keep full control of the agent code, while MLflow and Unity Catalog handle versioning, observability, access control, and serving. Reach for it when you need custom logic — the opposite of Agent Bricks, which auto-builds common agents declaratively.
The recommended MLflow base class (successor to ChatAgent) you wrap any framework — LangGraph, OpenAI SDK — in to get streaming, multi-agent, and automatic tracing.
Register a SQL query or Python function as a Unity Catalog function tool — governed, auditable, access-controlled; plus retriever, code-interpreter, and MCP tools.
Log the agent as code (Models-from-Code) and register the versioned model to Unity Catalog — the prerequisite for deployment.
agents.deploy() provisions a scalable REST endpoint, a Review App for feedback, inference tables, and optional scale-to-zero.
End-to-end spans over every LLM call, tool, and retrieval step — auto-captured in dev and on production traffic for debugging.
mlflow.genai.evaluate() scores traces with built-in and custom LLM judges against eval datasets, before and after deploy.
ResponsesAgent and give it tools: UC functions, a vector-search retriever, code interpreter, or MCP servers.PySpark · Pythonimport mlflow
from databricks import agents
# 1. Log the agent as code and register the version to Unity Catalog
info = mlflow.pyfunc.log_model(
name="agent", python_model="agent.py", # a ResponsesAgent in agent.py
registered_model_name="main.agents.support_bot")
# 2. Score it with LLM judges before shipping
mlflow.genai.evaluate(data=eval_set, predict_fn=agent.predict, scorers=scorers)
# 3. One call → Model Serving endpoint + Review App
agents.deploy("main.agents.support_bot", info.registered_model_version)
agents.deploy() deploys a UC-registered version, not a live Python object.ResponsesAgent, not the older ChatAgent — it adds multi-agent, tool-call confirmation, and auto-aggregated streaming traces.scale_to_zero_enabled cuts idle cost but adds cold-start latency on the first query; production quality monitoring (auto-scorers on live traces) is still Beta.ResponsesAgent, log it to Unity Catalog, then agents.deploy() gives you a serving endpoint, a Review App, and tracing for free."Verified against docs.databricks.com · June 2026