← One-Pager Library
Databricks · One-Pager · GenAI / Agents

Mosaic AI Agent Framework

The code-first way to author, log, evaluate, deploy, and trace production AI agents on Databricks — built around MLflow and governed by Unity Catalog.

GA MLflow ResponsesAgent Verified June 2026 docs

In one line

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.

Why it matters

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.

Core concepts

ResponsesAgent interface

The recommended MLflow base class (successor to ChatAgent) you wrap any framework — LangGraph, OpenAI SDK — in to get streaming, multi-agent, and automatic tracing.

UC functions as tools

Register a SQL query or Python function as a Unity Catalog function tool — governed, auditable, access-controlled; plus retriever, code-interpreter, and MCP tools.

MLflow logging

Log the agent as code (Models-from-Code) and register the versioned model to Unity Catalog — the prerequisite for deployment.

Deploy to Model Serving

agents.deploy() provisions a scalable REST endpoint, a Review App for feedback, inference tables, and optional scale-to-zero.

MLflow Tracing

End-to-end spans over every LLM call, tool, and retrieval step — auto-captured in dev and on production traffic for debugging.

Agent Evaluation

mlflow.genai.evaluate() scores traces with built-in and custom LLM judges against eval datasets, before and after deploy.

How it works

Click a stage
1 · Author + tools 2 · Log to UC 3 · Evaluate 4 · Deploy 5 · Trace
Author + tools Log to UC Evaluate Deploy Trace
Author + tools — wrap your agent in MLflow ResponsesAgent and give it tools: UC functions, a vector-search retriever, code interpreter, or MCP servers.

Minimal example

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)

Gotchas & limits

Interview soundbites

Say this out loud
  • "Agent Framework is the code-first path: wrap any agent in MLflow's ResponsesAgent, log it to Unity Catalog, then agents.deploy() gives you a serving endpoint, a Review App, and tracing for free."
  • "Tools are governed by Unity Catalog — a UC function is just a SQL or Python tool with grants and audit, alongside vector-search retrievers and MCP servers."
  • "Framework is custom and code-first; Agent Bricks is declarative and auto-built. Same MLflow tracing and Agent Evaluation underpin both."

References

Verified against docs.databricks.com · June 2026