Skip to content
Visual explainer 3h to learn 4 steps

One agent or a specialist handoff: a controlled comparison

Compare one agent with one specialist handoff on the same cases and measure the latency and failures the handoff adds.

By Invicly Tech, , in Generative AI, Agentic AI and RAG. About 10 minutes to read.

Topic 23 of 34

In short

A multi-agent design splits work between agents, for example a general agent that hands policy questions to a specialist. Each handoff adds a model call, more state to pass and new ways to fail. A controlled comparison runs one agent and the handoff design on the same cases with the same model, tools and budgets, and keeps the handoff only if it measurably helps.

Think of it like this: Transferring a phone call to a specialist can help, but every transfer adds hold time and a chance the caller has to repeat everything.

Explained simply

A multi-agent system splits a job between several agents. A common shape is a triage agent that reads the question and passes it, a handoff, to a specialist agent with a narrower prompt and fewer tools. It sounds tidy, like a team of experts.

But every handoff has a cost. The specialist needs its own model call, so the answer takes longer and costs more. The two agents must share the right information, and anything left out of the handoff is lost. And there are new ways to fail: a wrong handoff, a handoff loop, or a specialist that runs past the deadline.

So the honest question is not "is multi-agent better?" but "does this one handoff improve results on our cases enough to pay for itself?" You answer it with a controlled comparison: run one agent and the handoff design on the same questions, with the same model, tools and limits.

If the handoff design wins clearly on some question type, keep it for that type. If results are about the same, keep the single agent. It is easier to test, debug and run.

Press Play on a diagram to walk through it one step at a time.

CompareOne agent versus one specialist handoff
Single agent
  • One loop, one prompt, all allowed tools
  • One budget and one stop condition
  • Fewer model calls
  • Easier to trace and test
Agent plus specialist
  • Triage agent hands off to a specialist
  • Handoff state must be passed explicitly
  • Each agent needs its own stop conditions
  • Extra call adds latency and failure points
SequenceA handoff and the state it carries
API
Triage agent
Policy specialist
Retrieval
  1. 1Question, caller scopes, deadline
    API to Triage agent: Question, caller scopes, deadline
  2. 2Handoff: question, scopes, remaining budget
    Triage agent to Policy specialist: Handoff: question, scopes, remaining budget
  3. 3Search in caller scope
    Policy specialist to Retrieval: Search in caller scope
  4. 4Evidence with IDs
    Retrieval to Policy specialist: Evidence with IDs
  5. 5Answer or abstain, calls used
    Policy specialist to Triage agent: Answer or abstain, calls used
  6. 6Final response
    Triage agent to API: Final response
MapWhat to measure in the comparison
Per-case results
  • Quality
    • Final status correct
    • Answer correct
    • Citations supported
  • Cost
    • Model calls
    • Tool calls
    • Tokens
  • Time
    • Total p50 and p95
    • Time in handoff
  • Handoff failures
    • Wrong handoff
    • Missed handoff
    • Invalid handoff state
    • Loop blocked

In depth

Defining the handoff state

The handoff state is everything the specialist needs to continue, written as a typed model. For the knowledge assistant that is the request ID, the original question, the caller's verified scopes, the reason for the handoff, any evidence IDs gathered so far, and the remaining budget: calls left, tokens left and the absolute deadline.

Keep it explicit and small. Do not pass the triage agent's full prompt or conversation, because the specialist may then follow instructions meant for the triage step, and you leak more context than needed. Scopes come from the original request object, never from the triage agent's text, so a handoff can never widen access. Validate the handoff object like any other model output before the specialist starts.

  • request_id, question, caller scopes
  • handoff reason from a fixed list
  • evidence IDs gathered so far
  • calls left, tokens left, absolute deadline

Stop conditions for each agent

Each agent needs its own stop conditions, but the budget must be shared. If the triage agent has a limit of six tool calls and the specialist also gets six, a run can use twelve, which breaks the limit you promised. Instead, subtract what triage used and pass the rest. Use one absolute deadline for the whole request.

Add two handoff-specific rules. First, cap handoffs per run, usually at one for this comparison. Second, forbid handing back to the agent that just handed off, which stops ping-pong loops. Each agent must end with one of the same final statuses as the single agent: answered, clarify, abstained or escalated. That keeps the two designs comparable.

FlowOne shared budget across two agents
  1. 1
    Request budget

    6 calls, 20 s deadline

  2. 2
    Triage uses 1

    Decides to hand off

  3. 3
    Handoff passes 5

    Same absolute deadline

  4. 4
    Specialist uses up to 5

    No further handoff allowed

  5. 5
    Final status

    Answered, clarify, abstained or escalated

Running a controlled comparison

Change only the architecture. Use the same fixture cases, corpus snapshot, model stub or pinned model version, temperature, thresholds, tool set and budgets. Run each case several times if a live model is used, since output can vary; with the deterministic stub one run is enough.

Record per case: final status, correctness, citation support, model calls, tool calls, total time and the time spent in the handoff itself. Tag each run with the design name so results can be grouped. Look at the cases where the designs disagree; they tell you more than the averages. A specialist that only wins on questions the single agent already got right is not adding value.

  • Same cases, corpus, model, thresholds and budgets
  • Record status, correctness, calls and time per case
  • Tag runs with the design name
  • Study the cases where the two designs disagree

Finding added latency and new failures

Latency from a handoff shows up in three places: the triage call itself, the handoff validation and the specialist's start-up, such as loading a different prompt. Trace each as its own span so you can see them. Compare p50 and p95 total time across designs; the p95 often grows more, because slow cases now include two agents.

New failure types to count: wrong handoff (sent to the specialist when it should not have been), missed handoff, handoff validation failure, loop attempts blocked by the rule, and deadline exceeded inside the specialist. If these add more failures than the specialist fixes, the single agent wins.

  • Separate spans for triage, handoff and specialist
  • Compare p50 and p95, not just the mean
  • Count wrong, missed and invalid handoffs
  • Count deadline failures inside the specialist

Learn it in 4 short steps

About 45m each. Track them with a timer in your plan.

  1. 1
    Define handoff state~45m
  2. 2
    Set stop conditions for each agent~45m
  3. 3
    Run both designs on the same cases~45m
  4. 4
    Measure added latency and failures~45m

Key points

  • Start with one agent; add a handoff only when a measured weakness justifies it.
  • Handoff state is a typed object: question, caller scopes, evidence so far and remaining budget.
  • Budgets are shared across agents, so a handoff cannot reset the call or time limit.
  • Run both designs on identical cases with the same model stub, tools and limits.
  • Measure added latency, extra calls and new failure types, not just the final score.

Key terms

Tap a card to flip it. 0/5 known

Examples

Policy specialist comparison on 20 cases

Illustrative figures from a stub run. The single agent answers 15 of 20 cases correctly with a mean of 3.1 calls. The triage-plus-policy-specialist design answers 16 correctly with a mean of 4.2 calls, and its p95 time rises from 2.4 s to 3.6 s. Looking at disagreements: the specialist fixed two policy questions, but triage wrongly handed off one billing question that the single agent had right. Net gain: one case for about 35 percent more calls. The team keeps the single agent and instead improves its prompt for policy questions, then reruns the comparison.

A typed handoff object with a shared budget

The handoff is a Pydantic model. Scopes are copied from the verified request, and the remaining budget is computed, not chosen by the model.

python
from typing import Literal
from pydantic import BaseModel

class Handoff(BaseModel):
    request_id: str
    question: str
    scopes: frozenset[str]
    reason: Literal['policy_question', 'ticket_question']
    evidence_ids: list[str] = []
    calls_left: int
    deadline_ts: float

def make_handoff(req, reason: str, used_calls: int, evidence: list[str]) -> Handoff:
    return Handoff(request_id=req.id, question=req.question, scopes=req.scopes,
                   reason=reason, evidence_ids=evidence,
                   calls_left=req.max_calls - used_calls, deadline_ts=req.deadline_ts)

Quick reference

  • Default to one agent; add a handoff only for a measured weakness
  • Handoff state: request_id, question, scopes, reason, evidence IDs, budget left
  • Scopes in a handoff come from the verified request, never from agent text
  • One shared budget and one absolute deadline across all agents
  • Cap handoffs per run (often 1) and forbid handing straight back
  • Change only the architecture between runs; compare p50 and p95
  • Count wrong, missed and invalid handoffs as new failure types

Common mistakes

  • Giving each agent its own fresh budget, so the total run can exceed every limit.
  • Passing the whole conversation instead of a typed handoff object, leaking context.
  • Comparing designs on different questions or model settings.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1The triage agent used 2 of a 6-call budget before handing off. How many calls may the specialist make?

Question 2

2Where should the scopes in the handoff object come from?

Question 3

3Which change would break a controlled comparison?

Question 4

4The handoff design gains one correct answer but adds 35 percent more calls and a new wrong-handoff failure. What is a reasonable decision?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    List the fields your handoff object needs for the knowledge assistant and mark which ones come from trusted code and which from the triage agent.

  2. Exercise 2medium

    Write a guard can_hand_off(run) that allows at most one handoff per run, blocks handing back to the previous agent, and blocks the handoff if fewer than 2 calls or 3 seconds remain.

  3. Exercise 3hard

    Run both designs on your 20-case fixture set with the model stub and produce a comparison table: correct count, mean calls, p50 and p95 time, and counts of each handoff failure type. Write a one-paragraph decision.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

When is multi-agent actually worth it?
When subtasks need very different tools, permissions or prompts, or can run in parallel, and your comparison shows a clear gain. For a single knowledge assistant, one well-designed agent is often enough.
Is a handoff the same as calling a tool?
They are similar. A handoff passes control of the conversation to another agent; a tool returns a result to the same agent. Treating a specialist as a tool the main agent calls is a common, simpler alternative.
Do frameworks change this comparison?
No. Frameworks such as Google ADK or the OpenAI Agents SDK offer handoff features, but the costs are the same: more calls, more state and more failure modes. Measure before adopting one.

Go deeper

ShareXLinkedInWhatsApp