Chapter 4. Orchestrating Intelligent Agent Teams
“My new smart thermostat is showing a wiring error, and I think it might have overcharged my last bill. Can you check if it’s eligible for a warranty replacement and fix the billing issue?”
This is the kind of query that arrives every day in customer service systems. It’s deceptively simple—just a brief message from a frustrated customer. But look closer, and you’ll see it demands expertise from three entirely different domains: technical diagnostics for the wiring error, warranty policy interpretation for the replacement eligibility, and financial reconciliation for the billing correction.
In Chapter 3, we built a capable customer support agent using the ADK. It handled conversations gracefully, managed state across sessions, processed multimodal inputs, and executed tools reliably. For many single-domain problems, it was exactly the right solution. But throw this multidomain query at it, and you’ll quickly discover the architectural limits of what we call the “monolithic agent” approach.
The Bottleneck of the Monolithic Agent
Let’s examine what happens when you try to handle this query with a single LlmAgent as shown in Example 4-1.
Example 4-1. A monolithic support agent antipattern
# The monolithic agent antipatternmonolithic_support_agent=Agent(model="gemini-2.5-flash",name="UniversalSupportAgent",instruction="""You are a universal customer support agent handling:- Technical troubleshooting for smart home devices ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access