heidloff.net - Building is my Passion
Post
Cancel

Comparison of Agent Protocols MCP, ACP and A2A

AI agents can work autonomously by delegating tasks to different agents, models and tools. Various protocols are evolving to standardize the communication between agents. This post describes some protocols and key capabilities.

Several companies and communities are defining protocols how agents can collaborate: MCP, ACP, A2A and more. The fact that there are so many different options shows the relevance of this topic and that not one solution solves all needs. This space is changing fast, for example recently Google announced that they transferred the governance of A2A to the Linux Foundation which is the same open governance organization that hosts IBM’s ACP.

Sophisticated systems and applications require modular architectures which is why microservices have become popular despite the new challenges they introduce. OpenAPI, formerly known as Swagger, is an interface that defines how to consume modular services in classic programming scenarios. In the age of AI these interfaces are often described via natural language, but well defined structured input and output definitions are more efficient. The evolving agent protocols are basically Swagger for agents.

Agents vs Tools

Autonomous agents can invoke Tools and other Agents. Tools and agents have similar characteristics, but are slightly different:

  • The execution of tools is usually rather fast. Agents might require much more time, especially if they execute other agents and use generative AI.
  • Tools often perform REST API requests where the responses are returned synchronously. Agents return pieces of information asynchronously when they become available. Text is generated token by token.
  • Tools are typically stateless; agents can have memory.

Model Context Protocol (MCP) defines how to invoke tools. Protocols like Agent Communication Protocol (ACP) define how to invoke agents.

Well, that’s what these protocols focus on today, but these two concepts are coming closer together. The difference between agents and tools is vanishing. For example, tools can be implemented with AI agents.

MCP

At the end of last year Anthropic published the Model Context Protocol (MCP). Since then, it has been adopted by many companies. I think one of the main reasons is that it is very simple. Another reason is that Anthropic has delivered documentation and samples to enable the community to build MCP servers. Recently there was even a first MCP conference.

While the simplicity is a reason for the fast adoption, more advanced functionality has not been implemented yet or is being implemented, for example authorization. The design of the protocol shows that the original goal was to add tools to environments like Claude and IDEs and not agent to agent collaboration.

ACP

Because of the MCP gaps several new initiatives have evolved. From the more than 10 alternatives mentioned above, I picked ACP as an example which is an IBM open-source project how to address these gaps. ACP addresses three shortcomings of MCP:

  1. Streaming
  2. Memory
  3. Asynchronous Execution

It would be great if these features could be added to MCP. At the MCP Developers Summit several of the features were discussed.

To get started with ACP, check out the new course Agent Communication Protocol.

Memory

MCP servers can have memory within single servers, but there is currently no concept of memory beyond this. ACP has this capability built in.

1
2
3
4
5
6
7
async with Client(base_url="http://localhost:8000") as client, client.session() as session:
    run = await session.run_sync(agent="chat_bot", input=[Message(parts=[MessagePart(content="Hello, my name is Niklas!")])])
    for message in run.output:
        print(message)
    run = await session.run_sync(agent="same_or_other_chat_bot", input=[Message(parts=[MessagePart(content="What's my name again?")])])
    for message in run.output:
        print(message)

Asynchronous Execution

With ACP agents can pause and await additional data. This enables long running tasks, Human in the Loop and elicitation.

1
2
3
4
5
6
7
8
9
10
@server.agent()
async def approval_agent(input: list[Message], context: Context) -> AsyncGenerator:
    """Request approval and respond to user's confirmation."""

    response = yield MessageAwaitRequest(message=Message(parts=[MessagePart(content="I can generate password for you. Do you want me to do that?")]))
    if str(response.message) == "yes":
        yield MessagePart(content="Generating password...")
        yield Message(parts=[MessagePart(content=f"Your password is: {''.join(random.choices(string.ascii_letters, k=10))}")])
    else:
        yield MessagePart(content="Password generation declined.")

Comparison

My college Sandi Besen wrote a great article Comparison of MCP, ACP, and A2A Protocols which compares the three protocols in more detail.

image

In the DeepLearning.AI course Agent Communication Protocol she also outlines the differences.

Next Steps

Personally, I’d like MCP to learn from ACP to address the current challenges. I hope that Antropic transfers the ownership of this protocol to an open governance organization.

To learn more, check out the following resources:

Featured Blog Posts
Disclaimer
The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.
Contents
Trending Tags