A2A & MCP Workshop: Automating Business Processes with LLMs — Damien Murphy, Bench

AI EngineerAbout 7 min readJul 27, 2025Watch original
THE SUMMARYAI-generated

Key Concepts:

  • A2A (Agent-to-Agent): A protocol for remote agents to communicate over the web.
  • MCP (Model Context Protocol): A standardized interface (like USB-C) for AI agents to access context, tools, and resources.
  • Agentic AI: A broad category encompassing AI systems with autonomous agents.
  • Agent Specialization: Dividing tasks among multiple specialized agents instead of one general agent.
  • Parallel Processing: Executing tasks simultaneously using multiple agents.
  • Context Management: Strategies for handling and optimizing the information an AI agent retains during a conversation or task.
  • Prompt Caching: Storing parts of the conversation context to reduce costs and improve performance.
  • Agent Card: Public information describing an agent's capabilities.
  • Genkit: A framework for connecting A2A code with Gemini.
  • LLM: Large Language Model
  • SSE: Server-Sent Events
  • API: Application Programming Interface
  • VPC: Virtual Private Cloud
  • OAT: OAuth

1. Introduction and Overview

  • Damian Murphy introduces himself and the workshop topic: A2A and MCP for automating business processes.
  • He shares his background: 15 years as a full-stack developer, 5 years in solutions engineering, and 3 years in voice AI and AI agents.
  • He mentions his previous workshop on AI voice agent swarms and notes that building basic voice agents is now common, but building autonomous agents for complex tasks is the challenge.
  • He introduces Bench Computing, a pre-revenue startup backed by Sutter Hill Ventures, building an autonomous AI agent platform focused on teams and enterprises. Bench is described as an autonomous AI agent capable of parallel task automation.
  • The workshop will cover building a multi-agent system using A2A agents, integrating them with MCP, triggering agents with webhooks, and discussing when to use A2A and MCP. Prompt caching and context management will also be covered.

2. A2A (Agent-to-Agent) Protocol

  • A2A is a protocol released by Google that allows agents to communicate over the web.
  • Key benefits of A2A:
    • Agent Specialization: Allows creating specialized agents that excel at specific tasks. Instead of one agent doing 100 things, have 100 agents do one thing very well.
    • Task Delegation: Enables delegating tasks to specific agents (e.g., a Salesforce agent interacting with Salesforce MCP tools).
    • Parallel Processing: Improves speed and context management by allowing agents to work simultaneously.
    • Complex Workflows: Facilitates complex workflows and helps keep the main agent's context size down.

3. MCP (Model Context Protocol)

  • MCP is described as the "USBC for AI," providing a standard interface for agents to access context and tools.
  • Benefits of MCP:
    • Standard Interface: Simplifies integration with various tools and resources.
    • Large Ecosystem: Access to thousands of MCP tools (around 7,000 via Zapier).
    • No API Integration: Eliminates the need for handling different APIs individually.
    • Plugin Architecture: Based on the Language Server Protocol (LSP), which was used for IDEs to understand different code languages.
    • Sampling: Allows MCPs to sample the host LLM, enabling them to use the same model (e.g., Claude) as the host.

4. When to Use A2A vs. MCP

  • A2A is suitable for connecting remote agents, especially those from third parties, where you have no prior knowledge of their capabilities.
  • MCP is used to connect to external context and tools.
  • A2A enables service discoverability, allowing you to learn about an agent's capabilities once you have its endpoint.
  • MCP offers prompt templates, resources, and sampling.
  • Agentic AI is considered a superset of A2A and MCP, which are different modalities within it.

5. When Not to Use A2A or MCP

  • If you have full control of the tools and agents, using local function calls is often easier, faster, and easier to debug.
  • Calling functions directly in your codebase is simpler and more maintainable.

6. Why Use A2A and MCP?

  • Third-Party Tools: MCP provides access to a vast array of tools that would be difficult to integrate directly.
  • Extensibility: MCP allows users to add their own MCP servers, providing great extensibility.
  • Complexity Hiding: A2A hides the complexity of remote agents, allowing you to connect to them without knowing their internal workings.

7. Drawbacks of MCP

  • You are limited to what the MCP provides, which may not always be exactly what you need.
  • You might need to index data to avoid repeatedly calling the same MCP functions (e.g., listing Slack channels).

8. Code Walkthrough and Demo

  • The workshop uses a GitHub repository with code for a host agent and sub-agents (Slack, GitHub, and Bench).
  • The code demonstrates A2A and MCP integration, but in a real-world scenario, sub-agents would likely reside in different repositories and servers.
  • The repository includes A2A server and client implementations (from the A2A repository) and an MCP client.
  • Setup requires an MCP server URL (Zapier) and a Gemini API key (Google AI Studio), both available for free.
  • The Zapier MCP setup involves creating a new server and connecting via SSE (Server-Sent Events).
  • The Gemini setup involves obtaining an API key from AI Studio.
  • A remote Bench A2A agent is used to demonstrate remote A2A interaction.
  • The application is run using mpm run start all, which starts all agents, the webhook server, and the webhook admin panel (accessible at localhost:3000).

9. Agent Roles and Functionality

  • Host Agent: The central coordinator that handles agent discovery and brings everything together. It may be the only agent in the application or delegate tasks to sub-agents.
  • Slack Agent: Sends Slack messages in response to webhook transcripts.
  • GitHub Agent: Creates GitHub issues based on detected bugs in the webhook transcript.
  • Bench Agent: A remote agent that researches the company and people mentioned in the meeting transcript.

10. Demo and Application Usage

  • The demo involves sending a fake meeting transcript to the webhook, which triggers the agents to perform their tasks.
  • The Slack agent posts a message to a Slack channel, the GitHub agent creates a GitHub issue, and the Bench agent researches the company and participants.
  • The host agent logs show the transcript processing and communication with sub-agents.
  • The MCP inspector is used to connect to the Zapier MCP URL and list/call tools.

11. Limitations and Challenges

  • The Genkit implementation limits the number of sub-agent calls to five per turn.
  • Zapier Slack MCP fails silently if the specified channel is not found.
  • Describing an agent's capabilities in the agent card becomes challenging as the agent gains more functions.
  • PII (Personally Identifiable Information) can leak from meeting transcripts into GitHub issues.

12. Context Size and Management

  • AI agents accumulate context as they work, including tool calls and responses.
  • Context size matters because it affects cost and performance.
  • Prompt caching can reduce costs but requires careful context management.
  • Sub-agents help protect the host agent from excessive context growth by isolating tool results.
  • Lean context in the host agent allows for faster processing, lower latency, and lower costs.

13. Code Deep Dive

  • The code walkthrough covers the host agent, Slack agent, and GitHub agent, highlighting their configurations, prompts, and agent cards.
  • The host agent's system prompt defines the workflow and steps for processing webhooks.
  • The agent cards define the capabilities and skills of each agent.
  • The A2A folder contains the client and server implementations from the A2A repository.

14. Q&A Highlights

  • Evals: A2A is considered too early for production-level evals.
  • Language: A2A framework is better in Python, but TypeScript is preferred for this workshop.
  • Caching: Implement your own caching strategy.
  • Authentication: A2A spec includes authentication; MCP uses OAUTH.
  • Security: In highly secured environments, run the LLM yourself and avoid interacting with external parties.
  • Orchestration: The host agent is the planner, and sub-agents are workers.
  • Context Windows: Sub-agents protect the host agent from context window limits.
  • Human Confirmation: Implement a staging area for actions requiring human confirmation.
  • Agent Communication: Sub-agents typically don't communicate directly with each other.
  • Context Slicing: Context slicing is managed through prompt engineering.
  • LLM Choice: Gemini is preferred for large contexts, Claude Sonnet 4 for tool calling.
  • Task Management: Use directed acyclic graphs (DAGs) for managing complex task flows.

15. Bench Computing and Future Directions

  • Bench is an LLM aggregator with autonomous AI agents, offering access to various models and integrations.
  • Bench started with MCP integrations but built first-party integrations for better data caching and indexing.
  • Future directions include allowing users to access data lakes through agents for complex queries.
  • Bench is launching in public beta in about two weeks.

16. Conclusion

  • A2A is a promising protocol for agent communication, but it is still in its early stages.
  • MCP provides a standardized interface for accessing tools and resources, but it has limitations.
  • Context management is crucial for building efficient and cost-effective AI agent systems.
  • The choice between A2A and MCP depends on the specific use case and the level of control you have over the tools and agents.
  • The workshop provides a practical example of integrating A2A and MCP to automate business processes.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.