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

# Send A2A task

Availability: 9.2+

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

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `agentId` (string)
  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).<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.

## Request Body

`application/json`

Type: `object`


## Response

Indicates a successful response

## Code Examples

#### Console

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

#### curl

```curl
curl -X POST "https://{kibana_url}/api/agent_builder/a2a/{agentId}" \
  -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"
  }
}
```

