CertSafari
    Databricks Certified Context Engineer Associate· Lessons

    Domain 1 · Lesson 4/45

    Choosing between Unity Catalog, Lakebase, MCP and MLflow 3 for an agent

    Select the right tool in the Databricks product stack (Unity Catalog, Lakebase, MCP, MLflow 3) for a given scenario.

    17 min read
    2.29% of exam
    10 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    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?

    Sources12

    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.

    The two memory types Lakebase supports for agents
    Memory typeWhat it holdsScenario signal
    Short-term memoryContext within one conversation session, using thread IDs and checkpointingA follow-up question loses track of an earlier turn
    Long-term memoryKey insights extracted and stored across multiple conversationsAnswers 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?

    Sources34

    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.

    Databricks managed MCP servers and when each fits
    ServerUse caseURL pattern
    Genie OneNatural-language analytics across your workspacehttps://<workspace-hostname>/ai-gateway/mcp-services/system.ai.genie_one_mcp
    Genie AgentNatural-language analytics scoped to one Genie Agenthttps://<workspace-hostname>/api/2.0/mcp/genie/{genie_space_id}
    AI SearchRetrieval over unstructured documentshttps://<workspace-hostname>/api/2.0/mcp/ai-search/{catalog}/{schema}/{index_name}
    Databricks SQLDeveloper queries and data engineeringhttps://<workspace-hostname>/api/2.0/mcp/sql
    Unity Catalog functionsPredefined SQL logic as toolshttps://<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.

    Sources56

    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:

    1. Trace the agent so every execution is captured.
    2. Find an issue in development traces or a regression in production.
    3. Record feedback on the failing traces and turn representative failures into an evaluation or golden dataset.
    4. Write a scorer, either an LLM judge or a code-based check, that catches the issue automatically.
    5. Fix the prompt or the agent, then re-run evaluation to confirm the fix without breaking anything else.
    6. 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. 1.Run the same scorers against live production traffic so the issue does not come back
    2. 2.Fix the prompt or agent, then re-run evaluation to confirm the fix without breaking anything else
    3. 3.Find the issue in development traces, or catch it as a regression in production
    4. 4.Trace the agent so every execution is captured, including model calls, tool calls and retrieval
    5. 5.Write a scorer, either an LLM judge or a code-based check, that catches the issue automatically
    6. 6.Record feedback on the failing traces and turn representative failures into an evaluation dataset

    Sources782

    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?

    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?

    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?

    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?

    Sources910

    Sources

    (10)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 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. 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. 3.
      “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. 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. 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. 6.
      “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. 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. 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. 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. 10.
      “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

    Ready to test yourself?

    Practise Databricks Certified Context Engineer Associate in quiz mode.

    Spotted a mistake, or was something unclear? Tell us.