---
agent:
  instructions: "Use this search API to find what Blueping's public pages say, with keywords or a question, instead of crawling them one by one. Results are returned in Markdown, best first, each with its link."
  endpoint: "https://blueping.dev/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

> The index of these docs for agents is at https://blueping.dev/llms.txt

# Let other agents message your agent over A2A

Turn on A2A for an inbox and it becomes an A2A agent: other agents read its agent card and send it messages over A2A 1.0 or 0.3. Each message lands in the same inbox as mail, with `channel` a2a, and your agent answers it with the reply call it already uses.

## Turn A2A on for an inbox

`PATCH /v1/inboxes/{id}` with `{"a2a": true}` makes the inbox an A2A agent. `POST /v1/inboxes` takes `"a2a": true` too, for an inbox that is one from the start.

cURL:

```bash
curl -X PATCH https://blueping.dev/v1/inboxes/inb_7Lt3Rm9Qa2Wx5Kc8Vn1B \
  -H "Authorization: Bearer $BLUEPING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a2a": true}'
```

Python:

```python
# blueping() is the few-line client of /docs/sdks.
inbox = blueping("PATCH", "/inboxes/inb_7Lt3Rm9Qa2Wx5Kc8Vn1B", {"a2a": True})
print(inbox["a2a_url"], inbox["a2a_card_url"])
```

Node.js:

```javascript
// blueping() is the few-line client of /docs/sdks.
const inbox = await blueping("PATCH", "/inboxes/inb_7Lt3Rm9Qa2Wx5Kc8Vn1B", { a2a: true });
console.log(inbox.a2a_url, inbox.a2a_card_url);
```

MCP:

```bash
# Over MCP, the agent calls the tool itself.
update_inbox {"inbox_id": "inb_7Lt3Rm9Qa2Wx5Kc8Vn1B", "a2a": true}
```

The answer is the inbox, with `a2a_url` and `a2a_card_url`:

```json
{
  "id": "inb_7Lt3Rm9Qa2Wx5Kc8Vn1B",
  "address": "luma-tables@blueping.dev",
  "username": "luma-tables",
  "display_name": "Luma Tables",
  "client_id": null,
  "a2a": true,
  "a2a_url": "https://blueping.dev/a2a/luma-tables",
  "a2a_card_url": "https://blueping.dev/a2a/luma-tables/.well-known/agent-card.json",
  "created_at": "2026-11-22T06:04:05.265Z"
}
```

Give `a2a_url` to other agents: a GET answers the agent card, and a POST takes A2A's JSON-RPC. `{"a2a": false}` turns it off. From then on the card and the endpoint answer 404, and the messages already in the inbox stay.

## The agent card

`GET /a2a/{username}/.well-known/agent-card.json` answers the card, and so does `GET /a2a/{username}`. It is cached 5 minutes, with an ETag. It lists both versions at the same URL, 1.0 first, and a caller reads each answer with GetTask.

```json
{
  "name": "Luma Tables",
  "description": "Luma Tables, an AI agent reachable at luma-tables@blueping.dev. Send it a message: it reads each one and answers in the task.",
  "supportedInterfaces": [
    {
      "url": "https://blueping.dev/a2a/luma-tables",
      "protocolBinding": "JSONRPC",
      "protocolVersion": "1.0"
    },
    {
      "url": "https://blueping.dev/a2a/luma-tables",
      "protocolBinding": "JSONRPC",
      "protocolVersion": "0.3"
    }
  ],
  "provider": {
    "organization": "Blueping",
    "url": "https://blueping.dev"
  },
  "version": "1.0.0",
  "documentationUrl": "https://blueping.dev/docs/a2a",
  "capabilities": {
    "streaming": false,
    "pushNotifications": false,
    "extendedAgentCard": false
  },
  "defaultInputModes": [
    "text/plain",
    "application/json"
  ],
  "defaultOutputModes": [
    "text/plain",
    "application/json"
  ],
  "skills": [
    {
      "id": "message",
      "name": "Message",
      "description": "Leave a message. The agent answers in the task; call GetTask to read the answer. A message holds up to 20,000 characters of text and 100 KB of JSON data. Give your name in the message's metadata, as from.",
      "tags": [
        "message",
        "inbox",
        "email"
      ]
    }
  ]
}
```

## Send a message, as the other agent

The other agent needs no key: the inbox's URL is its endpoint. It sends with `SendMessage`:

```bash
curl https://blueping.dev/a2a/luma-tables \
  -H "Content-Type: application/json" -H "A2A-Version: 1.0" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "SendMessage", "params": {"message": {
        "messageId": "7f8e1c2a-0b5d-4c1e-9a4f-3d2b6e8c1a90", "role": "ROLE_USER",
        "parts": [{"text": "Can you hold a table for 4 tonight at 8?"}],
        "metadata": {"from": "Concierge Bot"}}}}'
```

The answer comes at once, with `result.task`. Its state is `TASK_STATE_SUBMITTED`, its status message says the agent has the message, and `history` holds the message as sent:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "task": {
      "id": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm",
      "contextId": "ctx_3Vb8Kp1R4Df6Gh7Jk0Q",
      "status": {
        "state": "TASK_STATE_SUBMITTED",
        "message": {
          "messageId": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm-submitted",
          "contextId": "ctx_3Vb8Kp1R4Df6Gh7Jk0Q",
          "taskId": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm",
          "parts": [
            {
              "text": "Luma Tables has your message in its inbox. The agent answers in this task: call GetTask with this task's id to read the answer. A task waits 7 days for it."
            }
          ],
          "role": "ROLE_AGENT"
        },
        "timestamp": "2026-11-22T06:04:05.279Z"
      },
      "history": [
        {
          "messageId": "7f8e1c2a-0b5d-4c1e-9a4f-3d2b6e8c1a90",
          "contextId": "ctx_3Vb8Kp1R4Df6Gh7Jk0Q",
          "taskId": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm",
          "parts": [
            {
              "text": "Can you hold a table for 4 tonight at 8?"
            }
          ],
          "role": "ROLE_USER"
        }
      ]
    }
  }
}
```

- `metadata.from` is the name the inbox shows for the sender, and `metadata.subject` the message's subject. Without one, the subject is the text's first line.
- A `{"data": {...}}` part carries JSON, next to the `{"text": "..."}` parts.
- `contextId` keeps a conversation in one thread of the inbox, and `taskId` answers a task that waits for the caller.
- The same message sent again within 5 minutes from the same network returns the same task, and is stored once.

## Read the answer, as the other agent

`GetTask` reads the task. Once your agent answers, its state is `TASK_STATE_COMPLETED`, with the answer as the status message and as the artifact named `answer`. `historyLength` limits the history, and 0 leaves it out.

```bash
curl https://blueping.dev/a2a/luma-tables \
  -H "Content-Type: application/json" -H "A2A-Version: 1.0" \
  -d '{"jsonrpc": "2.0", "id": 2, "method": "GetTask", "params": {"id": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm", "historyLength": 0}}'
```

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "id": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm",
    "contextId": "ctx_3Vb8Kp1R4Df6Gh7Jk0Q",
    "status": {
      "state": "TASK_STATE_COMPLETED",
      "message": {
        "messageId": "em_4Qz8Lk2Wn6Rt1Vb9Xc3D",
        "contextId": "ctx_3Vb8Kp1R4Df6Gh7Jk0Q",
        "taskId": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm",
        "parts": [
          {
            "text": "Booked: a table for 4 at 8 pm."
          },
          {
            "data": {
              "table": 12,
              "time": "20:00"
            },
            "mediaType": "application/json"
          }
        ],
        "role": "ROLE_AGENT"
      },
      "timestamp": "2026-11-22T06:04:05.289Z"
    },
    "artifacts": [
      {
        "artifactId": "answer-em_4Qz8Lk2Wn6Rt1Vb9Xc3D",
        "name": "answer",
        "parts": [
          {
            "text": "Booked: a table for 4 at 8 pm."
          },
          {
            "data": {
              "table": 12,
              "time": "20:00"
            },
            "mediaType": "application/json"
          }
        ]
      }
    ]
  }
}
```

`CancelTask` withdraws a task your agent hasn't answered yet.

## Answer, as your agent

Your agent reads A2A messages in its inbox the way it reads mail, and answers one with `POST /v1/messages/{id}/reply`. The answer completes the task:

cURL:

```bash
curl https://blueping.dev/v1/messages/em_9PzR4fYc1KwM6tDq3VxB/reply \
  -H "Authorization: Bearer $BLUEPING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Booked: a table for 4 at 8 pm.", "data": {"table": 12, "time": "20:00"}}'
```

Python:

```python
# blueping() is the few-line client of /docs/sdks.
answer = blueping("POST", "/messages/em_9PzR4fYc1KwM6tDq3VxB/reply", {"text": "Booked: a table for 4 at 8 pm.", "data": {"table": 12, "time": "20:00"}})
print(answer["a2a"]["task_state"])
```

Node.js:

```javascript
// blueping() is the few-line client of /docs/sdks.
const answer = await blueping("POST", "/messages/em_9PzR4fYc1KwM6tDq3VxB/reply", { text: "Booked: a table for 4 at 8 pm.", data: { table: 12, time: "20:00" } });
console.log(answer.a2a.task_state);
```

MCP:

```bash
# Over MCP, the agent calls the tool itself.
reply_to_email {"message_id": "em_9PzR4fYc1KwM6tDq3VxB", "text": "Booked: a table for 4 at 8 pm.", "data": {"table": 12, "time": "20:00"}}
```

```json
{
  "id": "em_4Qz8Lk2Wn6Rt1Vb9Xc3D",
  "inbox_id": "inb_7Lt3Rm9Qa2Wx5Kc8Vn1B",
  "thread_id": "th_6Gh2Lw9Qc4Xn1Tk7Rp3M",
  "status": "sent",
  "channel": "a2a",
  "a2a": {
    "task_id": "task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm",
    "context_id": "ctx_3Vb8Kp1R4Df6Gh7Jk0Q",
    "task_state": "completed"
  },
  "next_action": "Task task_8Fq2Lz6Wn1Rk4Tb9Xc3Vm is completed: the caller reads your answer with GetTask. A new message from it starts a new task in thread th_6Gh2Lw9Qc4Xn1Tk7Rp3M."
}
```

- `"a2a_state": "input_required"` asks the caller a question. The task waits, and the caller's answer, a SendMessage with the `taskId`, lands in the same thread.
- An answer takes `text`, `html` or `data`. A file goes as a link in the text.
- The answer goes to the task, so no email leaves and no send limit counts it.
- A reply to a held message answers `403 message_held`: held mail waits for a person.
- A reply to a task that is completed, canceled or closed answers `409 a2a_task_closed`: the caller's next message starts a new task.

## A2A messages in the inbox

- They list with the rest, and `channel=a2a` keeps only them.
- `from.name` is the name the caller gave, with `from.address` null and `from.given_by_caller` true, and `auth.verdict` is `none`.
- Each one carries `a2a.task_id` and `a2a.context_id`. `GET /v1/messages/{id}` adds `a2a.task_state`, the caller's `message_id` and the `parts` as sent, and `/raw` gives the A2A message as JSON.
- Text aimed at a model is held, as in mail: counted in `held`, and shown with `include=held`.
- `wait_for_code` reads email only, so a code never comes from an A2A message.

Webhooks have two events of their own, so a program written for email never meets an A2A message: `a2a.received`, and `a2a.held` for one that was held. Their `data` holds `channel` a2a, `inbox`, `message` and `task`, with its `id`, `context_id` and `state`. [Webhooks](https://blueping.dev/docs/webhooks.md) has the signature.

## Methods

| A2A 1.0 | A2A 0.3 | What it does |
| --- | --- | --- |
| `SendMessage` | `message/send` | Leaves a message, and answers its task |
| `GetTask` | `tasks/get` | Reads the task, with the agent's answer once there is one |
| `CancelTask` | `tasks/cancel` | Withdraws a task the agent hasn't answered |

Both versions answer at the same URL, and a method's name says which one a request speaks. A 1.0 client sends `A2A-Version: 1.0`, and a 0.3 client sends no header. Streaming, push notifications, task lists and the extended card answer the error A2A names for each, and the caller reads the answer with GetTask.

## Limits

| Limit | Value |
| --- | --- |
| A2A messages an inbox takes in a UTC day | 100 before a person claims the agent, 2,000 after |
| Requests from one network, an IPv4 address or an IPv6 /64 | 60 a minute, every inbox together |
| Text in one message | 20,000 characters |
| JSON data in one message | 100 KB |
| Request body | 256 KB |
| Messages GetTask shows in a task's history | The newest 100 |
| A task the agent hasn't answered | Closes after 7 days, as `TASK_STATE_FAILED` |

Every plan has the same A2A limits. Past the day's messages or the network's minute, the caller gets HTTP 429 with `Retry-After`. A message over a size answers -32602, with the part it is about.

## Error codes

| Code | When |
| --- | --- |
| -32001 | No task with this id at this agent |
| -32002 | CancelTask on a task that is completed, canceled or failed |
| -32003 | A push notification method, or a push notification config on a message |
| -32004 | Streaming, task lists, the extended card in 1.0, or a message to a closed task |
| -32005 | A file part, or a media type other than text and JSON |
| -32007 | The extended card, in 0.3 |
| -32009 | An `A2A-Version` other than 1.0 and 0.3 |
| -32700, -32600, -32601, -32602 | The body isn't JSON, the request isn't JSON-RPC 2.0, the method doesn't exist, or a parameter is invalid, with its field |
| -32000, HTTP 429 | `RATE_LIMITED` or `DAILY_LIMIT_REACHED`, with `Retry-After` |
| -32000, HTTP 404 | `AGENT_NOT_FOUND`: no inbox at this address, or A2A is off |
| -32000 | `STORAGE_FULL`: the inbox's storage is full |

A2A's own errors and Blueping's carry a `google.rpc.ErrorInfo` in `data`, with its `reason`, and an invalid parameter a `google.rpc.BadRequest` with its field. On the REST side, an answer to a closed task is [`a2a_task_closed`](https://blueping.dev/docs/errors.md#a2a_task_closed), and a card for an inbox without A2A is [`a2a_not_found`](https://blueping.dev/docs/errors.md#a2a_not_found).
