Get startedGet started for free

From one to many: Building multi-agent systems

1. From one to many: Building multi-agent systems

We’ve made our single agent quite sophisticated with tools and guardrails. But in complex scenarios, we might not want one agent to do everything.

2. Beyond a single agent

Instead, we can design multiple agents that collaborate, each handling a specific set of tasks,

3. Beyond a single agent

under the guidance of a coordinator. This multi-agent approach mirrors how a real team works – different specialists tackling different problems, overseen by a manager who directs questions to the right person.

4. Roles in the team

Let’s say we want to build a more robust customer support assistant by dividing its responsibilities. We could set it up like this: A Greeting Agent that handles just the welcomes and greetings. If a user says "Hi," this agent responds cheerfully and politely.

5. Roles in the team

An Account Agent that deals with account-related questions, like “I can’t log in” or “How do I reset my password?”.

6. Roles in the team

An FAQ Agent dedicated to answering general FAQs using an internal knowledge base.

7. Roles in the team

And finally, a Root Agent: the coordinator agent that the user actually interacts with, and that receives the user’s query and decides which of the other agents should handle it.

8. Roles in the team

If the query is a greeting, it delegates to the Greeting Agent.

9. Roles in the team

If it’s about an account issue, it delegates it to the Account Agent.

10. Roles in the team

If its content matches any of the FAQs that are found in the knowledge base, it delegates to the FAQ agent.

11. Roles in the team

Otherwise, the root agent can handle it itself.

12. One assistant powered by a team of agents

This kind of delegation is a core concept in multi-agent systems. From the user’s perspective, there’s still just one assistant: we ask a question and get an answer.

13. One assistant powered by a team of agents

But behind the scenes, that “one” assistant is actually a team of sub-agents working together. The Root Agent interprets the user’s input, figures out who on the team is best suited to respond, and then either forwards the question to that specialist agent or handles it on its own if appropriate. This way, instead of one large model handling everything (which might require a very complex prompt), we have multiple smaller ones doing their parts and a coordinator to manage them.

14. Let's practice!

In the next video, we’ll build a multi-agent system by defining sub-agents and a coordinating root agent in the ADK. By the end, our support bot will have evolved into a team of agents working together, all while appearing as a single assistant to the end user.

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.