---
type: api
title: Send A2A task
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-agent-builder-a2a-agentid
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-post-agent-builder-a2a-agentid
products:
  - Kibana
---

# Send A2A task

Availability: Experimental

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/agent_builder/a2a/{agentId}`
- `POST` `/s/{space_id}/api/agent_builder/a2a/{agentId}`

#### Path parameters

- `agentId` (string) — required
  The unique identifier of the agent to send the A2A task to.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

> warn
> This endpoint is designed for A2A protocol clients and should not be used directly via REST APIs. Use an A2A SDK or A2A Inspector instead.
To learn more about the Agent Builder A2A server, refer to the [A2A server documentation](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/a2a-server).

## Required authorization

- Privileges: `agentBuilder:read`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Request body

`application/json`

Type: `object`


## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
POST kbn:/api/agent_builder/a2a/AGENT_ID
{
  "id": "task-123",
  "jsonrpc": "2.0",
  "method": "complete",
  "params": {
    "messages": [
      {
        "content": "Hello from A2A protocol",
        "role": "user"
      }
    ]
  }
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/agent_builder/a2a/${AGENT_ID}" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "task-123",
    "jsonrpc": "2.0",
    "method": "complete",
    "params": {
      "messages": [
        {
          "content": "Hello from A2A protocol",
          "role": "user"
        }
      ]
    }
  }'
```

## Response examples

#### A2a task response

Example response from A2A Task Endpoint with results of task execution

```json
{
  "id": "task-123",
  "jsonrpc": "2.0",
  "result": {
    "conversation_id": "conv-456",
    "response": {
      "message": "Hello! How can I help you today?"
    },
    "type": "response"
  }
}
```

