4 Architecting and building multi-agent systems
This chapter covers
- Architecting multi-agent systems
- Balancing agents with agentic flows
- Understanding handoffs in agent flows
- Validating agent flows with guardrails
Shortly after single AI agent systems emerged, developers and researchers quickly began adding more agents. The concept was simple: more agents meant more difficult goals could be tackled and solved. They experimented with numerous patterns, from agent armies and armadas to collaborative agent teams and various other architectures. Over time and through practical, real-world use, several key architectures emerged.
In this chapter, we explore the main practical patterns for building multi-agent systems. We will look at why and when we may need to move from single-agent systems to more complex workflows. Then we delve into how agents communicate and transition from one another, and how we can monitor and protect agent-to-agent communication.
4.1 Architecting multi-agent systems
Multi-agent architectures are more powerful than single-agent systems. If not employed effectively, though, multiple agents are often more costly, have increased latency, and are more unpredictable. With due diligence and following best practices, multi-agent architectures become easier to develop and maintain.