Multi-Agent Systems
Multi-Agent Systems (MAS) distribute tasks among specialized agents with distinct roles, improving modularity, scalability, and performance.
Core Architectures
- Orchestrator/Manager Pattern: A primary agent (the Manager) delegates sub-tasks to specialized worker agents (e.g., Search Agent, Code Interpreter Agent).
- Handoff Pattern: Agents transfer control to another agent better suited for the current task (common in LlamaIndex
AgentWorkflow). - Hierarchical Team: A tree structure where managers coordinate teams of workers.
Benefits
- Focus: Each agent has a narrower scope and fewer tools, reducing token bloat and latency.
- Robustness: Errors in one sub-task can be caught and corrected by the manager without failing the entire request.
- Scalability: Complex tasks (e.g., "Plan a party and generate a map") are broken into manageable chunks.
Implementation Examples
- smolagents: Uses
ManagedAgentto wrap workers. - LlamaIndex: Uses
AgentWorkflowto handle multi-agent loops and handoffs. - openai-symphony: A service spec where the orchestrator manages coding-agent workspaces and issue lifecycle.