ai-agents-for-beginners

Multi-Agent Design

(Klik di pikcha wey dey up so to watch video of dis lesson)

Multi-agent design patterns

As you start work for project wey get plenti agents, you go need to think about di multi-agent design pattern. But e fit no be clear sharp sharp when you go switch to multi-agents and wetin be di better tins.

Introduction

For dis lesson, we dey try answer di beta questions dem:

Learning Goals

After dis lesson, you go fit:

Wetin be di big picture?

Multi agents na design pattern wey make plenti agents fit work together to reach one common goal.

Dis pattern di popular for different tins like robotics, autonomous systems, and distributed computing.

Scenarios Where Multi-Agents Are Applicable

So, wetin be di kain situations wey good to use multi-agents? Di answer be say plenti tins fit benefit from many agents especially for dis kain situations:

Advantages of Using Multi-Agents Over a Singular Agent

One agent fit do simple tasks well, but for tori wey complex, multiple agents fit give tins wey better:

Make we take example, make we book trip for person. One agent go need handle every part of booking trip, from finding flight to booking hotel and car rental. Make one agent do all dis, e go get tools to handle all dis tin. E go make system complex and hard to maintain or add more things. Multi-agent system fit get agents wey dey specialize for flight finding, hotel booking, and car rental. E go make system modular, easy to maintain, and scalable.

Compare am to travel agency wey be mom-and-pop store versus franchise. Mom-and-pop store go get one agent wey dey handle all trip booking, but franchise go get different agents wey dey handle different parts of di trip.

Building Blocks of Implementing the Multi-Agent Design Pattern

Before you fit run multi-agent design pattern, you need sabi the building blocks wey dey make di pattern.

Make we use example of booking trip for person. Di building blocks fit include:

Visibility into Multi-Agent Interactions

E important to get way to see how agents dey interact. Dis visibility na key to debug, optimize, and make sure system dey work well. You need tools to follow agent activities and interactions. E fit be logging, monitoring, visualization, or performance metrics.

For example, to book trip for person, you fit get dashboard wey show status of every agent, user preferences and limits, and how agents dey talk to each other. Dashboard fit show travel dates, flights wey flight agent recommend, hotels wey hotel agent recommend, and rental cars wey car agent recommend. E go give you clear view how agents dey interact and if preferences and limits dey met.

Make we check these tins more.

Multi-Agent Patterns

Make we check some specific patterns for multi-agent apps. Here dey some wey dey interesting:

Group chat

Dis pattern good if you want create group chat app make many agents fit yarn with each other. Di common use na team work, customer support, and social network.

For dis pattern, every agent dey represent one user for group chat, and messages dey pass between agents using messaging protocol. Agents fit send messages to group, receive messages, and reply other agents messages.

Dis pattern fit use centralized system where all messages pass one server, or decentralized system where messages pass direct.

Group chat

Hand-off

Dis pattern good if you want app wey many agents fit hand off task to one another.

Common uses na customer support, task management, and workflow automation.

For dis pattern, every agent represent one task or workflow step, and agents fit hand over tasks based on rules wey dem set before.

Hand off

Collaborative filtering

Dis pattern good if you want app wey many agents fit work together to make recommendation to users.

Why you want many agents collaborate na because every agent get different skill and fit help for recommendation the way different.

Make we look example where user want recommendation for best stock to buy for stock market.

Recommendation

Scenario: Refund process

Imagine one situation where customer dey try get refund for product, e get plenti agents wey fit dey involved but make we split am to agents wey true true dey for refund process and general agents wey fit work for other business parts too.

Agents wey true true dey for refund process:

Here be some agents wey fit dey for refund:

General agents:

These agents fit use for other business parts too.

You see say e get plenti agents for refund and general agents for other business parts. Hope dis fit help you decide how to choose agents for your multi-agent system.

Assignment

Design multi-agent system for customer support process. Identify agents wey dey involved, diir roles and responsibilites, and how dem dey work with one another. Think about agents wey dey specific for customer support and general agents wey fit work for other business parts.

Make you reason well before you read di solution wey dey below, you fit need more agents pass wetin you dey think.

TIP: Reason di different stages for customer support process and also think about agents wey system go need.

Solution

Solution

Knowledge checks

Question: When you suppose think about to use multi-agents?

Solution quiz

Summary

For dis lesson, we don check multi-agent design pattern, including di cases wey multi-agents fit work, di advantages wey multi-agents get pass single agent, di building blocks to fit implement di multi-agent design pattern, and how to fit see how di different agents dey interact with each other.

You Dey Get More Questions About Di Multi-Agent Design Pattern?

Join di Microsoft Foundry Discord to meet other learners, attend office hours and get your AI Agents questions answer.

Additional resources

Previous Lesson

Planning Design

Next Lesson

Metacognition in AI Agents


Disclaimer: Dis document na wetin AI translation service Co-op Translator translate. Even though we try make e correct, abeg sabi say automatic translation fit get some mistakes or errors. Di original document for dia own language remain di main correct source. If na for important mata, make you use professional human translation. We no go take responsibility for any confusion or wrong meaning wey fit come from dis translation.