Scrivio Interview library
DesignIntermediate6 min read · updated 12 November 2026

A team proposes a multi-agent system with a planner agent, a research agent, a coding agent and a reviewer agent for internal report generation. When is this better than one agent with several tools, and what problems should you expect?

Several agents are better than one agent with several tools when the steps need different instructions, tools or models and can be cleanly separated, such as researching sources and then reviewing a draft. Expect more model calls and latency, information lost between agents and harder debugging. I would prefer a deterministic orchestrator, workflow code that calls each agent for its step with structured hand-off messages and limits on rounds and cost, and I would only choose the multi-agent design after it beats a single-agent baseline on the same set of tasks.

Why this question is asked

Multi-agent systems are attractive on a whiteboard: each box has a clear job and a friendly name. In production, every extra agent is another model call, another place for information to get lost and another component to debug. Interviewers ask this design question to see whether we can judge when splitting work really helps and what it costs. In this answer, we will compare the two designs, list the problems to expect with a concrete cost example, describe the orchestrator approach with structured hand-offs, and finish with how to evaluate the choice.

1A Quick Recap of the Two Designs

One agent with several tools is a single LLM running a tool-calling loop, with tools such as searchDocs, queryMetrics and runPython, and one set of instructions covering the whole job of producing the report. A multi-agent system gives each part of the job its own agent: a planner that breaks the report into sections, a research agent that gathers sources, a coding agent that runs analysis code, and a reviewer agent that checks the draft. Each has its own instructions, its own tools and possibly its own model.

2When Several Agents Really Help

Splitting helps when the parts need genuinely different setups. The research step wants search tools and instructions about citing sources; the coding step wants a code execution sandbox and a model that is strong at code; the reviewer wants instructions to find errors, not to write. Putting all of that into one agent means one long, conflicting prompt and a large tool list, and models choose tools less accurately as the list grows.

Splitting also helps when the parts can be separated cleanly, with a clear input and output for each. Research then review is a good example: the research step outputs a list of findings with sources, and the review step checks a draft against them. If two parts need constant back-and-forth, separating them just adds messaging.

3The Problems to Expect

The first cost is more model calls and latency. Suppose one agent produces a report in 12 model calls and about 2 minutes. A planner, a researcher, a coder and a reviewer, each running its own loop, plus a revision round, can easily take 40 calls and 7 minutes, and the token cost grows with every context each agent rebuilds.

The second is information lost between agents. Each agent only knows what it is given. If the planner understood that the report is for the finance board and should exclude one region, but its hand-off only says 'research Q3 revenue', the researcher will happily include that region. The third is harder debugging: when the final report is wrong, we must find which agent introduced the error and whether it was its fault or the input it received.

One agent versus four, for the same report
MeasureOne agent with toolsFour agents, free-form
Model callsabout 12about 40
Time to reportabout 2 minutesabout 7 minutes
Prompt per agentone long prompt, many toolsshort, focused prompts
Where context livesone conversationsplit across hand-offs
Debugging a wrong numberone tracefour traces and their messages
Illustrative numbers; the point is that each split must earn back its cost in quality.

4Prefer a Deterministic Orchestrator

If we do split the work, the safest structure is an orchestrator written as ordinary workflow code, not another agent. The code calls the planner once, loops over the planned sections calling the research agent for each, calls the coding agent where a section needs numbers, assembles the draft, and calls the reviewer. The order, the loops and the stopping rules are written in Java, so they are predictable and testable, and each agent is just a function with a typed input and output.

The alternative, free-form agents that message each other until someone declares the report done, is much harder to control. Conversations can go in circles, agents can redo each other's work, and nothing guarantees an end.

Step throughReport workflow owned by code
  1. Planner agentreturns a ReportPlan: sections, audience, exclusions
  2. For each section: research agentreturns findings with source ids
  3. Coding agent where numbers are neededreturns tables with the code it ran
  4. Assemble the draftplain code
  5. Reviewer agentreturns issues tied to sections
  6. Issues found and fewer than 2 revision rounds?
    YesRevise the affected sectionsNoPublish or send to a person

6 steps in order. Play them, or step through them one at a time.

5Structured Hand-offs and Limits

Each hand-off should be a structured message, a Java record serialised as JSON, rather than free text, so nothing important is left implicit. The plan might be a ReportPlan with audience, period, sections and exclusions; every agent receives the fields it needs, including the audience and exclusions, so context is not lost.

Limits are set per run: at most 2 revision rounds, at most a fixed number of tool calls per agent, and a cost budget, for example 1 dollar per report, after which the workflow stops and hands the partial result to a person. These limits are easy to enforce precisely because the control flow is in code.

Java
record ReportPlan(String audience, String period, List<String> sections, List<String> exclusions) {}
record Finding(String section, String claim, String sourceId) {}
record ReviewIssue(String section, String problem, String evidence) {}
ReportPlan plan = planner.plan(request); // audience=finance board, exclusions=[EMEA]
List<Finding> findings = plan.sections().stream()
.flatMap(s -> researcher.research(s, plan).stream()) // each call sees audience and exclusions
.toList();

6Evaluate Against a Single-Agent Baseline

The decision should rest on evidence. We collect a set of, say, 30 past report requests with reports that experts judged good, then run both designs on all of them. We compare accuracy of figures, coverage of the requested sections, expert ratings, cost and time. If the multi-agent design is only slightly better at four times the cost, the single agent wins. Often the result is a middle path, one main agent plus a separate reviewer, which captures most of the quality gain at a fraction of the cost.

7Follow-up questions

Is a separate reviewer agent worth it on its own?

Often yes, if it has a different perspective, such as a checklist, the sources to check against, or a different model. A reviewer that is the same model with a similar prompt tends to approve its own kind of mistakes.

How do you debug a wrong figure in a multi-agent report?

Trace every agent call with the run id, and keep the structured hand-offs. Then follow the figure backwards: which section, which finding, which source or code output. Typed hand-offs make this a lookup rather than a search through conversations.

Could the agents run in parallel to save time?

Yes, the research calls for different sections are independent and can run concurrently, for example with virtual threads or reactive calls. That cuts latency, but not cost.

8Conclusion

In this answer, we saw that several agents beat one agent with tools when steps need different instructions, tools or models and separate cleanly, but they bring more calls and latency, lost information and harder debugging. We preferred a deterministic orchestrator in code with structured hand-offs and limits on rounds and cost, and we decided between the designs by evaluating both on the same task set.

What to say in the interviewAbout 80 seconds aloud

Open with

A multi-agent design helps when the steps really need different setups and can be separated cleanly. Research wants search tools and citation rules, the coding step wants a sandbox and maybe a code-strong model, and the reviewer wants instructions to find faults; one agent with all of that has a long conflicting prompt and a big tool list, which hurts tool choice.

Then, if they want more

But I would expect real costs: many more model calls and longer latency, maybe 40 calls instead of 12, information lost between agents when hand-offs are vague, and harder debugging because an error could come from any agent or its input. So if we split, I would not let agents talk freely.

I would write the orchestrator as normal workflow code: call the planner, loop over sections with the research agent, call the coder where numbers are needed, assemble, then call the reviewer, with at most two revision rounds and a cost budget per report. Hand-offs are typed records, like a ReportPlan with audience and exclusions, so context is explicit.

And before committing I would run both designs on the same set of past report requests and compare accuracy, coverage, cost and time. Often one main agent plus a separate reviewer gives most of the benefit.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Spring AI reference
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "A team proposes a multi-agent system with a planner agent, a research agent, a coding...": https://scrivio-interview-library.netlify.app/spring-boot/ai-agents-and-mcp/fc0a0978d0/