---
type: api
title: List conversations
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-get-agent-builder-conversations
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-get-agent-builder-conversations
products:
  - Kibana
---

# List conversations

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

## Paths

- `GET` `/api/agent_builder/conversations`
- `GET` `/s/{space_id}/api/agent_builder/conversations`

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

## Description

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

List all conversations for a user. Use the optional agent ID to filter conversations by a specific agent. To learn more about agent conversations, refer to the [agent chat documentation](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/chat).<br/><br/>[Required authorization] Route required privileges: agentBuilder:read.

## Query String Parameters

- `agent_id` (string · max: 64)
  Optional agent ID to filter conversations by a specific agent.
- `page` (number · min: 1 · default: 1)
  Page number, 1-based.
- `per_page` (number · min: 1 · max: 1000 · default: 1000)
  Number of results per page. Maximum 1000.
- `sort_order` (enum  · default: desc)
  Sort direction for results, ordered by updated_at.
  Values: `asc`, `desc`
- `pinned` (boolean)
  Filter to pinned (true) or unpinned (false) conversations. Omit to return all.

## Response

Indicates a successful response

## Code Examples

#### Console

```console
GET kbn://api/agent_builder/conversations?page=1&sort_order=desc
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/agent_builder/conversations?page=1&sort_order=desc" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "elastic-api-version: 2023-10-31"
```

#### curl

```curl
curl \
  -X GET "${KIBANA_URL}/api/agent_builder/conversations?pinned=true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "elastic-api-version: 2023-10-31"
```

## Response Examples

#### List conversations pinned

Example response filtered to pinned conversations only

```json
{
  "pagination": {
    "page": 1,
    "per_page": 1000,
    "total": 3
  },
  "results": [
    {
      "agent_id": "elastic-ai-agent",
      "created_at": "2025-08-01T10:00:00.000Z",
      "id": "a1b2c3d4-1234-5678-abcd-000000000001",
      "permissions": {
        "delete": true,
        "rename": true
      },
      "pinned": true,
      "title": "Important reference conversation",
      "updated_at": "2025-09-20T08:30:00.000Z",
      "user": {
        "username": "elastic"
      }
    }
  ]
}
```

#### List conversations response

Example response returning the first page of conversations for all agents

```json
{
  "pagination": {
    "page": 1,
    "per_page": 1000,
    "total": 128
  },
  "results": [
    {
      "agent_id": "elastic-ai-agent",
      "attachments": [
        {
          "id": "6f1c0f1e-6c2a-4a0a-9a1e-2f2b1c7d4e11",
          "type": "text"
        },
        {
          "id": "2b9d7c53-0b8e-4a77-9f0c-91a5d6c3b208",
          "type": "esql"
        }
      ],
      "created_at": "2025-09-19T17:45:39.554Z",
      "id": "bcc176c5-38f6-40be-be0c-898e34fa1480",
      "permissions": {
        "delete": true,
        "rename": true
      },
      "title": "General Greeting",
      "updated_at": "2025-09-19T17:45:39.554Z",
      "user": {
        "username": "elastic"
      }
    }
  ]
}
```

