---
# System prepended metadata

title: MPC over A2A Exploration

---

# MPC over A2A Exploration

Google’s **Agent-to-Agent (A2A)** protocol offers a new design space for using LLMs. It defines how two AI agents can communicate asynchronously over HTTP.
I’ve briefly explored how **MPC (Multi-Party Computation)** could be integrated as a way for agents to evaluate over their private state.

---

## Why it’s an opportunity

* **A2A is synchronous**, and agents can communicate continuously — which makes it well-suited for interactive MPC protocols.
* Agents are typically very specific, but **MCP** (Model Context Protocol) makes it easy to plug into real-world APIs and data sources.
* **MCP** allows agents to fetch data or interact with APIs through an LLM — enabling more complex and contextual decision-making.

---

## What Google released

Google published a repository showcasing the A2A protocol, along with tooling in Go, Java, Python, and JS:
👉 [A2A Samples GitHub Repo](https://github.com/google-a2a/a2a-samples)

---

### How it works (Quick Overview)

* You have a **main agent** that you communicate with. It handles prompts and routes them to specialized agents.
* Each agent is defined by an **agent card**, which describes its skills and how to interact with it.
* Some agents connect to APIs via MCP to enrich their responses. For example, a **movie agent** can fetch data from TMDB to recommend or analyze films.
* Agents can have specific skills (e.g., generating code, booking meetings) and support different input/output modes.

---

### Example Agent Card (simplified)

```ts
const movieAgentCard: AgentCard = {
  name: "Movie Agent",
  description: "An agent that can answer questions about movies using TMDB.",
  url: "http://localhost:41241/",
  capabilities: {
    streaming: true,
    pushNotifications: false,
    stateTransitionHistory: true,
  },
  defaultInputModes: ["text"],
  defaultOutputModes: ["text", "task-status"],
  skills: [
    {
      id: "general_movie_chat",
      name: "General Movie Chat",
      description: "Answer general questions or chat about movies, actors, directors.",
      examples: [
        "Tell me about the plot of Inception.",
        "Who directed The Matrix?",
        "What other movies has Scarlett Johansson been in?",
      ],
    },
  ],
};
```

---

## A Small MPC Example

I played around with the code and created a basic [“guess a number” MPC demo](https://github.com/google-a2a/a2a-samples/compare/main...Meyanis95:a2a-samples:main).

![Chat Screenshot](https://hackmd.io/_uploads/ByOeIFWNxe.png)

In this example, the main agent runs the MPC circuit to privately evaluate a guess without revealing inputs.

---

## Potential Integration Ideas

This protocol opens the door to building agents with **MPC or privacy-preserving capabilities**, such as:

* Google Calendar agent that checks for common available meeting times.
* Ethereum wallet agent that performs **PSI** (Private Set Intersection) to find shared assets or tokens.
* Agents that negotiate or recommend based on private user preferences.

This could be a great opportunity to build a small repo of demos combining A2A + MPC.

---

## Considerations

* A2A uses **HTTP for communication**, which may complicate socket-based MPC protocols. Exploring workarounds or hybrids might be needed.
* Agents are very **domain-specific** — app developers will likely need to integrate custom business logic for each use case.
* The sample code is built for **Gemini**, but extending this to **self-hosted models or other value aligned providers** would be a major plus.

