> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rightbrain.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rightbrain.ai/_mcp/server.

# A2A protocol

> Rightbrain supports the Agent2Agent (A2A) protocol, exposing tasks over JSON-RPC so external agent frameworks can invoke them as agents.

Rightbrain supports the open **Agent2Agent (A2A)** [protocol](https://a2a-protocol.org/) for interoperability between AI agents. A2A lets an agent built on one framework call an agent built on another, without a custom integration on either side. When you expose a Rightbrain task over A2A, other agent frameworks can invoke it as if it were one of their own agents.

## A2A vs MCP

Rightbrain speaks two interop protocols. They target different callers:

|                          | MCP                                                       | A2A                                                  |
| ------------------------ | --------------------------------------------------------- | ---------------------------------------------------- |
| **Caller**               | AI applications and assistants (Claude, Cursor, Windsurf) | Other autonomous agents and agent frameworks         |
| **Your task appears as** | A callable tool                                           | An agent that accepts a request and returns a result |
| **Use when**             | You want a person's AI client to run your task            | You want another agent to delegate work to your task |

If you are wiring a task into a coding assistant or chat client, use [MCP](/docs/interop/mcp). If you are building a multi-agent system where agents hand work to each other, use A2A.

## Expose a task over A2A

A task is exposed to A2A when its `exposed_to_agents` flag is set. Once enabled, it appears in the project's A2A registry.

```
POST https://app.rightbrain.ai/api/v1/{project_id}/a2a/agents/{agent_id}
```

Two discovery endpoints let A2A clients find your agents: `GET .../a2a/agents` lists every task in the project exposed to agents, and `GET .../a2a/agents/{agent_id}/.well-known/agent-card` returns the standard A2A agent card for one of them.

External agent frameworks that support A2A can then discover the task's capabilities and send it requests over JSON-RPC. The task runs on Rightbrain with its configured model, prompt, and output schema, and returns a structured result to the calling agent.

The JSON-RPC endpoint currently supports `message/send`. Other methods return JSON-RPC method-not-found error `-32601`.

The discovery and JSON-RPC endpoints require a bearer credential. Send an API key or OAuth access token for a user with access to the project.

## Next steps

#### [Author a task](/docs/concepts/tasks)

Build the task you want to expose as an agent.

#### [MCP](/docs/interop/mcp)

Expose a task as a tool for AI clients instead.

#### [A2A specification](https://a2a-protocol.org/)

Read the open Agent-to-Agent standard.

#### [Run agents via API](/docs/api/run-agents)

Invoke Rightbrain agents directly over HTTP.