List conversations Added in 9.2.0

GET /api/agent_builder/conversations

Spaces method and path for this operation:

get /s/{space_id}/api/agent_builder/conversations

Refer to 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.

[Required authorization] Route required privileges: agentBuilder:read.

Query parameters

  • agent_id string

    Optional agent ID to filter conversations by a specific agent.

    Maximum length is 64.

  • page number

    Page number, 1-based.

    Minimum value is 1. Default value is 1.

  • per_page number

    Number of results per page. Maximum 1000.

    Minimum value is 1, maximum value is 1000. Default value is 1000.

  • sort_order string

    Sort direction for results, ordered by updated_at.

    Values are asc or desc. Default value is desc.

  • pinned boolean

    Filter to pinned (true) or unpinned (false) conversations. Omit to return all.

Responses

  • 200 application/json

    Indicates a successful response

GET /api/agent_builder/conversations
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 \
  -X GET "${KIBANA_URL}/api/agent_builder/conversations?pinned=true" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "elastic-api-version: 2023-10-31"
GET kbn://api/agent_builder/conversations?page=1&sort_order=desc
Response examples (200)
Example response filtered to pinned conversations only
{
  "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"
      }
    }
  ]
}
Example response returning the first page of conversations for all agents
{
  "pagination": {
    "page": 1,
    "per_page": 1000,
    "total": 128
  },
  "results": [
    {
      "agent_id": "elastic-ai-agent",
      "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"
      }
    }
  ]
}