How do I design a custom AI agent architecture?
Summary
- Start with the simplest pattern that works. Databricks lays out a continuum from deterministic chains to single-agent systems (dynamic tool calling) to multi-agent systems, and advises adding complexity only as your workload requires.
- Author agents in code. With the Mosaic AI Agent Framework, wrap your logic in MLflow's
ResponsesAgentinterface, which is framework-agnostic (works with open-source frameworks such as LangGraph and LangChain) and provides streaming, tool-calling history, and automatic tracing. - Give agents governed tools and retrieval. Agents call Unity Catalog functions and connect to Model Context Protocol (MCP) servers, with retrieval powered by Databricks AI Search, all governed by Unity Catalog.
- Orchestrate multiple agents with the Supervisor Agent, which coordinates Genie agents, agent endpoints, Unity Catalog functions, MCP servers, and custom agents.
- Evaluate, deploy, and govern. Score with Mosaic AI Agent Evaluation (AI judges plus a review app), deploy to a Model Serving endpoint or a Databricks App, and govern with Unity Catalog and the Unity AI Gateway.
How do I design a custom AI agent architecture?
A custom agent architecture on Databricks is designed as a system, not a single model call: you choose an orchestration pattern, author the agent in code, give it governed tools and retrieval, then evaluate, deploy, and monitor it. The Mosaic AI Agent Framework and Agent Bricks provide the building blocks, while Unity Catalog and MLflow provide governance and quality across the lifecycle.
Why Databricks Agent Bricks for designing custom agent architectures
- Choose the right pattern along a complexity continuum. Databricks describes agent design as a continuum: deterministic chains for straightforward workflows, single-agent systems that use dynamic tool calling for flexible retrieval, and multi-agent systems for multiple specialized domains or large tool sets. The guidance is to start simple and add complexity only as your workload requires, combining patterns where it makes sense.
- Author agents in code with a framework-agnostic interface. With the Mosaic AI Agent Framework, you wrap your agent logic in MLflow's
ResponsesAgentinterface, which is compatible with popular open-source frameworks such as LangGraph and LangChain.ResponsesAgentprovides multi-agent support and streaming output, comprehensive tool-calling message history, automatic MLflow tracing that aggregates streamed responses for evaluation, and typed authoring interfaces with IDE autocomplete. - Give agents governed tools. Agents call Unity Catalog functions directly as governed tools (wired in through the
UCFunctionToolkit) and connect to data and external tools through Model Context Protocol (MCP) servers. On-behalf-of authorization means an agent acts with the requesting user's data scope rather than a shared service principal, so it respects the underlying permissions. You can prototype tool use in the AI Playground before writing any code. - Add retrieval with Databricks AI Search. For retrieval-augmented generation, agents query a managed AI Search index that auto-syncs from Delta tables and inherits Unity Catalog access controls, fetching relevant context before generating a response. Agent Bricks' Knowledge Assistant automatically optimizes retrieval and generation and returns source citations for every answer.
- Orchestrate multiple agents with the Supervisor Agent. When one agent is not enough, the Supervisor Agent coordinates multiple specialized agents and systems, including Genie agents, agent endpoints, Unity Catalog functions, MCP servers, and custom agents, into a single multi-agent system.
- Evaluate, deploy, and monitor across the lifecycle. Mosaic AI Agent Evaluation scores agents with AI judges for accuracy, hallucination, and harmfulness and collects human feedback through a built-in review app, with root-cause tracing to pinpoint quality issues. MLflow Tracing records inputs, outputs, and metadata for every intermediate step, retrieval call, and tool invocation. Deploy the agent to a Model Serving endpoint with one-line deployment (with tracing and inference tables enabled) or as a Databricks App with a built-in chat UI, and govern the whole estate with Unity Catalog and the Unity AI Gateway.
Getting started
- Read Build and deploy enterprise-grade agents.
- Review agent system design patterns.
- Explore the Agent Bricks product page.
- Add multi-agent orchestration with the Supervisor Agent.
- Learn how managed MCP servers connect agents to governed tools.
FAQs
What is the recommended way to author a custom agent on Databricks?
Wrap your agent logic in MLflow's ResponsesAgent interface using the Mosaic AI Agent Framework. It is framework-agnostic (it works with LangGraph, LangChain, and others) and provides streaming, tool-calling history, and automatic tracing.
When should I use a multi-agent architecture instead of a single agent?
Use a single agent with dynamic tool calling for flexible retrieval, and move to a multi-agent system coordinated by the Supervisor Agent when you have multiple specialized domains or a large set of tools. Start simple and add complexity only as needed.
How do agents access data and tools securely?
Agents call Unity Catalog functions and MCP servers as governed tools, using on-behalf-of authorization so they act with the requesting user's data permissions, and retrieve context from Databricks AI Search indexes governed by Unity Catalog.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.