What you will be able to do
- Choose between a deterministic chain, a single agent and a multi-agent supervisor based on who should decide tool order
- Trace how the tool-calling loop produces a multi-stage sequence of calls
- Match each knowledge source or action to a retriever tool, Unity Catalog function, Genie/SQL tool or external connection
- Write tool names and descriptions that steer the LLM into the right call order, and gate risky action tools
Key concept
Tool order ownership — In every agent design, someone decides which tool runs next. In a deterministic chain that is the developer, writing it in code. In a single agent it is the LLM, deciding again on each turn of the tool-calling loop. In a multi-agent system it is a supervisor that routes the request to a specialist. Pick the design by choosing who should own that decision.
1.Who decides the order: chain, single agent or supervisor
Multi-stage reasoning means answering a request by chaining several steps that gather knowledge or take action. A call-center agent asked to return an order has to look up the order, read the return policy, check the return window, trigger the return and only then reply. Each of those steps is either a tool call or the LLM reasoning over what the tools returned. The first design decision is who puts those steps in order.
In a deterministic chain, the developer writes the order into code. A basic RAG chain always retrieves the top-k results, adds them to the prompt and generates. The LLM never picks a tool. This makes the chain the most predictable and auditable design, and usually the fastest, because no extra LLM calls are spent on orchestration. The cost is rigidity: a request the chain did not anticipate needs a code change.
In a single-agent system, one LLM chooses the order at runtime. It decides whether to call a tool, which one, whether to call again, and when to stop. A help desk agent can answer a policy question directly, then call lookup_order(customer_id, order_id) for the next user. If that call returns "invalid order number", the agent can retry or ask the user for the correct ID. That flexibility makes a single agent the usual default for enterprise work in one domain. The trade-off is that you have to guard against repeated or incorrect tool calls.
In a multi-agent system, a supervisor routes the request and each specialist orders its own tools. The coordinator can be another LLM or a rule-based router. Three signs point to this design: the domains are distinct, each specialist needs its own prompts and context, or there are so many tools that one agent's schema cannot reasonably hold them all. A single agent asked to cover finance, devops and marketing tends to become overloaded. The cost is harder routing, tracing and debugging. Agents can also pass a task back and forth without resolving it.
| Pattern | Who decides tool order | Wins when | Main cost |
|---|---|---|---|
| Deterministic chain | The developer, in code, for every request | Well-defined tasks where consistency, auditing and low latency come first | Inflexible; new capabilities need code changes |
| Single-agent system | One LLM, on each turn of the loop | Varied queries within one cohesive domain | Less predictable; must guard against repeated or incorrect tool calls |
| Multi-agent system | A coordinator or supervisor routes to specialists, and each specialist orders its own tools | Large or cross-functional domains with distinct tool sets | Complex to orchestrate; harder to trace and debug |
Start with the simplest design that works, and add autonomy only when the requirements call for more flexibility or model-driven decisions. Separate agents that each sit behind their own endpoint, with no coordinator, are not a multi-agent system. They push the routing decision onto the user.
If you already have specialist agents, such as a Genie Agent and a Knowledge Assistant, you may not need to write a coordinator. The Agent Bricks Supervisor Agent can reference them as subagents, and it respects each user's existing permissions. When to use it is covered in Agent Bricks Supervisor Agent. For ordering, the relevant fact is that its routing is permission-aware out of the box. Users reach only the subagents and data they are already allowed to access, so you never weaken permissions to make the routing work.
Checkpoint 1 of 9· Match them up
Match each agent design to who decides the order in which tools run
Tap a term, then the definition that fits it.
The design you choose decides who owns the order: code in a chain, the LLM at runtime in a single agent, and a supervisor plus specialists in a multi-agent system. With no coordinator, the routing decision falls to the user, so it is not a multi-agent system.
“the developer defines which tools or models are called, in what order, and with which parameters”Source: docs.databricks.com
Checkpoint 2 of 9· Exam question
A team supports three very different request types through one chat entry point: HR policy questions, IT ticket creation, and sales forecast lookups, each needing its own distinct set of tools. Which design best fits this multi-stage reasoning scenario?
Correct answer: A — Place a router agent at the entry point that hands each message to one of three domain agents, with each domain agent holding only the HR, IT or sales tools it needs.
- A. A router in front of domain-specific agents is the supervisor pattern for a system that spans unrelated domains. Routing happens inside the single chat entry point, and each domain agent chooses only among the tools for its own domain. That keeps tool selection reliable and lets each domain evolve on its own.
- B. Tool descriptions help, but one model still has to pick from the whole HR, IT and sales tool set at every reasoning step. Choosing among that large, mixed set is error-prone, and it gets worse as domains are added. Each request type needs only its own tools, so scoping tools per domain behind a router is the better fit.
- C. Each agent would have well-scoped tools. But the team wants one chat entry point, and this design splits it into three endpoints. Users would have to work out which endpoint fits their question, which is the routing job that belongs to the system.
- D. A fixed sequence suits workflows where the same steps are needed every time. Here each message belongs to only one of three unrelated domains. Running the other two steps wastes calls and risks side effects, such as an IT ticket created for an HR question. The path has to depend on the request, which a router provides and a fixed chain does not.
Checkpoint 3 of 9· Exam question
A team already has a working sales Genie Agent and a knowledge assistant, and wants to combine them behind one conversational entry point while preserving each user's existing per-agent permissions, with minimal custom orchestration code. What should they do?
Correct answer: A — Create a Multi-Agent Supervisor in Agent Bricks with the Genie Agent and knowledge assistant added as subagents, so the platform handles routing and per-user access checks without a coordinator to maintain.
- A. The Multi-Agent Supervisor in Agent Bricks is a managed layer that takes existing Genie Agents and knowledge assistants as subagents. It routes requests to them and checks the requesting user's access to each one. That gives a single chat entry point and keeps the existing permissions, with no coordinator code for the team to write.
- B. A hand-built LangGraph coordinator can work, but the team would write and maintain the routing logic and the per-user credential hand-off themselves. That is the heavy custom orchestration they want to avoid. A managed supervisor already covers both needs.
- C. Several served entities on one endpoint split traffic by configured percentages, not by what the user asks. AI Gateway adds usage controls such as rate limits, logging and guardrails, and does not pick between two agents. The setup gives no routing to the right agent and no per-agent permission checks for each user.
- D. Calling both agents through one shared service principal replaces each user's own permissions with a single broad identity. Access is then enforced only by custom filtering code in the app. The existing per-agent permissions are not preserved, and the team writes the orchestration and filtering logic by hand.
2.The tool-calling loop that produces the sequence
The tool-calling loop is how a multi-stage order happens. The model gets the messages and the tool definitions. If it answers in plain text, the loop ends. If it asks for a tool, the runtime runs that tool, adds the result to the messages and calls the model again. The model therefore chooses the second tool after it has seen what the first one returned. A customer ID found in step one can become an argument in step two.
for _ in range(10):
response = model_client.chat.completions.create(
model=os.environ["OPENAI_MODEL"],
messages=messages,
tools=toolkit.tools,
)
if not response.choices[0].message.tool_calls:
print(response.choices[0].message.content)
break
messages.extend(generate_tool_call_messages(response=response, client=client))
else:
raise RuntimeError("The agent reached the tool-calling limit.")The range(10) is part of the design, not a leftover. Any tool-calling setup can loop forever, for example by retrying a lookup that keeps failing. An iteration limit or a timeout turns that into an error you can see instead of a stuck request. Prebuilt runners such as LangGraph's create_react_agent run the same loop for you: you pass the model and the tools, and the framework handles propose, run, append and decide.
Checkpoint 4 of 9· Check yourself
A teammate wants to replace for _ in range(10): with while True:. Their reason is that the tool descriptions are now clear, so the model will reliably reach a final answer. What is wrong with this change?
A clear tool description does not make a loop finish. Any tool-calling loop can go on indefinitely, so it needs an iteration limit or a timeout as well as the model's own decision to stop. The cap turns a runaway loop into an error you can see.
“Infinite loops can occur in any tool-calling scenario, so set iteration limits or timeouts.”Source: docs.databricks.com
3.Matching each knowledge source or action to a tool type
Each piece of knowledge or action the pipeline needs becomes a defined tool, and each tool gets a place in the reasoning sequence. Working out what the pipeline has to fetch belongs to identifying the data the pipeline must fetch. This step turns each item on that list into the right kind of tool. The deciding questions are what shape the data has and who writes the query.
| Need | Tool type | Why this one |
|---|---|---|
| Search documents, knowledge bases or text corpora | Retriever tool (VectorSearchRetrieverTool over an AI Search index) | Exposes an index as a tool, with a description that tells the agent when to search |
| Run a known query whose parameters the agent supplies | Unity Catalog function | The logic is predefined; the agent only fills in the parameters |
| Answer business questions across the workspace in natural language | Genie One MCP | Interprets business terms and queries with the caller's permissions |
| Query one curated Genie Agent from Python | AI Bridge tools (GenieAgent / Genie client) | Handles requests, polling and results through the Genie API |
| Write and run arbitrary SQL against Unity Catalog tables | Databricks SQL MCP | The agent writes the SQL itself |
| Run Python, SQL or shell code | system.ai.sandbox MCP | Isolated environment with no network egress |
| Reach a vector store or service outside Databricks | Unity Catalog HTTP connection used in agent code | Connects to the external service without embedding credentials in the agent |
| Act in SaaS tools such as Slack or GitHub | Built-in system.ai MCP Services | Ready-made servers for third-party tools |
Genie and MCP are the two names that recur in that list. Genie is the Databricks feature that lets business users query structured data, such as Delta tables and views, in natural language. It reads Unity Catalog metadata (table descriptions, column names, key relationships) to construct the SQL for each question, which is why Genie tools generate queries rather than run fixed ones. A Genie Agent is one such curated space of tables, and a Genie conversation is the thread of questions asked within it. MCP servers are the other recurring piece: a server exposes a set of tools behind one common interface, and agent code connects to it by URL. Databricks-managed servers, external MCP Services and custom servers all look the same to the agent, so only the URL and authentication differ.
Three of the tool types are easy to mistake for products rather than mechanisms. An AI Search index stores documents as embedding vectors, so a query returns the passages closest in meaning; VectorSearchRetrieverTool wraps an index so the agent can call it. AI Bridge is the set of Python libraries, such as databricks-ai-bridge, that wrap Genie Agents and indexes as agent tools. A Unity Catalog HTTP connection is a stored definition of an outside service's host and credentials, created with CREATE CONNECTION and TYPE HTTP. Agent code calls the service through it, and the caller needs USE CONNECTION on it.
For structured data, the deciding question is who writes the query. If you know the query ahead of time, such as "look up a customer by name", a Unity Catalog function keeps the SQL fixed and lets the agent pass in the name. If the questions are open-ended, such as "top 10 customers by revenue last quarter", a Genie tool or the SQL MCP lets the query be generated. A fixed function is easier to audit. A generated query covers questions you did not foresee.
The type you choose also limits where the tool can sit in the sequence. A sandboxed code tool has no network egress, so it cannot download packages or call APIs. A Genie tool starts a new conversation on every call unless you save the conversation ID and pass it on the next call. Without that ID, a follow-up step loses the context of the previous one. With MCP servers, do not hardcode tool names or argument shapes. List the server's tools from code to confirm each tool's name, description and input schema at runtime.
Checkpoint 5 of 9· Check yourself
Compliance requires every SQL statement your agent runs against the customer table to be reviewed before release. The agent only ever needs to fetch a customer's email and ID from the customer's name. Which tool type fits this need?
The query is known ahead of time and only the name changes, so a Unity Catalog function fits. It keeps the SQL fixed and easy to audit while the agent supplies the parameter. The SQL MCP and Genie generate the query at runtime, which fits open-ended questions, not a pre-reviewed lookup.
“Create a structured retrieval tool using Unity Catalog SQL functions when the query is known ahead of time and the agent provides the parameters.”Source: docs.databricks.com
Checkpoint 6 of 9· Check yourself
In step one, an agent calls its ask_genie tool with "What were total sales last month?" In step two, it calls the same tool with "Break that down by region." The second answer ignores the first. What is the most likely cause?
A Genie tool opens a fresh conversation on every call unless you save the returned conversation ID and pass it on the next call. Without the ID, the follow-up step has no context for "that". The loop does keep tool results in the messages, and the missing network egress applies to the sandbox, not to Genie.
“These examples start a new Genie conversation for each tool call. To retain context, save the returned conversation ID”Source: docs.databricks.com
4.Names and descriptions steer the order, and gates enforce it
The LLM chooses its next tool from the tool's name, description and parameter docs, and from nothing else. On a retriever, tool_name and tool_description exist for this purpose. A description such as "Search Databricks documentation to answer product questions" tells the agent when to search. If every tool has a vague description, the model has no basis for choosing one over another, and the order becomes guesswork.
A description can also encode a dependency between tools. The comment on the Unity Catalog function below says what goes in and what comes out, and adds that the returned ID feeds other queries. A model that needs order history but only has a customer name now has a reason to call this tool first and carry the ID into the next call. The parameter comment does the same job for the input.
CREATE FUNCTION my_catalog.my_schema.lookup_customer_info(
customer_name_input STRING COMMENT 'Name of the customer whose info to look up'
)
RETURNS STRING
COMMENT 'Returns metadata about a particular customer, given the customer''s name, including the customer''s email and ID. The
customer ID can be used for other queries.'
RETURN SELECT CONCAT(
'Customer ID: ', customer_id, ', ',
'Customer Email: ', customer_email
)
FROM my_catalog.my_schema.customer_data
WHERE customer_name = customer_name_input
LIMIT 1;Good descriptions steer the model, but they cannot guarantee anything. A single agent's order is less predictable than a chain's, and it can still make an incorrect tool call. For gathering tools, a wrong order costs an extra round trip. For action tools, such as triggering a return or issuing a payment, a wrong order produces an outcome you cannot take back. Production systems therefore limit the agent's autonomy on risky actions. One way is to require human approval before the action runs. Another is to build the precondition into the action tool itself, so it refuses to run until the verification step has passed.
The call-center example shows the intended order: find information, reason about whether the order is inside the return window, escalate to a human if it falls outside the normal rules, then act. Verification comes before the action. Running the action first and the checks afterwards only produces an audit trail of a mistake. So does removing the check and relying on a reviewer after a payment has settled. Running the check and the action in parallel to save time means the action never waits for the check's verdict.
Checkpoint 7 of 9· Fill the gap
Which keyword gives this Unity Catalog function the text the agent reads to decide when to call it, and that the returned ID can feed later calls?
CREATE FUNCTION my_catalog.my_schema.lookup_customer_info(
customer_name_input STRING COMMENT 'Name of the customer whose info to look up'
)
RETURNS STRING
? 'Returns metadata about a particular customer, given the customer''s name, including the customer''s email and ID. The
customer ID can be used for other queries.'
RETURN SELECT CONCAT(
'Customer ID: ', customer_id, ', ',
'Customer Email: ', customer_email
)
FROM my_catalog.my_schema.customer_data
WHERE customer_name = customer_name_input
LIMIT 1;The function-level COMMENT is the description the agent sees. Here it says what goes in, what comes out, and that the customer ID can be used for other queries, which gives the model a reason to call this tool first. tool_description is the retriever tool's parameter, not SQL syntax.
Source: docs.databricks.comCheckpoint 8 of 9· Check yourself
An agent has two tools, check_return_window and issue_refund. A refund must never be issued for an order outside the return window. Which design meets this requirement?
Descriptions steer the model, but they cannot guarantee that it calls the tools in the right order. The action needs a gate, either a precondition built into the tool or human approval. Running the tools in parallel or auditing afterwards lets the refund go through before the check has given its verdict.
“most production systems carefully constrain the agent's autonomy to ensure compliance and predictability, for example by requiring human approval for risky actions.”Source: docs.databricks.com
Checkpoint 9 of 9· Exam question
A generative AI engineer is building a tool-calling agent for a claims-processing use case. The agent has three tools: lookup_claim_details, check_policy_coverage, and issue_payment. Payments must never be issued for claims that fail coverage verification. How should the engineer define and order these tools for the agent's multi-stage reasoning loop?
Correct answer: A — Constrain issue_payment so it only runs after check_policy_coverage approves the claim, and write tool descriptions that lead the agent to call lookup, then coverage check, then payment in that order.
- A. Constraining the payment tool to run only after coverage approval, and describing the tools so the agent naturally sequences lookup, then verification, then action, matches Databricks guidance that consequential actions in a multi-stage reasoning loop should be gated behind the verification step they depend on. This prevents the model from reaching an irreversible action tool before the required check has succeeded.
- B. Calling the payment tool before verifying coverage defeats the purpose of the coverage check, since the payment would already be issued by the time the audit-log calls run. This ordering allows an unapproved claim to be paid, which is exactly the failure mode the design must prevent.
- C. Identical generic tool descriptions remove the signal the agent needs to reason about which tool serves which purpose, and running the payment and coverage-check tools in parallel means the payment can complete before the coverage result is even known. This creates a race condition that can pay out non-covered claims.
- D. Removing the coverage-check tool eliminates the automated gate entirely, so every claim would be paid regardless of eligibility, with correctness pushed onto a reviewer who only sees the claim after money has already moved. This does not satisfy the requirement that payments never occur for claims failing verification.
Sources
(7)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“the developer defines which tools or models are called, in what order, and with which parameters.”
↩︎ Who decides the order: chain, single agent or supervisor“If that tool responds with "invalid order number," the agent can retry or prompt the user for the correct ID”
↩︎ Who decides the order: chain, single agent or supervisor“A separate "coordinator" or "AI supervisor" directs requests to the appropriate agent, or decides when to hand off from one agent to another.”
↩︎ Who decides the order: chain, single agent or supervisor“If your application spans radically different sub-domains (finance, devops, marketing, etc.), a single agent can become unwieldy or overloaded with functionality requirements.”
↩︎ Who decides the order: chain, single agent or supervisor“start simple. Introduce more complex agentic behaviors when you truly need them for better flexibility or model-driven decisions.”
↩︎ Who decides the order: chain, single agent or supervisor“Infinite loops can occur in any tool-calling scenario, so set iteration limits or timeouts.”
↩︎ The tool-calling loop that produces the sequence“most production systems carefully constrain the agent's autonomy to ensure compliance and predictability, for example by requiring human approval for risky actions.”
↩︎ Names and descriptions steer the order, and gates enforce it“Reason: The agent checks whether that order fits in the return window.”
↩︎ Names and descriptions steer the order, and gates enforce it“The LLM adaptively decides which tools to use, when to make more LLM calls, and when to stop.”
↩︎ Key concept“You have so many tools that fitting them all into one agent's schema is impractical; each agent can own a subset.”
↩︎ Exam trap 1“Infinite loops can occur in any tool-calling scenario, so set iteration limits or timeouts.”
↩︎ Exam trap 3“most production systems carefully constrain the agent's autonomy to ensure compliance and predictability, for example by requiring human approval for risky actions.”
↩︎ Exam trap 4“the developer defines which tools or models are called, in what order, and with which parameters”
↩︎ Checkpoint - 2.
“The supervisor has built-in access controls, so that its end users only access the subagents and data they have access to.”
↩︎ Who decides the order: chain, single agent or supervisor“The supervisor has built-in access controls, so that its end users only access the subagents and data they have access to.”
↩︎ Exam trap 2 - 3.
“The helper runs the requested functions and formats their results for the next model call.”
↩︎ The tool-calling loop that produces the sequence“Use Unity Catalog functions when your agent needs to run predefined logic, such as a SQL query whose parameters the agent supplies.”
↩︎ Matching each knowledge source or action to a tool type - 4.
“Create a structured retrieval tool using Unity Catalog SQL functions when the query is known ahead of time and the agent provides the parameters.”
↩︎ Matching each knowledge source or action to a tool type“Databricks recommends the Genie One MCP for agents that answer business questions across the workspace in natural language.”
↩︎ Matching each knowledge source or action to a tool type“Use the Databricks SQL MCP when your agent needs to write and run SQL against your Unity Catalog tables.”
↩︎ Matching each knowledge source or action to a tool type“AI Bridge handles requests, polling, and query results through the Genie API.”
↩︎ Matching each knowledge source or action to a tool type“These examples start a new Genie conversation for each tool call. To retain context, save the returned conversation ID”
↩︎ Checkpoint - 5.https://www.databricks.com/blog/multi-agent-supervisor-architecture-orchestrating-enterprise-ai-scaleSecondary source
“is designed to make structured data such as Delta tables and views directly accessible to business users by leveraging natural language interfaces”
↩︎ Matching each knowledge source or action to a tool type - 6.
“All of them expose the same MCP interface, so the agent code is the same.”
↩︎ Matching each knowledge source or action to a tool type“built-in system.ai MCP Services for third-party SaaS tools such as Slack, GitHub, Google Drive”
↩︎ Matching each knowledge source or action to a tool type“call list_tools() to get each tool's name, description, and input schema at runtime”
↩︎ Matching each knowledge source or action to a tool type - 7.
“Use VectorSearchRetrieverTool from databricks-langchain or databricks-openai to expose an index as an agent tool.”
↩︎ Matching each knowledge source or action to a tool type“If your vector index is hosted outside Databricks, you can create a Unity Catalog connection to connect to the external service”
↩︎ Matching each knowledge source or action to a tool type“Create a retriever tool and give it a description that tells the agent when to search.”
↩︎ Names and descriptions steer the order, and gates enforce it“# Used by the LLM to understand the purpose of the tool”
↩︎ Names and descriptions steer the order, and gates enforce it