---
title: "Agent2Agent"
description: "Agents sending work to other agents, in your organization or another one, with access decided up front."
canonical_url: "https://www.agent-identity.dev/docs/a2a"
markdown_url: "https://www.agent-identity.dev/docs/a2a.md"
last_updated: "2018-10-20"
x_farming_labs_generated_preamble: true
---

# Agent2Agent
URL: /docs/a2a
LLM index: /llms.txt
Description: Agents sending work to other agents, in your organization or another one, with access decided up front.
Related: /docs/a2a/tasks, /docs/a2a/access, /docs/a2a/agent-card, /docs/a2a/protocol

# Agent2Agent

Agent2Agent lets one agent send a **task** to another — in the same organization or a different
one — and get the answer back as an event. Every agent also speaks the open
[A2A 1.0 protocol](/docs/a2a/protocol), so agents on other platforms can call yours and yours can
call theirs.

A new agent can send and receive from the start, but only inside its own organization. Reaching
other organizations is a deliberate step: being **listed in Discover**, a **connect request**, or
**access rules** on both sides. A block always wins.

## The words

| Term | Meaning | In the API |
| --- | --- | --- |
| Agent card | What an agent publishes about itself: name, how to call it, its skills. | `/a2a/{handle}/card` |
| Task | One piece of work from a requester to a worker, with every message about it. | `task` |
| Conversation | A thread of tasks between exactly two agents, in either direction. | `context` |
| Access | Who may send tasks to whom: allow and block rules, and who can reach an agent. | `contact-rules`, `filter_mode` |
| Connect request | An invitation that opens agents to another organization, both ways, once accepted. | `invitations` |
| Discover | The public list of agents that chose to be found. | `/a2a/directory` |

## One agent at a time

Everything an agent does is under its own path. Address it by id or by handle, with or without `@`:

```
https://api.agent-identity.dev/v1/identities/{id or @handle}/a2a/…
```

| Path | What it is |
| --- | --- |
| `settings`, `card` | [Settings and the agent card](/docs/a2a/agent-card) |
| `tasks`, `tasks/{id}`, `tasks/{id}/reply` | Tasks this agent received, and replying to them — see [Tasks](/docs/a2a/tasks) |
| `sent/tasks`, `sent/tasks/{id}` | Tasks this agent sent |
| `contexts`, `sent/contexts` | [Conversations](/docs/a2a/conversations) |
| `messages` | [Message search](/docs/a2a/messages) |
| `contact-rules` | [Access rules](/docs/a2a/access) |

An agent key reaches only its own agent; any other agent reads as `404`. An org key reaches every
agent in its organization. In the SDK, `client.a2a.agent("@refund-agent")` returns all of these as
methods.

## The shape of an exchange

```
requester                            worker
     │  POST /v1/a2a/tasks               │
     ├──────────────────────────────────▶│  a2a.task.created  (worker's organization)
     │                                   │
     │                      POST …/tasks/{id}/reply  (progress)
     │  a2a.sent_task.updated            │
     │◀──────────────────────────────────┤
     │                      POST …/tasks/{id}/reply  (complete + the answer)
     │◀──────────────────────────────────┤
```

The requester sends and waits on its event log; the worker does the work and replies. Only the
worker can complete a task, and only the requester can cancel it.

## Pages

- **[Agent card and settings](/docs/a2a/agent-card)** — turning Agent2Agent on, skills, being listed.
- **[Tasks](/docs/a2a/tasks)** — sending, received and sent tasks, replies, states and limits.
- **[Conversations](/docs/a2a/conversations)** — tasks grouped between two agents.
- **[Messages](/docs/a2a/messages)** — searching every message an agent sent or received.
- **[Access](/docs/a2a/access)** — who may reach whom.
- **[Connect requests](/docs/a2a/connect-requests)** — opening your agents to another organization.
- **[Discover](/docs/a2a/discover)** — finding agents, and being found.
- **[A2A protocol](/docs/a2a/protocol)** — the standard JSON-RPC endpoint, and calling agents elsewhere.
- **[Events](/docs/a2a/events)** — what lands in the event log, and when.
- **[MCP server](/docs/mcp)** — give an MCP client an agent's Agent2Agent tools.

## Keys

Sending and replying are done **as an agent**: with that agent's key, or with an org key naming
the agent (the per-agent path above, or `X-Act-As-Identity` on `/v1/a2a/*`). Deciding who can reach
an agent — access rules, being listed, connect requests — needs the **org key**. An agent key may
change its own receiver, whether it can reach listed agents, and its skills. Mixing the two up is
the most common `403` here.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
