This document details three fundamental multi-agent orchestration patterns: Group Chat (democratic collaboration), Hand-off (sequential processing), and Collaborative Filtering (parallel expertise). It explains the implementation, data flow, and key code entities used in the Microsoft Agent Framework (MAF) and AutoGen to facilitate complex collaboration between specialized agents.
For individual agent capabilities, see Tool Use Pattern (#4.1). For task decomposition, see Planning Pattern (#4.3).
Sources: 08-multi-agent/README.md1-28 01-intro-to-ai-agents/README.md102-116
Multi-agent systems (MAS) are superior to monolithic single-agent designs when tasks involve:
Sources: 08-multi-agent/README.md32-50
In a Group Chat, multiple agents communicate in a shared conversation space. A manager or a predefined protocol (like Round Robin) determines the next speaker.
RoundRobinGroupChat or GroupChatManager 02-explore-agentic-frameworks/README.md231-262Sources: 08-multi-agent/README.md83-91 02-explore-agentic-frameworks/README.md231-262
The Hand-off pattern transfers control from one agent to another once specific criteria are met. This is ideal for linear workflows like customer support escalation.
WorkflowBuilder.AddEdge() to chain agents 08-multi-agent/code_samples/workflows-agent-framework/dotNET/02.dotnet-agent-framework-workflow-ghmodel-sequential.cs86-90Sources: 08-multi-agent/README.md93-101 14-microsoft-agent-framework/code-samples/14-handoff.ipynb
This pattern involves multiple agents working concurrently on the same problem from different perspectives, then synthesizing results.
AddFanOutEdge() to broadcast and AddFanInEdge() to aggregate 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.cs58-61Sources: 08-multi-agent/README.md103-115 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.cs58-61
MAF provides a structured WorkflowBuilder to define agent relationships.
Implemented by chaining AddEdge calls. For example, a furniture sales workflow:
SalesAnalysisAgentPriceEstimationAgentQuoteGenerationAgentRequires two specialized executors:
ConcurrentStartExecutor: Uses context.SendMessageAsync() to trigger multiple agents simultaneously 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.cs80-95ConcurrentAggregationExecutor: Collects responses into a list and yields a single aggregated ChatMessage 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.cs110-125Uses predicates to route data dynamically.
Sources: 08-multi-agent/code_samples/workflows-agent-framework/dotNET/02.dotnet-agent-framework-workflow-ghmodel-sequential.cs1-126 08-multi-agent/code_samples/workflows-agent-framework/dotNET/03.dotnet-agent-framework-workflow-ghmodel-concurrent.cs58-127 08-multi-agent/code_samples/workflows-agent-framework/dotNET/04.dotnet-agent-framework-workflow-aifoundry-condition.cs1-291
The refund process demonstrates pattern composition where specialized "Expertise Units" interact.
| Agent | Role | Pattern Usage |
|---|---|---|
CustomerAgent | Initiator | Sequential (Start) |
SellerAgent | Evaluator | Conditional (Approve/Reject) |
ShippingAgent | Logistics | Parallel (with Payment) |
PaymentAgent | Financials | Parallel (with Shipping) |
ComplianceAgent | Oversight | Background Monitor |
This diagram bridges Natural Language concepts to the WorkflowBuilder logic used in the codebase.
Sources: 08-multi-agent/README.md117-145 08-multi-agent/code_samples/workflows-agent-framework/dotNET/04.dotnet-agent-framework-workflow-aifoundry-condition.cs150-180
Tracking interactions is essential for debugging. Observability tools (e.g., Langfuse, Microsoft Foundry) represent agent runs as Traces (complete tasks) and Spans (individual agent steps) 10-ai-agents-production/README.md22-26
In complex multi-agent systems, agents must be instructed when to ask for human intervention (e.g., confirming a high-value refund) 08-multi-agent/README.md63-64 In AutoGen, this is managed by the UserProxyAgent 02-explore-agentic-frameworks/README.md280-285
Sources: 08-multi-agent/README.md65-78 10-ai-agents-production/README.md20-40 06-building-trustworthy-agents/README.md156-182
Refresh this wiki