What you will be able to do
- Match an agent scenario to the Databricks product that owns it: Unity Catalog for governance, Lakebase for agent state, managed MCP servers for tool access, MLflow 3 for measurement
- Choose the right managed MCP server (Genie One, Genie Agent, Databricks SQL, Unity Catalog functions or AI Search) for a given tool need
- Tell when a symptom calls for a design change, such as sub-agents, iteration limits or compaction, instead of a different product
Key concept
One question per product — Each of the four products answers a different question about an agent. Unity Catalog decides who may see and use what. Lakebase holds what the agent must remember. MCP decides which governed tools the agent can call. MLflow 3 shows how well the agent is doing. To pick the right tool, first work out which of these questions the scenario is asking.
1.Unity Catalog: the layer the other three stand on
Unity Catalog is the answer whenever a scenario is about access, lineage, discovery or certification. It is not a component you call on purpose. It runs underneath every data and AI interaction in the workspace: it enforces access control when a table is queried or a model is called, tracks lineage as assets are used, and logs activity for auditing. If an agent reads a table it should never have seen, or an auditor wants to know which source fed a model, Unity Catalog owns the fix.
Unity Catalog covers more than tables. Every governed asset is a securable object, meaning permissions can be granted on it to users, service principals or groups. Data assets include files, tables, vector indexes and feature stores. AI assets include models, tools, and connections to MCP servers and other APIs. Tables, views, volumes, functions, models and services, MCP services included, all sit in the same catalog.schema.object namespace. So an agent's retrieval index, the SQL function it calls as a tool, and the model behind it are all governed in one place.
Several capability areas map directly to the wording of agent scenarios:
- Access control: privileges, attribute-based policies, row and column filters, workspace bindings. Use these for questions like "the agent must not see salary columns".
- Discovery: Catalog Explorer, for finding and managing registered data and AI assets.
- Lineage: tracks automatically how assets flow from source data to models, services and dashboards.
- Auditing: a full record of data access in the audit log system table.
A common distractor offers Unity Catalog as the place to store an agent's running memory or to score its answers. Unity Catalog governs those assets, and MLflow traces are themselves stored in Unity Catalog. But governing an asset is a different job from serving low-latency state or judging quality. Metadata quality, such as comments and descriptions that help an agent pick the right table, is covered in Unity Catalog metadata for agent accuracy. Restricting retrieval to authoritative sources is covered in governing the retrieval space.
Checkpoint 1 of 8· Check yourself
An auditor asks which source tables ultimately fed a model that your production agent calls. Which product answers this question?
Questions about where an asset came from are lineage questions, and lineage is a Unity Catalog capability that is tracked automatically from source data to models. MLflow traces record what happened during one agent run. Lakebase holds agent state. MCP gives the agent tools. None of them answers which source fed a model.
“Lineage Automatically track how data and AI assets flow and connect, from source data through to models, services, and dashboards.”Source: docs.databricks.com
2.Lakebase: where agent state lives between turns
Pick Lakebase when the scenario says the agent forgets things it should keep: a conversation thread, a user preference, a checkpoint to resume from. Lakebase is a fully managed Postgres database built into the Databricks platform, designed for low-latency transactional work. Agents need persistent storage to keep context across turns and across sessions, and Lakebase is the managed Postgres backend for that agent state and memory.
| Memory type | What it holds | Scenario signal |
|---|---|---|
| Short-term memory | Context within one conversation session, using thread IDs and checkpointing | A follow-up question loses track of an earlier turn |
| Long-term memory | Key insights extracted and stored across multiple conversations | Answers should be personalised from past interactions |
One agent can use both memory types. There are two deployment targets. On Databricks Apps, memory is wired up with LangGraph checkpointers or the OpenAI Agents SDK, and authentication between the app and Lakebase is handled for you. On Model Serving endpoints, agents use Lakebase-backed checkpoints. These support LangGraph time travel, so a conversation can be resumed or forked from any checkpoint.
Data also moves between Lakebase and the lakehouse in both directions. Unity Catalog tables can be synced into Lakebase so that applications can query them at low latency. That is the right choice when an agent needs fast point lookups against curated lakehouse data. In the other direction, Postgres changes can be stored as Delta tables for downstream pipelines and audit, so state the agent wrote can later be analysed. Lakebase can also act as an online feature store for ML models.
Checkpoint 2 of 8· Check yourself
A support agent runs on a Model Serving endpoint. After the endpoint restarts, users find that the agent has forgotten what was said earlier in the same conversation thread. Where should the conversation checkpoints be stored so the thread can be resumed?
Session state that must survive a restart is agent memory. Lakebase is the managed Postgres store for that memory, and on Model Serving its checkpoints let a conversation be resumed from any checkpoint. MLflow traces are evidence for debugging and evaluation, not state the agent reloads. Unity Catalog decides who may read the history but does not serve it. A synced table is for lookups against curated lakehouse data, not for state the agent writes during a conversation.
“Deploy agents to Model Serving endpoints with Lakebase-backed checkpoints. Supports LangGraph time travel to resume or fork conversations from any checkpoint.”Source: docs.databricks.com
3.Managed MCP servers: governed tools, chosen by the shape of the request
Model Context Protocol (MCP) is how an agent gets tools: querying data, searching documents, calling services. Databricks managed MCP servers come ready to use. They connect agents to data in Unity Catalog, AI Search indexes, Genie Agents and custom functions. Databricks hosts them and manages authentication, so there is nothing to set up. Unity Catalog enforces permissions on them, which means an agent can reach only the tools and data it has been granted. That shared governance is why the MCP choice never replaces Unity Catalog: the two work together.
The choice of server depends on the kind of request, not on which data source is underneath. Many questions are answered from tables in the end. What decides the server is whether the request is natural-language analytics, a precise SQL query, a reusable piece of logic, or a search over documents.
| Server | Use case | URL pattern |
|---|---|---|
| Genie One | Natural-language analytics across your workspace | https://<workspace-hostname>/ai-gateway/mcp-services/system.ai.genie_one_mcp |
| Genie Agent | Natural-language analytics scoped to one Genie Agent | https://<workspace-hostname>/api/2.0/mcp/genie/{genie_space_id} |
| AI Search | Retrieval over unstructured documents | https://<workspace-hostname>/api/2.0/mcp/ai-search/{catalog}/{schema}/{index_name} |
| Databricks SQL | Developer queries and data engineering | https://<workspace-hostname>/api/2.0/mcp/sql |
| Unity Catalog functions | Predefined SQL logic as tools | https://<workspace-hostname>/api/2.0/mcp/functions/{catalog}/{schema}/{function_name} |
Here is how to tell the neighbouring servers apart. Genie One covers the whole workspace, while Genie Agent is limited to a single Genie space. Pick Genie Agent when the agent should only answer within one curated business domain. Unity Catalog functions turn a fixed piece of SQL logic into a tool the agent calls with parameters. Pick that when the computation must be the same every time and should not be written fresh by the model. The system.ai schema also offers ready-made functions through this server. For example, system.ai.python_exec lets an agent run Python code with no setup. AI Search is for unstructured documents.
Beyond the managed servers, a team can register an external self-hosted or third-party MCP server, or build a custom one with Databricks Apps templates. Databricks-provided and registered MCP servers both use Unity Catalog permissions, and Unity Gateway is where access, credentials and usage monitoring are managed. If a scenario stresses keeping the agent's tool list small, see progressive disclosure of MCP tools.
Checkpoint 3 of 8· Match them up
Match each Databricks managed MCP server to the agent request it fits best.
Tap a term, then the definition that fits it.
The kind of request decides the server, not the data underneath it. Genie One handles natural-language analytics across the workspace, and Genie Agent does the same within one Genie space. AI Search retrieves from unstructured documents. Databricks SQL is for developer queries and data engineering. Unity Catalog functions turn fixed SQL logic into tools the agent calls.
“Genie Agent | Natural-language analytics scoped to one Genie Agent”Source: docs.databricks.com
4.MLflow 3: measuring and improving agent quality
Pick MLflow 3 when the scenario asks why the agent did something, whether a change made it better, or how it behaves in production. Agent observability and quality means measuring, debugging and improving an agent from its first trace through to production, and on Databricks that work is done with MLflow. MLflow does not govern data and does not store agent state. It produces the evidence that tells you which of the other three products, or which design choice, needs to change.
Tracing is the foundation. A trace records the input, the final output, and every step in between: model calls, tool calls and retrieval. Each step carries its inputs, outputs, latency, token usage and cost. Without the steps in between, a wrong answer cannot be traced to its cause. With them, you can see that the third tool call returned an empty result, or that a single retrieval step used most of the tokens. Traces are stored as Unity Catalog Delta tables with access control at schema and table level and direct SQL access. MLflow also works for agents hosted outside Databricks.
Improvement is a loop, and MLflow covers every stage:
- Trace the agent so every execution is captured.
- Find an issue in development traces or a regression in production.
- Record feedback on the failing traces and turn representative failures into an evaluation or golden dataset.
- Write a scorer, either an LLM judge or a code-based check, that catches the issue automatically.
- Fix the prompt or the agent, then re-run evaluation to confirm the fix without breaking anything else.
- Monitor production by running the same scorers on live traffic.
The last step explains why production monitoring is not a separate tool. It measures quality on production traces using the same judges and scorers as development-time evaluation, so a regression is checked against the same standard the fix was tested against. For comparing configurations, MLflow also provides experiment tracking and a Prompt Registry for versioned prompts. Reading results across runs is covered in comparing context configurations in MLflow 3.
Checkpoint 4 of 8· Put it in order
Your team keeps getting reports that a deployed agent gives wrong answers. Put the stages of the MLflow 3 improvement loop in the order you would run them.
- 1.Run the same scorers against live production traffic so the issue does not come back
- 2.Fix the prompt or agent, then re-run evaluation to confirm the fix without breaking anything else
- 3.Find the issue in development traces, or catch it as a regression in production
- 4.Trace the agent so every execution is captured, including model calls, tool calls and retrieval
- 5.Write a scorer, either an LLM judge or a code-based check, that catches the issue automatically
- 6.Record feedback on the failing traces and turn representative failures into an evaluation dataset
Each stage depends on the one before it. Traces are the evidence, failing traces become the dataset, and the scorer written for that dataset is used to check the fix. Production monitoring comes last and reuses those same scorers on live traffic, so it does not need its own separate quality criteria.
“Monitor production. Run your scorers against live traffic so the issue doesn't recur — which surfaces the next one to fix.”Source: docs.databricks.com
5.When the fix is a design change, not another product
Some agent failures have nothing to do with which product you chose. They come from how the agent is structured, and the remedy is architectural. MLflow traces usually show the symptom: steps that repeat, contexts that grow, token counts that climb. But adding another product will not fix those symptoms. Three patterns come up often.
The first is one agent stretched over too many domains. If an application covers very different areas, such as billing, technical troubleshooting and account changes, a single agent can become unwieldy and overloaded. The structural fix is a multi-agent system: specialised agents, each with its own domain expertise, its own context and possibly its own tool set, with a coordinator routing each request to the right one. Each sub-agent then works over a smaller, focused context. A larger context window does not fix this, because it still holds all three domains together. A longer combined system prompt makes things worse. Where to draw agent boundaries is covered in boundary placement in multi-agent systems.
The second is a runaway tool loop. An agent that retries a failing tool dozens of times adds output to its context on every attempt. Infinite loops can happen in any tool-calling setup, so the guardrail is an iteration limit or a timeout that stops the agent after a set number of attempts. Thinking longer before each retry, or adding more tools, leaves the loop itself unbounded.
The third is a long session where some of the history no longer matters. As conversations grow, the harness has to decide what stays active and what gets summarised, a process called compaction. Content that downstream steps no longer depend on is the safe thing to cut first. That includes the reasoning and intermediate detail of a sub-task that has already been completed and resolved. The user's open question, a tool result the agent has not yet acted on, and the system prompt that defines the agent's role all still drive the next step. Those must stay. For a full treatment, see what is safe to remove during compaction and detecting context-length degradation.
Checkpoint 5 of 8· Check yourself
A trace shows the same failing tool call repeated forty times in one session, with token usage rising on every attempt. What does this evidence tell you to change?
The trace has already found the cause at the level of individual steps: a tool loop with no limit. That is a design problem, so the fix is an iteration limit or timeout. Adding Lakebase memory, more MCP tools or a bigger context window leaves the loop unbounded.
“mapping the full execution flow so you can see exactly how your agent behaves and identify causes for issues”Source: docs.databricks.com
Checkpoint 6 of 8· Exam question
A single-agent Databricks system handles a broad, multi-domain workflow (billing, technical troubleshooting, and account changes) in one continuous session. As the conversation spans all three domains, the agent's context grows large and it starts confusing details from one domain with another. The team wants a structural fix, not just better prompting. Which intervention is most appropriate?
Correct answer: A — Split the workflow into specialized sub-agents per domain so each operates over a smaller, focused context
- A. Correct. Moving from a single dynamic agent to a multi-agent architecture lets each sub-agent carry only the context relevant to its domain, structurally reducing the token volume and topic-mixing that was causing cross-domain confusion, which matches the request for a structural rather than prompting-only fix.
- B. Incorrect. Simply allowing a larger window keeps all three domains mixed together in one context, which does not resolve the confusion between domains and can still be degraded by growing, unfocused history.
- C. Incorrect. Combining more instructions into a single larger prompt adds more competing content to the same shared context, which is likely to worsen cross-domain confusion rather than fix it.
- D. Incorrect. Self-summarization changes the output format but does not change what is structurally present in the agent's working context, so the underlying domain-mixing problem remains.
Checkpoint 7 of 8· Exam question
An agent occasionally enters a loop where it repeatedly retries a failing tool call dozens of times in a row, each retry appending more output to context and pushing the session closer to the window limit. Which guardrail most directly prevents this specific failure from consuming context length unchecked?
Correct answer: A — Set an iteration or retry limit so the agent stops after a bounded number of attempts
- A. Correct. Guarding against repeated or invalid tool calls with an explicit iteration or timeout limit directly caps the unchecked growth of context caused by a retry loop, which is the specific failure described.
- B. Incorrect. More reasoning effort per call does not stop the loop from repeating; it can even increase the token cost of each failing retry without addressing the unbounded repetition.
- C. Incorrect. Adding more tools does not prevent the agent from retrying the same failing call and can add further ambiguity and context volume rather than bounding the existing loop.
- D. Incorrect. Moving toward a more dynamic pattern grants the agent more autonomy over tool use, which does not inherently bound retries and could make an unconstrained loop more likely, not less.
Checkpoint 8 of 8· Exam question
A long-running planning agent has accumulated a transcript containing both (a) reasoning steps for a sub-task that was already completed and resolved, and (b) the still-open question the user is currently waiting on. The team wants to safely shrink context without harming the agent's ability to finish the open question. Which content is the safest candidate to remove or compact first?
Correct answer: A — The reasoning steps and intermediate detail tied to the already-completed, resolved sub-task
- A. Correct. Superseded reasoning tied to a sub-task that is already resolved no longer needs to remain in full detail; it is a safe candidate for removal or compaction because it does not affect the agent's ability to address the still-open question.
- B. Incorrect. The open, unresolved question is exactly the information the agent still needs to act on, so removing or compacting it risks the agent losing track of the very task it must complete.
- C. Incorrect. A tool result the agent has not yet acted on is active, needed information for the next step, not superseded detail, so it is not a safe removal candidate.
- D. Incorrect. The system prompt defines ongoing role and constraints that apply for the life of the session; removing or compacting it risks the agent losing governing instructions rather than shedding safely superseded detail.
Sources
(10)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“enforcing access control when you query a table or call a model, tracking lineage as data and AI assets are used”
↩︎ Unity Catalog: the layer the other three stand on“Data and AI assets such as tables, views, volumes, functions, models, and services (model services and MCP services) follow a three-level namespace (catalog.schema.object).”
↩︎ Unity Catalog: the layer the other three stand on“Lineage Automatically track how data and AI assets flow and connect, from source data through to models, services, and dashboards.”
↩︎ Unity Catalog: the layer the other three stand on“Unity Catalog is the unified governance layer for data and AI built into Databricks.”
↩︎ Key concept - 2.
“Data assets include files, tables, vector indexes, and feature stores. AI assets include models, tools, and connections for MCP servers and other APIs.”
↩︎ Unity Catalog: the layer the other three stand on“Databricks-managed MLflow can be used for AI apps and agents hosted on Databricks and hosted elsewhere.”
↩︎ MLflow 3: measuring and improving agent quality“MLflow provides a Prompt Registry, as well as experiment tracking.”
↩︎ MLflow 3: measuring and improving agent quality“Production monitoring lets you measure quality on production traces, using the same judges and scorers from development-time evaluation.”
↩︎ Exam trap 4 - 3.https://docs.databricks.com/aws/en/oltp/projectsOfficial docs
“Lakebase is a fully managed Postgres database integrated into the Databricks platform.”
↩︎ Lakebase: where agent state lives between turns“Sync Unity Catalog tables into Lakebase so applications can query them at low latency.”
↩︎ Lakebase: where agent state lives between turns“Store Postgres changes as Delta tables for downstream pipelines and audit.”
↩︎ Lakebase: where agent state lives between turns - 4.
“Agents need persistent storage to maintain context across turns and sessions.”
↩︎ Lakebase: where agent state lives between turns“Supports LangGraph time travel to resume or fork conversations from any checkpoint.”
↩︎ Lakebase: where agent state lives between turns“Captures context within a single conversation session using thread IDs and checkpointing.”
↩︎ Exam trap 2“Deploy agents to Model Serving endpoints with Lakebase-backed checkpoints. Supports LangGraph time travel to resume or fork conversations from any checkpoint.”
↩︎ Checkpoint - 5.
“ready-to-use servers that connect your AI agents to data in Unity Catalog, Databricks AI Search indexes, Genie Agents, and custom functions”
↩︎ Managed MCP servers: governed tools, chosen by the shape of the request“Governed: Unity Catalog enforces permissions, so agents and users access only the tools and data you grant them.”
↩︎ Managed MCP servers: governed tools, chosen by the shape of the request“For example, the code interpreter (system.ai.python_exec) lets an agent run Python code with no setup.”
↩︎ Managed MCP servers: governed tools, chosen by the shape of the request“Genie Agent | Natural-language analytics scoped to one Genie Agent”
↩︎ Checkpoint - 6.https://docs.databricks.com/aws/en/agents/mcp-toolsOfficial docs
“Databricks-provided and registered MCPs use Unity Catalog permissions.”
↩︎ Managed MCP servers: governed tools, chosen by the shape of the request“Use the Databricks SQL MCP server for specific SQL queries, development, and data engineering.”
↩︎ Exam trap 1“For business questions asked in natural language, Databricks recommends the Genie One MCP server.”
↩︎ Prediction - 7.
“Agent observability and quality is the practice of measuring, debugging, and improving your AI agent from your first trace through production.”
↩︎ MLflow 3: measuring and improving agent quality“With only an input and final response, you cannot tell which intermediate decision caused a failure.”
↩︎ MLflow 3: measuring and improving agent quality“Write a scorer. Define a scorer (an LLM judge or code-based check) that catches the issue automatically.”
↩︎ MLflow 3: measuring and improving agent quality“Monitor production. Run your scorers against live traffic so the issue doesn't recur — which surfaces the next one to fix.”
↩︎ Checkpoint - 8.
“Tracing records the inputs, outputs, latency, token usage, and cost of every intermediate step”
↩︎ MLflow 3: measuring and improving agent quality“mapping the full execution flow so you can see exactly how your agent behaves and identify causes for issues”
↩︎ Checkpoint - 9.
“If your application spans radically different sub-domains (finance, devops, marketing, etc.), a single agent can become unwieldy or overloaded with functionality requirements.”
↩︎ When the fix is a design change, not another product“Infinite loops can occur in any tool-calling scenario, so set iteration limits or timeouts.”
↩︎ When the fix is a design change, not another product“Each agent has its own domain or task expertise, context, and potentially distinct tool sets.”
↩︎ Exam trap 3 - 10.https://www.databricks.com/blog/ai-harnessSecondary source
“As conversations grow longer, the harness decides what stays active and what gets summarized, a process known as context compaction.”
↩︎ When the fix is a design change, not another product