MULTIAGENT SYSTEMS
MULTIAGENT SYSTEMS AND MCP
ML SYSTEMS
MULTIAGENT SYSTEMS
INTRODUCTION
USE CASES, FRAMEWORKS
MULTIAGENT SYSTEMS
USE CASES
•Customer Service Automated chatbots handling initial
customer inquiries
•Virtual assistants providing 24/7 support
•AI agents resolving common issues without human intervention
•Personal Productivity Digital assistants managing calendars and
scheduling
•Email sorting and prioritization agents
•Task management systems with intelligent recommendations
•Healthcare Diagnostic support agents analyzing patient
symptoms
•Medication management assistants for patients
•Administrative agents handling appointment scheduling and
records
•Financial Services Robo-advisors managing investment
portfolios
•Fraud detection agents monitoring transactions
•Insurance claim processing automation
•Sales and Marketing Lead qualification and scoring agents
•Personalized product recommendation engines
•Marketing automation tools optimizing campaigns
•Manufacturing and Supply Chain Predictive maintenance
agents monitoring equipment
•Inventory optimization systems
•Quality control agents detecting defects
•EducationTutoring agents providing personalized learning
•Grading assistants evaluating assignments
•Course recommendation agents suggesting appropriate classes
•Home Automation Smart home assistants controlling devices
and systems
•Security monitoring agents detecting unusual activity
•Energy optimization agents managing consumption
MULTIAGENT SYSTEMS
FRAMEWORKS
Framework Language Description Best For
LangGraph Python, Javascript
A graph-based framework built on top of
LangChain, designed to coordinate
multiple agents and tools with memory.
Structured agent workflows with LLMs.
CrewAI Python
Simple and intuitive agent orchestration
framework for teams of LLM agents. Uses
a “Crew” and “Agent” model with roles
and goals.
Task-oriented multi-agent collaboration.
AutoGen Python
Microsoft’s framework for building LLM-
powered agents that communicate via
messaging. Supports human-AI and AI-AI
collaboration.
Multi-agent chat and complex
interactions.
AgentVerse Python
Designed for simulating and evaluating
large numbers of agents. Ideal for
research on collective behaviors.
Multi-agent simulations and social
dynamics.
OpenAgents Python
Open-source project combining
LangChain, FastAPI, and other tools.
Allows UI integration and multi-agent task
execution.
Developer-friendly agent apps.
MiniAGI Python
Lightweight framework for building LLM-
based agents using memory, tools, and
recursive reasoning.
Quick experimentation with agents.
MetaGPT Python
Treats AI agents like team members in a
software company (e.g., PM, engineer,
QA). Modular and production-oriented.
Building software with agent teams.
MULTIAGENT SYSTEMS
AGENT
Source: https://lilianweng.github.io/posts/2023-06-23-agent/
MULTIAGENT SYSTEMS
AGENTS &WORKFLOWS
Source: https://langchain-ai.github.io/langgraph/tutorials/workflows/
MULTIAGENT SYSTEMS
AGENT PATTERNS
NETWORK STRUCTURED, SUPERVISOR BASED, HIERARCHICAL
MULTIAGENT SYSTEMS
REFLECTION PATTERN
• Encourages introspection and self-evaluation.
• Useful for complex or multi-step tasks.
• Helps identify errors and improve reasoning.
• Often implemented via checkpoints or "thought loops".
• Can be combined with memory modules for deeper reasoning.
The Reflection Pattern enables an AI agent to pause and
evaluate its current progress, strategy, and understanding. It
often involves meta-cognition—thinking about what has been
done and what needs to be adjusted to reach a goal more
efficiently.
MULTIAGENT SYSTEMS
TOOL USE PATTERN
 Agent invokes tools like search engines, calculators, or
code interpreters.
 Enables solving tasks beyond language-only capabilities.
 Often implemented in frameworks like LangChain or
ReAct.
 Requires mechanisms for selecting and invoking tools
dynamically.
 Important for real-world applications like retrieval-
augmented generation (RAG).
The Tool Use Pattern allows agents to call upon external APIs,
databases, calculators, or plugins to extend their capabilities
beyond native reasoning.This empowers agents to handle a
wider range of tasks effectively.
MULTIAGENT SYSTEMS
PLANNING PATTERN
 Agent outlines goals and subgoals in advance.
 Reduces trial-and-error and improves efficiency.
 Useful for code generation, reasoning, and long documents.
 Often uses a planner-executor model.
 Enhances transparency and traceability in agent behavior.
The Planning Pattern involves creating a step-by-step plan
before executing actions.This structure ensures logical task
progression, especially for multi-step or high-stakes tasks
requiring accuracy.
MULTIAGENT SYSTEMS
MULTI-AGENT PATTERN
• Supports parallelism and specialization.
• Agents can be role-based (e.g., writer, reviewer, executor).
• Encourages emergent behavior and coordination.
• Ideal for complex tasks like research, code review, or game playing.
• Can integrate with human feedback or supervisor agents.
The Multi-Agent Pattern distributes a task across
multiple specialized agents, each responsible for a
specific role.These agents can collaborate, compete,
or coordinate, enabling more scalable and modular
solutions.
MULTIAGENT SYSTEMS
PATTERNS
Pattern Strengths Best For
Reflection
Improves self-awareness and
adaptability
Debugging, strategy adjustment
Tool Use Extends capabilities via external tools Math, retrieval, real-world tasks
Planning Provides structure and foresight Multi-step reasoning, code generation
Multi-Agent Enables collaboration and modularity
Complex, distributed task
environments
Each pattern offers unique strengths for building intelligent
systems. Depending on task complexity, environment, and goals,
one or more patterns can be combined for optimal
performance.
MULTIAGENT SYSTEMS
REACT: LISTING 1
from langchain.chat_models import ChatOpenAI
from langchain.schema import HumanMessage, AIMessage, SystemMessage
from langchain.tools import tool
import re
# Define tools
@tool
def get_age(name: str) -> str:
if name.strip().lower() == "will smith":
return "55"
return "Unknown"
@tool
def multiply_by_3(num_str: str) -> str:
try:
return str(int(num_str) * 3)
except:
return "Invalid number."
tools = {
"get_age": get_age,
"multiply_by_3": multiply_by_3
}
# System prompt defining the ReAct format
system_prompt = """
You are a reasoning agent. You must think
step by step and use tools when necessary.
Use this format:
Thought: ...
Action: tool_name[input]
Observation: ...
When you are ready, provide:
Final Answer: <your answer>
Tools available: get_age, multiply_by_3
"""
MULTIAGENT SYSTEMS
REACT: LISTING2
# ReAct loop
for _ in range(5): # max 5 steps
# Model response
response = llm(messages)
content = response.content
print("[MODEL OUTPUT]n", content)
# Check for Final Answer
if "Final Answer:" in content:
break
# Parse action
match = re.search(r"Action: (w+)[(.*)]", content)
if not match:
print("No action detected.")
break
tool_name, tool_input = match.groups()
tool_input = tool_input.strip()
# Run tool
if tool_name in tools:
result = tools[tool_name].run(tool_input)
else:
result = f"Unknown tool: {tool_name}"
# Append result to history
messages.append(AIMessage(content=content))
messages.append(HumanMessage(content=f"Observation: {result}"))
[MODEL OUTPUT]
Thought: I need to find out Will Smith's age.
Action: get_age[Will Smith]
Observation: 55
[MODEL OUTPUT]
Thought: Now I will multiply his age by 3.
Action: multiply_by_3[55]
Observation: 165
[MODEL OUTPUT]
Final Answer: Will Smith is 55 and his age multiplied
by 3 is 165.
MULTIAGENT SYSTEMS
MULTIAGENT SCENARIOS
NETWORK STRUCTURED, SUPERVISOR BASED, HIERARCHICAL
MULTIAGENT SYSTEMS
A NETWORK STRUCTURED MULTI-AGENT SYSTEM
Overview:
A hierarchical design where a central Supervisor Agent
oversees and coordinates a team of specialized Sub-Agents to
efficiently complete complex tasks.
Supervisor Agent
•Serves as the system's coordinator.
•Assigns tasks to the right sub-agent based on expertise.
•Manages the overall process and ensures tasks are completed in
an organized flow.
Sub-Agents
•Experts in specific domains (e.g., data processing, coding, writing).
•Focus solely on executing their assigned tasks.
•Operate independently without handling task delegation or
workflow decisions.
This structure enhances scalability, clarity, and efficiency in multi-
agent workflows.
MULTIAGENT SYSTEMS
SUPERVISOR AGENT
Collaborative, Decentralized Multi-Agent Design
The Network of Agents architecture enables multiple intelligent agents
to work independently yet collaboratively. Each agent is equipped with
its own tools and responsibilities, dynamically routing tasks among
themselves to solve complex problems. While offering flexibility and
parallelism, this design also introduces significant coordination and
reliability challenges.
Each agent has its own tools and task focus.
Tasks are dynamically routed to the most capable
agent. Agents collaborate by exchanging results,
forming a loosely connected system.
✅ Advantages
•Decentralized decision-making: No central bottleneck.
•Flexible and modular: Easy to add/remove agents or tools.
•Parallel execution:Agents can process tasks simultaneously.
⚠️Limitations
•Unpredictable task routing: Can cause inefficiency and delays.
•High operational cost: Frequent inter-agent LLM calls.
•Debugging complexity: Hard to trace errors in decentralized flows.
•Coordination overhead: Requires complex protocols for consistency.
MULTIAGENT SYSTEMS
HIERARCHICAL STRUCTURE
Scalable Multi-Agent CoordinationThrough Layered Control
The Hierarchical Supervisor System extends the supervisor-agent model
by introducing multiple layers of control.A top-level supervisor
delegates high-level tasks to mid-level supervisors, each managing a group
of specialized sub-agents.This structured delegation enables scalability,
task specialization, and efficient error tracking, making it ideal for
large-scale, complex systems.
•Layered Supervision:
Top-down task delegation across multiple supervisor layers.
•Specialized Sub-Agents:
Each sub-agent executes specific tasks without routing responsibility.
•Scalable & Modular:
Supports large systems by distributing control.
•Efficient Debugging:
Isolates errors to specific layers or agents.
MULTIAGENT SYSTEMS
MCP (MODEL CONTEXT PROTOCOL)
INTRO, ARCHITECTURE, BASIC IMPLEMENTATION, BENEFITS AND FUTURE, A2A
MULTIAGENT SYSTEMS
INTRODUCTIONTO MODEL CONTEXT PROTOCOL (MCP)
•MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools
that want to access data through MCP
•MCP Clients: Protocol clients that maintain 1:1 connections
with servers
•MCP Servers: Lightweight programs that each expose
specific capabilities through the standardized Model Context
Protocol
•Local Data Sources: Your computer’s files, databases, and
services that MCP servers can securely access
•Remote Services: External systems available over the
internet (e.g., through APIs) that MCP servers can connect to
SOURCE https://modelcontextprotocol.io/introduction
•Definition: MCP is an open standard introduced
by Anthropic on November 25, 2024, aiming to
unify communication between large language
models (LLMs) and external data sources and
tools.
•Purpose:
• Standardizes interactions between LLMs
and external tools.
• Addresses limitations of traditional
function calling methods.
• Enhances scalability and maintainability in
AI ecosystems.
•Analogy: MCP serves as a "USB-C port" for AI
agents, providing a universal interface for diverse
components.
MULTIAGENT SYSTEMS
MCP ARCHITECTURE
•MCP Server: Operates independently, managing tools and
resources.
•LLM Client: Connects to the MCP server to access tools.
Features:
•Decoupling: Separates tool management from the agent,
enhancing modularity.
•Reusability:Tools can be reused across different agents
and systems.
•Scalability: Facilitates the addition of new tools without
modifying the core agent.
Communication Protocols:
•Utilizes JSON-RPC 2.0 over standard I/O or Server-Sent
Events (SSE) for communication.
SOURCE https://modelcontextprotocol.io/introduction
MULTIAGENT SYSTEMS
IMPLEMENTINGTOOLSWITH MCP (SERVER SIDE)
# server.py
from mcp.server.fastmcp import FastMCP
# Initialize the MCP server
mcp = FastMCP("Demo Server")
# Define a tool to add two numbers
@mcp.tool()
def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b
# Define a resource to greet a user
@mcp.resource("greeting://{name}")
def greet(name: str) -> str:
"""Return a personalized greeting."""
return f"Hello, {name}!"
# Run the server
if __name__ == "__main__":
mcp.run()
• FastMCP: Initializes the MCP server with
the name "Demo Server".
• @mcp.tool(): Decorator to define a tool
that performs an action—in this case,
adding two numbers.
• @mcp.resource(): Decorator to define a
resource that provides data—in this case, a
personalized greeting.
• mcp.run(): Starts the server, ready to
handle MCP requests.
MULTIAGENT SYSTEMS
IMPLEMENTINGTOOLSWITH MCP (CLIENT SIDE)
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def main():
# Define server parameters
server_params = StdioServerParameters(
command="python",
args=["server.py"])
# Create a client session
async with ClientSession(
client=stdio_client(server_params)
) as session:
# Call the 'add' tool
result = await session.call_tool("add", {"a": 5, "b": 3})
print(f"Addition Result: {result}")
# Fetch the 'greet' resource
greeting = await session.get_resource("greeting://Alice")
print(f"Greeting: {greeting}")
# Run the client
if __name__ == "__main__":
asyncio.run(main())
• StdioServerParameters: Specifies
how to start the server process.
• ClientSession: Manages the client-side
session with the server.
• session.call_tool(): Invokes the 'add'
tool on the server.
• session.get_resource(): Retrieves the
'greet' resource from the server.
MULTIAGENT SYSTEMS
MANIFEST
"resources": [{
"uri_template": "greeting://{name}",
"description": "Return a personalized greeting.",
"parameters": {
"type": "object",
"properties": {
"name": { "type": "string" }
},
"required": ["name"]
},
"returns": {
"type": "string"
}
}]
}
{
"name": "Demo Server",
"version": "0.1.0",
"tools":
[
{
"name": "add",
"description": "Add two numbers.",
"parameters": {
"type": "object",
"properties": {
"a": { "type": "integer" },
"b": { "type": "integer" }
},
"required": ["a", "b"]
},
"returns": {
"type": "integer"
}
}
],
Field Description
name The name of the MCP server.
version API version of the server capabilities.
tools
List of callable functions (e.g., add)
with expected input/output types.
resources
List of accessible data endpoints via
URI (e.g., greeting://{name}).
parameters
JSON Schema describing input
structure.
returns
JSON Schema describing output
structure.
Machine-readable: Clients can auto-discover and validate
what functions/resources are available.
Interoperable: Useful for language models and tools that use
MCP as a plugin protocol.
Declarative:Acts like an OpenAPI spec for MCP services.
MULTIAGENT SYSTEMS
BENEFITS AND FUTURE OF MCP
Advantages:
•Standardization: Provides a unified protocol for
tool integration.
•Flexibility: Easily integrates with various tools and
services.
•Efficiency: Reduces redundancy by allowing tool
reuse.
Future Prospects:
•Potential to become a foundational standard in AI
agent ecosystems.
•Facilitates the development of more complex and
collaborative AI systems.
•Encourages broader adoption of standardized
protocols in AI development.
MULTIAGENT SYSTEMS
AGENT2AGENT
Collaborative AI Communication Framework
Agent2Agent is a framework developed
by Google to enable autonomous AI
agents to communicate and collaborate
effectively. Designed to simulate human-
like interactions, it supports multi-agent
coordination, negotiation, and task-solving
through natural language.The framework
is a step toward more interactive,
dynamic, and scalable AI ecosystems
where agents can learn, reason, and work
together with minimal human input.
MULTIAGENT SYSTEMS
RESOURCES
AI Agents in Action
Michael Lanham
Links
• https://modelcontextprotocol.io/introduction
• https://www.anthropic.com/news/model-context-protocol
• https://langchain-ai.github.io/langgraph/agents/agents/
https://cdn.openai.com/business-guides-
and-resources/a-practical-guide-to-
building-agents.pdf
Building Agentic AI Systems:
Create intelligent,
autonomous AI agents
Anjanava Biswas, Wrick
Talukdar
ChatDev: Communicative Agents for
Software Development
Chen Qian, Wei Liu, Hongzhang Liu,
Nuo Chen, Yufan Dang, Jiahao Li,
Cheng Yang, Weize Chen, Yusheng Su,
Xin Cong, Juyuan Xu, Dahai Li, Zhiyuan Liu,
Maosong Sun
https://weaviate.io/ebooks/agentic-architectures?
utm_source=channels&utm_medium=vs_social&utm_camp
aign=agents&utm_content=honeypot_post_680114896

Multi-Agent AI Systems: Architectures & Communication (MCP and A2A)

  • 1.
  • 2.
  • 3.
    MULTIAGENT SYSTEMS USE CASES •CustomerService Automated chatbots handling initial customer inquiries •Virtual assistants providing 24/7 support •AI agents resolving common issues without human intervention •Personal Productivity Digital assistants managing calendars and scheduling •Email sorting and prioritization agents •Task management systems with intelligent recommendations •Healthcare Diagnostic support agents analyzing patient symptoms •Medication management assistants for patients •Administrative agents handling appointment scheduling and records •Financial Services Robo-advisors managing investment portfolios •Fraud detection agents monitoring transactions •Insurance claim processing automation •Sales and Marketing Lead qualification and scoring agents •Personalized product recommendation engines •Marketing automation tools optimizing campaigns •Manufacturing and Supply Chain Predictive maintenance agents monitoring equipment •Inventory optimization systems •Quality control agents detecting defects •EducationTutoring agents providing personalized learning •Grading assistants evaluating assignments •Course recommendation agents suggesting appropriate classes •Home Automation Smart home assistants controlling devices and systems •Security monitoring agents detecting unusual activity •Energy optimization agents managing consumption
  • 4.
    MULTIAGENT SYSTEMS FRAMEWORKS Framework LanguageDescription Best For LangGraph Python, Javascript A graph-based framework built on top of LangChain, designed to coordinate multiple agents and tools with memory. Structured agent workflows with LLMs. CrewAI Python Simple and intuitive agent orchestration framework for teams of LLM agents. Uses a “Crew” and “Agent” model with roles and goals. Task-oriented multi-agent collaboration. AutoGen Python Microsoft’s framework for building LLM- powered agents that communicate via messaging. Supports human-AI and AI-AI collaboration. Multi-agent chat and complex interactions. AgentVerse Python Designed for simulating and evaluating large numbers of agents. Ideal for research on collective behaviors. Multi-agent simulations and social dynamics. OpenAgents Python Open-source project combining LangChain, FastAPI, and other tools. Allows UI integration and multi-agent task execution. Developer-friendly agent apps. MiniAGI Python Lightweight framework for building LLM- based agents using memory, tools, and recursive reasoning. Quick experimentation with agents. MetaGPT Python Treats AI agents like team members in a software company (e.g., PM, engineer, QA). Modular and production-oriented. Building software with agent teams.
  • 5.
  • 6.
    MULTIAGENT SYSTEMS AGENTS &WORKFLOWS Source:https://langchain-ai.github.io/langgraph/tutorials/workflows/
  • 7.
    MULTIAGENT SYSTEMS AGENT PATTERNS NETWORKSTRUCTURED, SUPERVISOR BASED, HIERARCHICAL
  • 8.
    MULTIAGENT SYSTEMS REFLECTION PATTERN •Encourages introspection and self-evaluation. • Useful for complex or multi-step tasks. • Helps identify errors and improve reasoning. • Often implemented via checkpoints or "thought loops". • Can be combined with memory modules for deeper reasoning. The Reflection Pattern enables an AI agent to pause and evaluate its current progress, strategy, and understanding. It often involves meta-cognition—thinking about what has been done and what needs to be adjusted to reach a goal more efficiently.
  • 9.
    MULTIAGENT SYSTEMS TOOL USEPATTERN  Agent invokes tools like search engines, calculators, or code interpreters.  Enables solving tasks beyond language-only capabilities.  Often implemented in frameworks like LangChain or ReAct.  Requires mechanisms for selecting and invoking tools dynamically.  Important for real-world applications like retrieval- augmented generation (RAG). The Tool Use Pattern allows agents to call upon external APIs, databases, calculators, or plugins to extend their capabilities beyond native reasoning.This empowers agents to handle a wider range of tasks effectively.
  • 10.
    MULTIAGENT SYSTEMS PLANNING PATTERN Agent outlines goals and subgoals in advance.  Reduces trial-and-error and improves efficiency.  Useful for code generation, reasoning, and long documents.  Often uses a planner-executor model.  Enhances transparency and traceability in agent behavior. The Planning Pattern involves creating a step-by-step plan before executing actions.This structure ensures logical task progression, especially for multi-step or high-stakes tasks requiring accuracy.
  • 11.
    MULTIAGENT SYSTEMS MULTI-AGENT PATTERN •Supports parallelism and specialization. • Agents can be role-based (e.g., writer, reviewer, executor). • Encourages emergent behavior and coordination. • Ideal for complex tasks like research, code review, or game playing. • Can integrate with human feedback or supervisor agents. The Multi-Agent Pattern distributes a task across multiple specialized agents, each responsible for a specific role.These agents can collaborate, compete, or coordinate, enabling more scalable and modular solutions.
  • 12.
    MULTIAGENT SYSTEMS PATTERNS Pattern StrengthsBest For Reflection Improves self-awareness and adaptability Debugging, strategy adjustment Tool Use Extends capabilities via external tools Math, retrieval, real-world tasks Planning Provides structure and foresight Multi-step reasoning, code generation Multi-Agent Enables collaboration and modularity Complex, distributed task environments Each pattern offers unique strengths for building intelligent systems. Depending on task complexity, environment, and goals, one or more patterns can be combined for optimal performance.
  • 13.
    MULTIAGENT SYSTEMS REACT: LISTING1 from langchain.chat_models import ChatOpenAI from langchain.schema import HumanMessage, AIMessage, SystemMessage from langchain.tools import tool import re # Define tools @tool def get_age(name: str) -> str: if name.strip().lower() == "will smith": return "55" return "Unknown" @tool def multiply_by_3(num_str: str) -> str: try: return str(int(num_str) * 3) except: return "Invalid number." tools = { "get_age": get_age, "multiply_by_3": multiply_by_3 } # System prompt defining the ReAct format system_prompt = """ You are a reasoning agent. You must think step by step and use tools when necessary. Use this format: Thought: ... Action: tool_name[input] Observation: ... When you are ready, provide: Final Answer: <your answer> Tools available: get_age, multiply_by_3 """
  • 14.
    MULTIAGENT SYSTEMS REACT: LISTING2 #ReAct loop for _ in range(5): # max 5 steps # Model response response = llm(messages) content = response.content print("[MODEL OUTPUT]n", content) # Check for Final Answer if "Final Answer:" in content: break # Parse action match = re.search(r"Action: (w+)[(.*)]", content) if not match: print("No action detected.") break tool_name, tool_input = match.groups() tool_input = tool_input.strip() # Run tool if tool_name in tools: result = tools[tool_name].run(tool_input) else: result = f"Unknown tool: {tool_name}" # Append result to history messages.append(AIMessage(content=content)) messages.append(HumanMessage(content=f"Observation: {result}")) [MODEL OUTPUT] Thought: I need to find out Will Smith's age. Action: get_age[Will Smith] Observation: 55 [MODEL OUTPUT] Thought: Now I will multiply his age by 3. Action: multiply_by_3[55] Observation: 165 [MODEL OUTPUT] Final Answer: Will Smith is 55 and his age multiplied by 3 is 165.
  • 15.
    MULTIAGENT SYSTEMS MULTIAGENT SCENARIOS NETWORKSTRUCTURED, SUPERVISOR BASED, HIERARCHICAL
  • 16.
    MULTIAGENT SYSTEMS A NETWORKSTRUCTURED MULTI-AGENT SYSTEM Overview: A hierarchical design where a central Supervisor Agent oversees and coordinates a team of specialized Sub-Agents to efficiently complete complex tasks. Supervisor Agent •Serves as the system's coordinator. •Assigns tasks to the right sub-agent based on expertise. •Manages the overall process and ensures tasks are completed in an organized flow. Sub-Agents •Experts in specific domains (e.g., data processing, coding, writing). •Focus solely on executing their assigned tasks. •Operate independently without handling task delegation or workflow decisions. This structure enhances scalability, clarity, and efficiency in multi- agent workflows.
  • 17.
    MULTIAGENT SYSTEMS SUPERVISOR AGENT Collaborative,Decentralized Multi-Agent Design The Network of Agents architecture enables multiple intelligent agents to work independently yet collaboratively. Each agent is equipped with its own tools and responsibilities, dynamically routing tasks among themselves to solve complex problems. While offering flexibility and parallelism, this design also introduces significant coordination and reliability challenges. Each agent has its own tools and task focus. Tasks are dynamically routed to the most capable agent. Agents collaborate by exchanging results, forming a loosely connected system. ✅ Advantages •Decentralized decision-making: No central bottleneck. •Flexible and modular: Easy to add/remove agents or tools. •Parallel execution:Agents can process tasks simultaneously. ⚠️Limitations •Unpredictable task routing: Can cause inefficiency and delays. •High operational cost: Frequent inter-agent LLM calls. •Debugging complexity: Hard to trace errors in decentralized flows. •Coordination overhead: Requires complex protocols for consistency.
  • 18.
    MULTIAGENT SYSTEMS HIERARCHICAL STRUCTURE ScalableMulti-Agent CoordinationThrough Layered Control The Hierarchical Supervisor System extends the supervisor-agent model by introducing multiple layers of control.A top-level supervisor delegates high-level tasks to mid-level supervisors, each managing a group of specialized sub-agents.This structured delegation enables scalability, task specialization, and efficient error tracking, making it ideal for large-scale, complex systems. •Layered Supervision: Top-down task delegation across multiple supervisor layers. •Specialized Sub-Agents: Each sub-agent executes specific tasks without routing responsibility. •Scalable & Modular: Supports large systems by distributing control. •Efficient Debugging: Isolates errors to specific layers or agents.
  • 19.
    MULTIAGENT SYSTEMS MCP (MODELCONTEXT PROTOCOL) INTRO, ARCHITECTURE, BASIC IMPLEMENTATION, BENEFITS AND FUTURE, A2A
  • 20.
    MULTIAGENT SYSTEMS INTRODUCTIONTO MODELCONTEXT PROTOCOL (MCP) •MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP •MCP Clients: Protocol clients that maintain 1:1 connections with servers •MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol •Local Data Sources: Your computer’s files, databases, and services that MCP servers can securely access •Remote Services: External systems available over the internet (e.g., through APIs) that MCP servers can connect to SOURCE https://modelcontextprotocol.io/introduction •Definition: MCP is an open standard introduced by Anthropic on November 25, 2024, aiming to unify communication between large language models (LLMs) and external data sources and tools. •Purpose: • Standardizes interactions between LLMs and external tools. • Addresses limitations of traditional function calling methods. • Enhances scalability and maintainability in AI ecosystems. •Analogy: MCP serves as a "USB-C port" for AI agents, providing a universal interface for diverse components.
  • 21.
    MULTIAGENT SYSTEMS MCP ARCHITECTURE •MCPServer: Operates independently, managing tools and resources. •LLM Client: Connects to the MCP server to access tools. Features: •Decoupling: Separates tool management from the agent, enhancing modularity. •Reusability:Tools can be reused across different agents and systems. •Scalability: Facilitates the addition of new tools without modifying the core agent. Communication Protocols: •Utilizes JSON-RPC 2.0 over standard I/O or Server-Sent Events (SSE) for communication. SOURCE https://modelcontextprotocol.io/introduction
  • 22.
    MULTIAGENT SYSTEMS IMPLEMENTINGTOOLSWITH MCP(SERVER SIDE) # server.py from mcp.server.fastmcp import FastMCP # Initialize the MCP server mcp = FastMCP("Demo Server") # Define a tool to add two numbers @mcp.tool() def add(a: int, b: int) -> int: """Add two numbers.""" return a + b # Define a resource to greet a user @mcp.resource("greeting://{name}") def greet(name: str) -> str: """Return a personalized greeting.""" return f"Hello, {name}!" # Run the server if __name__ == "__main__": mcp.run() • FastMCP: Initializes the MCP server with the name "Demo Server". • @mcp.tool(): Decorator to define a tool that performs an action—in this case, adding two numbers. • @mcp.resource(): Decorator to define a resource that provides data—in this case, a personalized greeting. • mcp.run(): Starts the server, ready to handle MCP requests.
  • 23.
    MULTIAGENT SYSTEMS IMPLEMENTINGTOOLSWITH MCP(CLIENT SIDE) import asyncio from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client async def main(): # Define server parameters server_params = StdioServerParameters( command="python", args=["server.py"]) # Create a client session async with ClientSession( client=stdio_client(server_params) ) as session: # Call the 'add' tool result = await session.call_tool("add", {"a": 5, "b": 3}) print(f"Addition Result: {result}") # Fetch the 'greet' resource greeting = await session.get_resource("greeting://Alice") print(f"Greeting: {greeting}") # Run the client if __name__ == "__main__": asyncio.run(main()) • StdioServerParameters: Specifies how to start the server process. • ClientSession: Manages the client-side session with the server. • session.call_tool(): Invokes the 'add' tool on the server. • session.get_resource(): Retrieves the 'greet' resource from the server.
  • 24.
    MULTIAGENT SYSTEMS MANIFEST "resources": [{ "uri_template":"greeting://{name}", "description": "Return a personalized greeting.", "parameters": { "type": "object", "properties": { "name": { "type": "string" } }, "required": ["name"] }, "returns": { "type": "string" } }] } { "name": "Demo Server", "version": "0.1.0", "tools": [ { "name": "add", "description": "Add two numbers.", "parameters": { "type": "object", "properties": { "a": { "type": "integer" }, "b": { "type": "integer" } }, "required": ["a", "b"] }, "returns": { "type": "integer" } } ], Field Description name The name of the MCP server. version API version of the server capabilities. tools List of callable functions (e.g., add) with expected input/output types. resources List of accessible data endpoints via URI (e.g., greeting://{name}). parameters JSON Schema describing input structure. returns JSON Schema describing output structure. Machine-readable: Clients can auto-discover and validate what functions/resources are available. Interoperable: Useful for language models and tools that use MCP as a plugin protocol. Declarative:Acts like an OpenAPI spec for MCP services.
  • 25.
    MULTIAGENT SYSTEMS BENEFITS ANDFUTURE OF MCP Advantages: •Standardization: Provides a unified protocol for tool integration. •Flexibility: Easily integrates with various tools and services. •Efficiency: Reduces redundancy by allowing tool reuse. Future Prospects: •Potential to become a foundational standard in AI agent ecosystems. •Facilitates the development of more complex and collaborative AI systems. •Encourages broader adoption of standardized protocols in AI development.
  • 26.
    MULTIAGENT SYSTEMS AGENT2AGENT Collaborative AICommunication Framework Agent2Agent is a framework developed by Google to enable autonomous AI agents to communicate and collaborate effectively. Designed to simulate human- like interactions, it supports multi-agent coordination, negotiation, and task-solving through natural language.The framework is a step toward more interactive, dynamic, and scalable AI ecosystems where agents can learn, reason, and work together with minimal human input.
  • 27.
    MULTIAGENT SYSTEMS RESOURCES AI Agentsin Action Michael Lanham Links • https://modelcontextprotocol.io/introduction • https://www.anthropic.com/news/model-context-protocol • https://langchain-ai.github.io/langgraph/agents/agents/ https://cdn.openai.com/business-guides- and-resources/a-practical-guide-to- building-agents.pdf Building Agentic AI Systems: Create intelligent, autonomous AI agents Anjanava Biswas, Wrick Talukdar ChatDev: Communicative Agents for Software Development Chen Qian, Wei Liu, Hongzhang Liu, Nuo Chen, Yufan Dang, Jiahao Li, Cheng Yang, Weize Chen, Yusheng Su, Xin Cong, Juyuan Xu, Dahai Li, Zhiyuan Liu, Maosong Sun https://weaviate.io/ebooks/agentic-architectures? utm_source=channels&utm_medium=vs_social&utm_camp aign=agents&utm_content=honeypot_post_680114896