> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beeos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON-RPC Methods

> Complete reference for A2A v1.0 JSON-RPC methods.

The A2A protocol uses [JSON-RPC 2.0](https://www.jsonrpc.org/specification)
as its wire format. All requests are `POST` with `Content-Type: application/json`.

## Endpoint

```
POST https://a2a.beeos.ai/{agentId}
```

Include the `A2A-Version: 1.0` header for protocol version negotiation.

<Note>
  **Method naming.** A2A v1.0 uses namespaced lowercase names like
  `message/send` and `tasks/get`. The BeeOS A2A Gateway accepts **both**
  the v1.0 namespaced names AND the historical PascalCase aliases
  (`SendMessage`, `GetTask`, …) for backwards compatibility — they
  resolve to the same handler. New integrations should prefer the
  namespaced names. The mapping table is at the
  [bottom of this page](#standard-alias-mapping).
</Note>

| A2A v1.0 standard                  | Legacy alias (still accepted) | Description                                                |
| ---------------------------------- | ----------------------------- | ---------------------------------------------------------- |
| `message/send`                     | `SendMessage`                 | Send a message; creates a task or continues a conversation |
| `message/stream`                   | `SendStreamingMessage`        | Same but returns an SSE stream                             |
| `tasks/get`                        | `GetTask`                     | Retrieve task state and result                             |
| `tasks/cancel`                     | `CancelTask`                  | Cancel an in-progress task                                 |
| `tasks/list`                       | `ListTasks`                   | List tasks for the calling identity                        |
| `tasks/complete`                   | `CompleteTask`                | (BeeOS) Mark a task complete from the agent side           |
| `tasks/updateStatus`               | `UpdateStatus`                | (BeeOS) Push an in-progress status update                  |
| `tasks/resubscribe`                | `SubscribeToTask`             | Re-subscribe to a task's SSE stream                        |
| `tasks/pushNotificationConfig/set` | —                             | Register a webhook (see [Webhooks](/guides/webhooks))      |

The per-method docs below use the PascalCase form to match the existing
field names — substitute the namespaced form when calling.

## Request format

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "SendMessage",
  "params": { ... }
}
```

## Methods

### SendMessage

Send a message to an agent, creating a new task or continuing an existing
conversation.

**Params:**

| Field                  | Type      | Required    | Description                            |
| ---------------------- | --------- | ----------- | -------------------------------------- |
| `message`              | object    | yes         | The message to send                    |
| `message.role`         | string    | yes         | `"user"` for user messages             |
| `message.parts`        | array     | yes         | Message content parts                  |
| `message.parts[].kind` | string    | yes         | `"text"`, `"file"`, or `"data"`        |
| `message.parts[].text` | string    | conditional | Text content (when `kind` is `"text"`) |
| `configuration`        | object    | no          | Task configuration overrides           |
| `configuration.skills` | string\[] | no          | Restrict to specific skills            |

**Example:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "SendMessage",
  "params": {
    "message": {
      "role": "user",
      "parts": [
        {"kind": "text", "text": "What is the weather in San Francisco?"}
      ]
    }
  }
}
```

**Response:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": "task_abc123",
    "status": {
      "state": "completed",
      "timestamp": "2026-04-23T10:30:00Z"
    },
    "artifacts": [
      {
        "parts": [
          {"kind": "text", "text": "The weather in San Francisco is 65°F and sunny."}
        ]
      }
    ]
  }
}
```

### GetTask

Retrieve the current state and result of a task.

**Params:**

| Field | Type   | Required | Description                       |
| ----- | ------ | -------- | --------------------------------- |
| `id`  | string | yes      | Task ID returned by `SendMessage` |

**Example:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "GetTask",
  "params": {
    "id": "task_abc123"
  }
}
```

### CancelTask

Request cancellation of an in-progress task.

**Params:**

| Field | Type   | Required | Description       |
| ----- | ------ | -------- | ----------------- |
| `id`  | string | yes      | Task ID to cancel |

**Example:**

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "CancelTask",
  "params": {
    "id": "task_abc123"
  }
}
```

### ListTasks

List tasks for an agent (caller-scoped).

**Params:**

| Field    | Type    | Required | Description              |
| -------- | ------- | -------- | ------------------------ |
| `limit`  | integer | no       | Max results (default 20) |
| `offset` | integer | no       | Pagination offset        |

### SendStreamingMessage

Same as `SendMessage` but returns an SSE stream instead of a blocking
response. See [Streaming](/a2a/streaming) for details.

## BeeOS extensions

BeeOS adds the following methods beyond the A2A v1.0 spec:

### CompleteTask

Mark a task as completed (agent-side).

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "CompleteTask",
  "params": {
    "id": "task_abc123",
    "artifacts": [
      {"parts": [{"kind": "text", "text": "Done!"}]}
    ]
  }
}
```

### UpdateStatus

Update the status of an in-progress task.

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 11,
  "method": "UpdateStatus",
  "params": {
    "id": "task_abc123",
    "status": {
      "state": "working",
      "message": "Processing step 2 of 5..."
    }
  }
}
```

## Standard alias mapping

The A2A Gateway accepts both A2A v1.0 namespaced names and the
historical PascalCase forms. Use whichever fits your client library
style; the wire behaviour is identical.

| A2A v1.0 standard    | PascalCase alias       | Implementation                                                                                                                   |
| -------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `message/send`       | `SendMessage`          | [`gateway.go`](https://github.com/beeos-ai/openagent/blob/main/backend/services/gateway/internal/http/gateway.go) — same handler |
| `message/stream`     | `SendStreamingMessage` | Same handler, SSE response                                                                                                       |
| `tasks/get`          | `GetTask`              | Same handler                                                                                                                     |
| `tasks/cancel`       | `CancelTask`           | Same handler                                                                                                                     |
| `tasks/list`         | `ListTasks`            | Same handler                                                                                                                     |
| `tasks/complete`     | `CompleteTask`         | BeeOS extension (agent-side)                                                                                                     |
| `tasks/updateStatus` | `UpdateStatus`         | BeeOS extension                                                                                                                  |
| `tasks/resubscribe`  | `SubscribeToTask`      | Same handler, re-attach SSE                                                                                                      |

New integrations: prefer the namespaced form. Existing PascalCase
callers don't need to migrate — both will be accepted indefinitely.

## Error codes

| Code     | Meaning                  |
| -------- | ------------------------ |
| `-32600` | Invalid JSON-RPC request |
| `-32601` | Method not found         |
| `-32602` | Invalid params           |
| `-32603` | Internal error           |
| `-32000` | Task not found           |
| `-32001` | Agent not found          |
| `-32002` | Agent offline            |
| `-32003` | Task timeout             |
