Showing posts with label Agents. Show all posts
Showing posts with label Agents. Show all posts

What are the differences and relationship between MCP and A2A protocol?

 

What are the differences and relationship between MCP and A2A protocol?

After MCP (Model Context Protocol) from Anthropic getting popularity, recently Google has introduced another protocol - A2A (Agent to Agent Protocol). A natural question arises is how are they related to each other? Are they complementing or competing with each other?

In this post, let’s try to demystify the two protocols.

Current AI Agentic System (or Multi-agent System) development has two challenges:

  • Integrating agent with tools and data
  • Agent to agent communications

In a nutshell, MCP (Model Context Protocol) tackles the first challenge, and A2A (Agent to Agent Protocol) aims to tackle the second one.

MCP

MCP (Model Context Protocol) from Anthropic is an open protocol that standardizes how applications provide context to LLMs, like USB-C port for AI applications.

Just as USB-C provides a standardized way to connect your devices to various peripherals and accessories, MCP provides a standardized way to connect AI models to different data sources and tools. - MCP documentation

According to HuggingFace, an agent has an LLM as its brain and capabilities and tools as its body.

  • Tools available to an agent allow it to access new knowledge beyond the knowledge cut-off date, such as retrieving social media data or the current weather.
  • Capabilities represent everything the agent is equipped to do. One popular capability example is using a memory component to remember things, such as previous conversations and external data.

Look into the example provided by Anthropic, an agent (MCP host) can access additional context from local data sources or remote services via MCP protocol.



  • 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

The MCP Server is a foundational component which provides tools, resources, and capabilities to clients via APIs and endpoints. More specifically:

  • Exposing tools that clients can discover and execute
  • Managing resources with URI-based access patterns
  • Providing prompt templates and handling prompt requests
  • Supporting capability negotiation with clients
  • Implementing server-side protocol operations
  • Managing concurrent client connections
  • Providing structured logging and notifications

A2A

A2A (Agent to Agent Protocol) from Google is an open protocol that provides a standard way for agents to collaborate with each other, regardless of the underlying framework or vendor.

A2A facilitates communication between a "client" agent and a “remote” agent.

A client agent is responsible for formulating and communicating tasks, while the remote agent is responsible for acting on those tasks in an attempt to provide the correct information or take the correct action.

This interaction involves several key capabilities:

  • Capability discovery: Agents can advertise their capabilities using an “Agent Card” in JSON format, allowing the client agent to identify the best agent that can perform a task and leverage A2A to communicate with the remote agent.
  • Task management: The communication between a client and remote agent is oriented towards task completion, in which agents work to fulfill end-user requests. This “task” object is defined by the protocol and has a lifecycle. It can be completed immediately or, for long-running tasks, each of the agents can communicate to stay in sync with each other on the latest status of completing a task. The output of a task is known as an “artifact.”
  • Collaboration: Agents can send each other messages to communicate context, replies, artifacts, or user instructions.
  • User experience negotiation: Each message includes “parts,” which is a fully formed piece of content, like a generated image. Each part has a specified content type, allowing client and remote agents to negotiate the correct format needed and explicitly include negotiations of the user’s UI capabilities–e.g., iframes, video, web forms, and more.

Google highlighted A2A is a complementary to MCP rather than an alternative.

Model Context Protocol (MCP) is the emerging standard for connecting LLMs with data, resources, and tools. We already observe MCP standardizing ‘function calling’ across different models and frameworks. This is creating an ecosystem of tool service providers and dramatically lowering the complexity to connect agents with tools and data. We expect this trend to continue as more frameworks, service providers, and platforms adopt MCP.
A2A is focused on a different problem. A2A is an application level protocol that enables agents to collaborate in their natural modalities. It allows agents to communicate as agents (or as users) instead of as tools. We hope that A2A gains adoption as a complement to MCP that enables ecosystems of agents and will be working in the open with the community to make this happen.

Simply put, MCP for tools and A2A for agents.

Google even recommends that applications model A2A agents as MCP resources (represented by their AgentCard). The frameworks can then use A2A to communicate with their user, the remote agents, and other agents as illustrated below.


Discussion

With a peaceful coexisting scenario of the two standards, each agent (MCP host) can have their own connected MCP servers for accessing tools and resources via the MCP protocol. Additionally, these agents communicate with each other through the A2A protocol, as discussed in SwirlAI’s post. This applies when we treat agents as agents as independent entities rather than tools. However, this might change when agents are treated as special tools that can also be exposed via MCP servers.

It will be interesting to see how developers decided choose to adopt these standards - wheter one or both - as their decisions will eventually shape the future of these protocols. Also, MCP and A2A are both new and will keep evolving, with the possibility to extend functionalities to be better positioned in Agentic AI ecosystem.

References

What are current examples of AI agents?

 There are predictions that 2025 will be . With the first quarter of the year already behind us, we might be curious about recent announcements from major companies regarding AI agents.

Below, we provide an overview of current AI agents introduced by major companies, along with  videos to give a quick sense of what they do, followed by final remarks.

Adobe Orchestrator

Adobe has introduced a set of specialized agents with different responsibilities such as site optimization agent, content production agent, and workflow optimization agent etc., in their business-oriented platform ().

Agentforce (Salesforce)

Salesforce is a cloud-based customer relationship management (CRM) platform that helps businesses manage customer interactions, sales, marketing, and support services. Their AI agent product — Agentforce — allows to create virtual agents that are capable of doing jobs fit into configured (via easy-to-use user interface for prompt engineering and a set of predefined actions) topics and guardrails.

Claude (Anthropic)

General AI agent, while differing from Chatbot, it can navigate screens, move the cursor, click buttons, type text, and perform other actions to complete tasks on a computer.

Copilot as User Interface for Agents (Microsoft)

Copilot is an AI-powered assistant integrated into Microsoft products to help users with tasks, improve productivity, and enhance creativity. Microsoft is using the Copilot as the user interface (UI) for agents.  (as shown in the second video below). The custom agents are similar to those we can see from Agentforce.

Gemini Robotics (Google)

Google’s Gemini Robotics brings AI agent to the physical world, which can follow general (various) instructions, understand the 3D world, and react to changing environment, think and act, and interact with other agents for completing the given task.

Manus

 is a general AI agent that bridges minds and actions. Manus has gained a lot of attention after , and it claims that it excels at various tasks in work and life, getting everything done while you rest.

Nova Act (Amazon)

Amazon’s Nova Act is a Web AI agent to execute tasks within a web browser. At the time of writing, it is available as a research preview through the .

Operator (OpenAI)

Operator is also a web-based AI agent that can perform tasks within a browser, such as grocery shopping, booking tickets, and making restaurant reservations.

Final Remarks

As we can see, AI agents are primarily developed to automate workflows and improve our productivity, with a main focus on using Web browsers, computers, and hardware such as robots.

Subscription-based B2C (Business to Customer) companies like OpenAI and Antrhopic aim to provide AI agents to tend users for automating general daily workflows. B2B (Business to Business) companies like Microsoft, on the other hand, focus on offering AI agents integrated into their ecosystems to automate business workflows for their custormers.

As the year of AI agents progresses, we can expect more and more agents to be announced by various companies. MIT maintains an  that highlights state-of-the-art agents, with a focus on those already deployed in industry, to keep track of up-to-date AI agents.

One key remaining question is whether the investment in these agents is worthwhile for end users and businesses. On Reddit, there are some communities discussing their experiences regarding these agents like O, and .

What has your experience been using these agents so far, if you have been using any of them in daily life or at the workplace?

What is the Relationship between LLMs, Agents, and Multi-agent Systems?

 We’ve heared enough about Large Language Models (LLMs) in recent years. Since 2024, we have increasingly heard about AI “agents” or “agentic systems”, and some predict that 2025 will be . In addition, (LLM-based) multi-agent systems (MAS) have gained significant attention in research communities as well as industries, with many proposed frameworks such as  and  from Microsoft.

However, the relationships between these concepts are remain unclear for a while for me at least. In this post, let’s demystify them...

LLMs

LLMs are impressive as they can be used directly for a wide range of tasks such as question answering, sentiment classification, or summarization, simply by giving different instructions or input prompt for each task.

This capability can be attributed to the , where an extremely large model (i.e., with a huge number of parameters) is trained on vast amount of data using significant computing resources. This is impressive because, before LLMs, we typically needed specialized models for each task.”

Despite their usefulness, LLMs have several limitations. For discussion, we can simply think of an LLM as a function that takes a textual input (input prompt) and returns an textual output (output prompt) after extensive matrix manipulations.

def llm(input_prompt):
# Matrix manipulations
...
return output_prompt

In additon to the well-known  issue of LLMs, the main limitations of LLMs are context length, knowledge cut-off, and the stateless nature of LLMs.

  • Context length refers to the maximum length of an input prompt, which is limited to certain extent. Normally, a LLM's context length can be found in LLM model card, such as one like Table 1, or in its information page. Although recent advanced models have bean able to increase the context length, it is undoubtfully not unlimited. Additionally, having a large context does not automaticlly translate to improved performance, as it also introduces challenges, such as retrieving relevant information from a lengthy prompt (like finding a needle in a haystack) and dealing with 
  • Knowledge cut-off refers to the fact that an LLM’s knowledge is based on the massive dataset used for training, which is limited to a specific date. Since training data is only available up until a certain point, an LLM cannot provide accurate information about events that have occured after its cut-off date. For example, if we ask an LLM about an event that happend today, it will not have the correct answer.
  • LLMs are stateless. As mentioned earlier, an LLM simply takes the current input and generates an output prompt. This means that, on its own, an LLM cannot handle multi-turn conversations, as it does not retain awareness of previous exchanges or context.

User: My name is Guangyuan Piao

LLM: Nice to meet you

User: What is my name?

LLM: Sorry…



With the limitations of LLMs in mind, we can expect that they need additional tools and capabilities to overcome these challenges.

You are right, this is where agents come into play!

We’ve just explored one of the two perspectives on agent : — which sees agents as wrappers around LLMs, enhanced with extra tools and capabilities. In the following section, we will start with the other perspective: .

Agents

Agents have existed for a long time, even way before LLMs. They interact with a virtual or physiscal environment through actions and observations.

Figure 1. Agent

Nowadays, “agent” is an overloaded term. When we talk about agents, it often refers to LLM-based agents or sometimes referred as modern agents. This is the second perspective from historical agent point of view — agent equiped with LLM capabilities such as reasoning.

Figure 2. LLM-based agent

We’ve just looked at two perspectives of (LLM-based) agents:

  • Agent as a wrapper for LLM
  • Agent equiped with LLM capabilities

So, what are these added components (question marks in Fig. 2) for agents?

 provides a good analogy: an agent has an LLM as its brain and capabilities and tools as its body.

  • Tools available to an agent allow it to access new knowledge beyond the knowledge cut-off date, such as retrieving social media data or the current weather.
  • Capabilities represent everything the agent is equipped to do. One popular capability example is using a memory component to remember things, such as previous conversations.

The scope of possible actions depends on what the agent has been equipped with. For example, because humans lack wings, they can’t perform the “fly” Action, but they can execute Actions like “walk”, “run” ,“jump”, “grab”, and so on.

— HuggingFace Agents Course

As we can see, capabilities such as  help overcome the stateless nature of LLMs, while exploiting tools helps mitigate the knowledge cut-off limitations. These can also help keep current context short by retrieving only the necessary context, for example.

In this sense, we can notice many applications we use nowadays, such as  or , are chat agents.

In my view, since I like simplify things, capabilities can also be treated as tools that implement these capabilities. For example, tools for interacting with hardware if it is a physical agent, and tools for managing memories. What are your thoughts?

Multi-agent Systems (MAS)

Agents seem to enhance LLMs significantly, with tools and capabilities. However, the brain (LLM) of agents unfortunately needs to perform many additional tasks, such as determining which tools to use, how to use, and how to manage memories. For simple tasks, a single agent can indeed get the job done.

However, as the task becomes more and more complex, a single agent is not enough and does not work well, just like a single person cannot handle a complex project on their own.

We need more people! sometimes each with specialized expertise in different tasks.

Here, the multi-agent systems come into play! Many studies have also found that dividing a task into subtasks and working with more agents, where each tackles a simple subtask, works better for solving complex problems.

However, it is not as easy as it may seem to simply add more agents. To make multi-agent systems work, there are some challenges.

  • How do we manage agents? For example, do we use a set of predefined agents, or do we create them on the fly based on our needs? Can these agents be allowed to evolve — changing their behaviors or personalities (e.g., by modifying their system prompts) on their own?
  • How do we enable these agents communicate with each other? For example, as shown in Fig. 3, do the agents communicate in a cooperative manner? Can they communicate with each other in a peer-to-peer fashion or a hierarchical fashion (e.g., ones can only talk to a upper-level manager agent).
Figure 3. 

Hopefully, you enjoyed the article and it helped clarify the relationships between LLMs, agents, and multi-agent systems. As you might expect, there are many research challenges and opportunities in each of these areas (LLMs themselves, agents, and MAS), and we expect there will be many more advances as the field is moving at such a fast pace.

Discussion

Many tech and research giants have also emphasized that agents are going to play a critical role from this year.

Agents are not only going to change how everyone interacts with computers. They’re also going to upend the software industry, bringing about the biggest revolution in computing since we went from typing commands to tapping on icons. — 

I think AI agentic workflows will drive massive AI progress this year. — 

We believe that, in 2025, we may see the first AI agents “join the workforce” and materially change the output of companies. — 

The signals are already coming in. As of the time of wrting this article, there is a news about . Also, Salesforce CEO  earlier this year that the company does not plan to hire engineers this year because of the success of AI agents created and used by the company. Similarly, Meta CEO Mark Zuckerberg said that  by 2025. It is clear that there will be a lot of in-house agents in each company in the near future.

Interestingly, at least to me, we are also going to see “a population of agents” on the Web that can be reused. For example, HuggingFace allows you to share your agent and make it reusable by other people, just like open-source models on the hub. Those agents will be specialized tools to enhance the capabilities of the agents we are building.

Below is a code snippet about pushing a developed agent to the hub, and running the agent from the hub.

# Change to your username and repo name
agent.push_to_hub('sergiopaniego/AlfredAgent')

# Change to your username and repo name
alfred_agent = agent.from_hub('sergiopaniego/AlfredAgent', trust_remote_code=True)
alfred_agent.run("Give me the best playlist for a party at Wayne's mansion. The party idea is a 'villain masquerade' theme")

It is definitely a starting year of seeing what agents can offer to our world.

Are you a decision maker responsible for incorporating those agents into your company’s workflows? Are you a developer actively developing agents? Are you a researcher actively working on some of the challenges?

What are your thoughts on agents and experience on implementing agents or agentic workflows?