(Click the image above to view video of this lesson)
As soon as you start to wok on project wey get multiple agents, you go need to reason about multi-agent design pattern. But e no too clear immediately when to switch to multi-agents and wetin advantages dem be.
For dis lesson, we wan answer di questions dem:
After dis lesson, you suppose fit:
Wetin be di bigger picture?
Multi agents na design pattern wey allow different agents to work together to achieve one target.
Di pattern dey widely used for many areas like robotics, autonomous systems, and distributed computing.
Wetin be good scenarios to use multi-agents? Di answer be say many situations get advantage when you use plenty agents, especially for these cases:
Single agent fit run simple tasks well, but for complex task, multiple agents get many advantages:
Make we use example: we wan book trip for one user. Single agent system go handle everything like finding flights, booking hotel and rental cars. To fit do all these, agent go need many tools, e fit make system complex and hard to maintain. But multi-agent system fit get one agent for flights, one for hotels, one for rental cars. That one go make system modular, easy to maintain, and fit scale.
Compare am to travel bureau wey be mom-and-pop shop vs travel bureau wey be franchise. Mom-and-pop get one agent wey dey handle everything. Franchise get different agents to handle different parts of trip booking.
Before you fit implement multi-agent design pattern, you need sabi di building blocks wey dey inside.
Make we use example again: booking trip for user. Di building blocks include:
E important make you fit see how different agents dey interact. This visibility dey help to debug, optimize and make system effective. To do dis, you need tools and technique to track agent activities. This fit be logging, monitoring, visualization tools, and performance metrics.
Example, for booking trip for user, you fit get dashboard wey show status of each agent, user preferences, constraints, and how agents dey interact. Dashboard fit show travel dates, flights flight agent recommend, hotels hotel agent recommend, rental cars rental car agent recommend. This one go clear how agents dey work together and if dem meet user needs.
Make we look each aspect in detail.
Logging and Monitoring Tools: You want keep log for each action agent take. Log go show which agent do am, action, time and outcome. Dis info fit use for debugging, optimization and more.
Visualization Tools: Visualization tools fit help you see how agents dey interact in better way. Like graph wey show info flow between agents. E fit help you find bottlenecks, inefficiencies and other system wahala.
Performance Metrics: Performance metrics fit help you track how effective multi-agent system be. Like time to complete task, number of tasks per time, accuracy of agents recommendation. Dis fit help improve and optimize system.
Make we enter some clear patterns wey fit use to create multi-agent apps. Here be some wey good to consider:
Dis pattern useful if you wan build group chat app where many agents fit talk to each other. Common use cases include team work, customer support, and social networking.
For dis pattern, every agent represent one user for group chat and dem dey send messages to each other using messaging protocol. Agents fit send messages to group, receive messages from group, and reply to messages from other agents.
Dis pattern fit implement by centralized architecture where all messages go through central server, or decentralized wen messages dey exchange directly.

Dis pattern dey useful if you want build app where many agents fit hand over tasks to each other.
Common use cases na customer support, task management, and workflow automation.
For dis pattern, each agent represent one task or step for workflow, and agents fit hand off tasks to oda agents based on rules wey dem don set before.

Dis pattern dey useful if you wan create app where multiple agents fit work together to give recommendations to users.
Reason why you go want multiple agents collaborate na because each agent fit get different expertise and fit contribute for recommendation process different ways.
Example be say user want recommendation on best stock to buy for stock market.

Imagine say customer dey try get refund for product, many agents fit dey involved but make we split am between agents wey specific for refund process and agents wey general for other business parts.
Agents wey specific for refund process:
These agents fit dey involved for refund:
General agents:
These agents fit work for other business parts too.
Many agents dem list for refund process and some general agents for other business parts. Hope dis one help you know how to decide which agents to use for your multi-agent system.
Design multi-agent system for customer support process. Identify agents wey involved, their roles and responsibilities, and how dem dey interact. Consider both agents specific for customer support and general agents wey fit work for other business parts.
Make you reason small before you read dis solution, you fit need more agents pass wetin you dey think.
TIP: Reason about di different stages for customer support process and also think about agents wey you go need for any system.
Which kain scenario be di best fit for multi-agent system?
When one single agent usually better choice?
For dis lesson, we don look di multi-agent design pattern, including di scenarios wey multi-agents dey apply, di advantages of to use multi-agents over one single agent, di building blocks to implement di multi-agent design pattern, plus how to fit see how di multiple agents dey interact with each other.
Join di Microsoft Foundry Discord to meet other learners, attend office hours and get your AI Agents questions answered.
Disclaimer: Dis document don translate wit AI translation service Co-op Translator. Even tho we dey try make am correct, abeg make you know say automated translation fit get errors or mistakes. Di original document for dia own language na im be di correct source. For important info, make person wey sabi human translation do am. We no go responsible for any misunderstanding or wrong understanding wey fit happen because of dis translation.