What you will be able to do
- Explain why every sub-agent reply adds to the orchestrator's context in a Databricks multi-agent system
- Pick the sub-agent output design change that cuts orchestrator context load while keeping the task coherent
- Reject tempting fixes that are lossy for the orchestrator, such as truncating its history or passing raw transcripts up
- Shape compact sub-agent results with structured outputs, knowing what the schema can and cannot enforce
- Use MLflow trace token usage to find which sub-agent output is inflating orchestrator input
Key concept
Sub-agent output is orchestrator input — To the orchestrator, a sub-agent is just a tool. Whatever the sub-agent returns becomes a tool result that sits in the orchestrator's context for the rest of the task. So the most direct lever on orchestrator context load is the size and shape of what each sub-agent sends back.
1.Why the orchestrator saturates first
On Databricks, a multi-agent system puts one coordinator in front of several specialists. That coordinator might be a Supervisor Agent built through Agent Bricks, or a custom orchestrator on Databricks Apps built from the OpenAI Agents SDK template. The specialists can be Genie Agents, knowledge assistants, serving endpoints or other app agents. Users get a single entry point, and each specialist works its own domain.
The mechanism is simple. In the Databricks Apps orchestrator, each configured sub-agent becomes a tool. The design-patterns guide describes an agent's loop as calling tools and then integrating tool outputs into the conversation. Put those together and every sub-agent reply becomes part of the orchestrator's working context. The orchestrator keeps it there, re-reads it on every later reasoning step, and reasons over it alongside everything else.
That is why saturation shows up at the orchestrator before anywhere else. Each sub-agent has its own context and only sees its own slice of the work. The orchestrator sees all the slices. If a Genie sub-agent returns a hundred result rows, a RAG sub-agent returns five full retrieved passages, and a custom agent returns its whole reasoning trace, the orchestrator holds all of that at once. A Databricks blog post on supervisor architecture names this pressure as a reason to split work into agents in the first place: otherwise the context grows too complex for a single agent to keep track of. Verbose sub-agent output brings the same problem back, this time inside the orchestrator.
Checkpoint 1 of 8· Check yourself
In a Databricks Apps multi-agent orchestrator, what happens to a sub-agent's reply after the orchestrator calls it?
Sub-agents are tools to the orchestrator, and tool outputs are integrated into the conversation. That is how sub-agent verbosity turns into orchestrator context load. Nothing summarizes or offloads it automatically.
“The orchestrator treats each subagent as a tool and uses its instructions to route requests to the right one.”Source: docs.databricks.com
Checkpoint 2 of 8· Exam question
In a Databricks multi-agent workflow, an orchestrator routes tasks to several specialized sub-agents (for example, a data-retrieval agent and a code-generation agent). Over many turns, the orchestrator's context window fills up because each sub-agent response includes its complete internal tool-call transcript. Which sub-agent output design change would most reduce the orchestrator's context load without compromising task coherence?
Correct answer: A — Return a concise, structured summary of the final result and key decisions
- A. Correct. Replacing the full tool-call transcript with a concise summary of the final result and the decisions that led to it removes low-value token volume from the orchestrator's context while still giving it everything it needs to continue planning coherently.
- B. Incorrect. Expanding the context window increases capacity but does not reduce the load; it lets the saturation problem grow larger and delays rather than solves it, and does nothing to change what sub-agents send.
- C. Incorrect. Appending the full transcript to every response is the opposite of load reduction — it guarantees the orchestrator's context keeps accumulating raw, mostly redundant tool-call detail every turn.
- D. Incorrect. Routing tool calls through the orchestrator moves the detailed logging burden onto the orchestrator itself, increasing its context load rather than reducing it.
- E. Incorrect. Summarizing the orchestrator's own instructions doesn't address the problem, since the instructions aren't the source of saturation — the verbose sub-agent transcripts are.
2.The design change: return conclusions, not evidence
Start with what the orchestrator actually does. The Supervisor Agent documentation describes its job as managing agent interactions, task delegation, and result synthesis. Routing needs to know what has been done and what is still open. Synthesis needs each specialist's conclusion. Neither needs the evidence each specialist went through to reach its conclusion: every SQL row it scanned, every passage it retrieved, every intermediate thought.
That difference points to the change the exam is looking for. Have each sub-agent return a compact, decision-relevant result, and keep the detail on the sub-agent's side. A well-designed return usually contains:
- The answer or finding for the sub-task, stated directly. - A status: done, partial, or blocked, plus any open question the orchestrator has to act on. - Key figures or entities the orchestrator will need to combine with other sub-agents' results. - Provenance: which table, document or source backs the finding, so the detail can be fetched later if needed.
What stays out: raw transcripts, raw tool payloads, full retrieved documents, and chain-of-thought.
This is the only family of fixes that fits both halves of the objective. It reduces load because the orchestrator stops holding evidence. It keeps coherence because the orchestrator still gets every conclusion it needs to synthesize. Now compare the options that fail one half or the other. Truncating or dropping the orchestrator's older turns reduces load, but it throws away conclusions the orchestrator still needs, which breaks coherence. Passing full transcripts up "to be safe" keeps everything and makes saturation worse. Moving to a larger model or adding more sub-agents changes neither what each reply contains nor where it ends up.
It should return its answer, a short list of the facts the answer depends on, and identifiers for the source documents. The orchestrator's job is to combine conclusions across sub-agents, and it can do that from the answer and the key facts. The passages were only evidence the sub-agent needed to reach its conclusion. If a follow-up needs them, the source identifiers say where they are.
Checkpoint 3 of 8· Check yourself
A Supervisor Agent is saturating. Which change targets the documented part of its job that actually consumes sub-agent output?
The supervisor uses sub-agent output for delegation decisions and result synthesis. Returning results built for synthesis cuts what it holds without removing anything it needs. A larger window or another reader leaves the volume unchanged, and truncation discards conclusions.
“manage agent interactions, task delegation, and result synthesis to deliver comprehensive solutions.”Source: docs.databricks.com
Checkpoint 4 of 8· Exam question
A Genie-based data-analysis sub-agent, when asked a business question by the orchestrator, returns the full raw query result set of thousands of rows along with its complete step-by-step reasoning trace. This is filling the orchestrator's context and slowing downstream planning. Which output change best addresses this while preserving task coherence?
Correct answer: A — Return a synthesized answer with key figures and citations, not the raw row-level results
- A. Correct. A synthesized answer with the key figures and source citations gives the orchestrator the decision-relevant substance of the analysis without the thousands of raw rows, cutting context load while keeping the answer coherent and traceable.
- B. Incorrect. A bare row count discards the figures and citations the orchestrator actually needs to reason about the business question, trading context savings for lost coherence.
- C. Incorrect. Keeping the full row-level result set still floods the orchestrator's context with thousands of rows; removing only the reasoning trace does not solve the underlying volume problem.
- D. Incorrect. Sending only the reasoning trace and forcing the orchestrator to re-run the query duplicates work, wastes compute, and still leaves the orchestrator without a usable answer.
- E. Incorrect. Compressing the raw result set into a CSV attachment still requires the orchestrator to load and parse the full row-level data to get an answer, so the context burden remains.
Sources4
3.Shaping sub-agent output with structured outputs
A compact result is easier to rely on when its shape is fixed. Databricks structured outputs let a chat model return JSON that follows a schema you supply through response_format. That works the same way across supported model providers. For sub-agent design, a schema with fields such as finding, status, and sources stops a sub-agent from drifting back into long free text. It also gives the orchestrator a predictable shape to combine. The documented example below extracts a small, fixed set of fields from a long input, which is exactly the move a sub-agent's final reply needs to make.
response_format = {
"type": "json_schema",
"json_schema": {
"name": "research_paper_extraction",
"schema": {
"type": "object",
"properties": {
"title": { "type": "string" },
"authors": {
"type": "array",
"items": { "type": "string" }
},
"abstract": { "type": "string" },The documented limitations matter for this design, and one of them catches people out. A schema fixes the shape of the output, not its size. Foundation Model APIs do not enforce length or size constraints, so a maxLength on a summary field will not stop a long reply. Brevity has to come from the sub-agent's instructions, such as "state the finding in two sentences". Keep the schema flat too: the docs say heavily nested schemas lower generation quality.
| Documented limit | What it means for sub-agent output design |
|---|---|
| Length and size keywords such as maxLength, maxProperties, and minProperties are not enforced | The schema cannot cap how much a sub-agent returns. Ask for brevity in the instructions. |
| Heavily nested JSON schemas result in lower quality generation | Use a flat return shape (finding, status, sources) rather than deeply nested objects |
| The maximum number of keys in the JSON schema is 64 | A return schema should be small anyway. Needing many keys suggests the sub-agent is passing up evidence. |
| Claude models: only json_schema is supported; no streaming; response_format cannot be combined with tools or tool_choice | A sub-agent that calls tools on a Claude model cannot use response_format in those same requests. Plan where the structured final reply gets produced. |
Checkpoint 5 of 8· Check yourself
A team adds a strict json_schema to each sub-agent's final reply and sets maxLength: 400 on the summary field. Summaries are still often much longer than that, and the orchestrator is still saturating. What is the best explanation?
The docs state that length and size keywords, including maxLength, are not enforced. The schema fixes the output's shape, but keeping it short depends on the instructions.
“Foundation Model APIs does not enforce length or size constraints for objects and arrays.”Source: docs.databricks.com
Sources5
4.Keeping the task coherent, and measuring the effect
The usual worry about compact returns is that the detail is "gone". It does not have to be. Detail can live on the sub-agent's side and be fetched when needed. On Databricks, managed agent sessions are one place for an agent's full history. The docs describe using them to rebuild full context, tool calls and reasoning included, on a follow-up. The details of sessions and memory belong to their own lesson. The point here is the contrast. A compact return with provenance is lossless for what the orchestrator needs, and the full detail can still be retrieved. Truncating the orchestrator's history is lossy: whatever falls off the end is gone, conclusions included.
You can draw an analogy with how Databricks describes memory. As a session builds up, the agent distills the durable facts out of it. A good sub-agent return does the same thing for the orchestrator: it keeps what matters for the next decision and leaves the bulk behind.
Checkpoint 6 of 8· Check yourself
Which change reduces orchestrator context load while leaving the sub-agents' full working detail retrievable if a later step needs it?
Compact returns cut what the orchestrator holds, and a persisted history means detail can be rebuilt later instead of being lost. Truncation throws conclusions away, full transcripts make the load worse, and merging puts all the detail into a single context.
“Reconstruct full context (including tool calls and reasoning) on a follow-up message.”Source: docs.databricks.com
Diagnose before you redesign. MLflow Tracing records multi-agent runs with visibility into which agent was called on each turn and the messages passed between agents. From version 3.2.0, it also records token usage per call. Reading token usage span by span shows which sub-agent's replies make the orchestrator's input tokens jump. That sub-agent's output is the one to redesign first. The snippet below comes from the AG2 tracing integration page, but it uses the general MLflow trace API.
last_trace_id = mlflow.get_last_active_trace_id()
trace = mlflow.get_trace(trace_id=last_trace_id)
total = trace.info.token_usage
print("Input:", total["input_tokens"], "Output:", total["output_tokens"], "Total:", total["total_tokens"])
for span in trace.data.spans:
usage = span.get_attribute("mlflow.chat.tokenUsage")
if usage:
print(span.name, usage)Checkpoint 7 of 8· Fill the gap
Which span attribute holds per-call token usage in this sample?
for span in trace.data.spans:
usage = span.get_attribute(" ? ")
if usage:
print(span.name, usage)Per-call usage is recorded in the mlflow.chat.tokenUsage span attribute. Comparing it span by span shows which sub-agent replies inflate orchestrator input.
Source: docs.databricks.comCheckpoint 8 of 8· Exam question
In a long-running multi-agent workflow, a sub-agent restates the orchestrator's full original task instructions and prior conversation history at the start of every response it sends back. Over many turns this steadily saturates the orchestrator's context. Which change to the sub-agent's output design would most reduce this without harming task coherence?
Correct answer: A — Return only new information and results, omitting instructions already known to the orchestrator
- A. Correct. Since the orchestrator already holds the original instructions, omitting them from each sub-agent response and returning only new information eliminates the redundant restatement that drives the saturation, without losing any information the orchestrator needs.
- B. Incorrect. A shorter paraphrase still adds redundant, already-known content to every turn; it reduces but does not eliminate the unnecessary repetition, so saturation continues to build.
- C. Incorrect. Discarding older orchestrator turns risks dropping information the orchestrator still needs for coherent planning, and does not stop the sub-agent from continuing to restate instructions each turn.
- D. Incorrect. Packaging the same repeated content as a separate file still requires the orchestrator to receive and account for it, so it does not remove the redundant volume from context.
- E. Incorrect. Having the orchestrator echo its own instructions back adds an extra round of redundant content rather than removing the sub-agent's repeated restatement.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Passing each sub-agent's full transcript up to the orchestrator is the safest way to keep the task coherent.Why is that wrong?
The orchestrator needs conclusions to synthesize, not the evidence behind them. Full transcripts make saturation worse. Compact results with provenance keep coherence, and the full detail can be stored and rebuilt elsewhere if a later step needs it.
Covered in The design change: return conclusions, not evidence
2.Adding maxLength to a sub-agent's structured-output schema will cap how much it returns to the orchestrator.Why is that wrong?
Foundation Model APIs do not enforce length or size keywords. The schema fixes the shape of the output, and brevity has to come from the sub-agent's instructions.
3.Orchestrator saturation comes mainly from the orchestrator's own prompt, so the fix is to trim or truncate the orchestrator's history.Why is that wrong?
Each sub-agent is a tool whose output is added to the orchestrator's conversation, so sub-agent replies are usually the main source of load. Truncation discards conclusions. Shrinking what sub-agents return deals with the cause.
Covered in Why the orchestrator saturates first
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“The orchestrator treats each subagent as a tool and uses its instructions to route requests to the right one.”
↩︎ Why the orchestrator saturates first“The orchestrator treats each subagent as a tool and uses its instructions to route requests to the right one.”
↩︎ Key concept - 2.
“Integrate tool outputs into the conversation.”
↩︎ Why the orchestrator saturates first“Integrate tool outputs into the conversation.”
↩︎ Exam trap 3 - 3.https://www.databricks.com/blog/multi-agent-supervisor-architecture-orchestrating-enterprise-ai-scaleSecondary source
“the context grows too complex for a single agent to keep track of.”
↩︎ Why the orchestrator saturates first - 4.
“manage agent interactions, task delegation, and result synthesis to deliver comprehensive solutions.”
↩︎ The design change: return conclusions, not evidence - 5.
“Structured outputs on Databricks let you generate responses in a defined JSON format as part of your AI application workflows.”
↩︎ Shaping sub-agent output with structured outputs“Heavily nested JSON schemas result in lower quality generation. If possible, try flattening the JSON schema for better results.”
↩︎ Shaping sub-agent output with structured outputs“The response_format parameter for Claude structured outputs cannot be combined with tools or tool_choice.”
↩︎ Shaping sub-agent output with structured outputs“Foundation Model APIs does not enforce length or size constraints for objects and arrays.”
↩︎ Exam trap 2“Foundation Model APIs does not enforce length or size constraints for objects and arrays.”
↩︎ Checkpoint - 6.
“Reconstruct full context (including tool calls and reasoning) on a follow-up message.”
↩︎ Keeping the task coherent, and measuring the effect“Reconstruct full context (including tool calls and reasoning) on a follow-up message.”
↩︎ Exam trap 1 - 7.
“As a session accumulates, an agent (or your application) distills the durable facts out of it and writes them to memory.”
↩︎ Keeping the task coherent, and measuring the effect - 8.
“Messages passed between agents”
↩︎ Keeping the task coherent, and measuring the effect