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

# List Conversations

> Retrieves the conversations for the given agent ID.

<Callout icon="flask-conical" color="#14b8a6">
  This is a **beta feature** according to [Algolia's Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/).
</Callout>

**Required ACL:** `logs`


## OpenAPI

````yaml specs/agent-studio.yml get /1/agents/{agentId}/conversations
openapi: 3.1.0
info:
  title: Agent Studio API
  description: >
    The Agent Studio API lets you build and operate generative AI agents that
    use Algolia data, tools, and your chosen LLM provider.


    Use it to create, configure, publish, and update agents, then generate chat
    completions grounded in live data from your Algolia indices. You can manage
    LLM providers, Agent Studio tools, conversations, feedback, secret keys,
    user data, caching, and application settings for your AI experiences.


    ## Client libraries


    Use Algolia's API clients and libraries to reliably integrate Algolia's APIs
    with your apps.


    For more information, see [Algolia's
    ecosystem](https://www.algolia.com/doc/libraries).


    ## Base URL


    Base URL for the Agent Studio API:


    - `https://{APPLICATION_ID}.algolia.net/agent-studio`


    **All requests must use HTTPS.**


    ## Authentication


    Add these headers to authenticate requests:


    - `x-algolia-application-id`. Your Algolia application ID.

    - `x-algolia-api-key`. An API key with the necessary permissions to make the
    request.
      The required access control list (ACL) to make a request is listed in each endpoint's reference.

    You can find your application ID and API key in the [Algolia
    dashboard](https://dashboard.algolia.com/account/api-keys).


    ## Request format


    Request bodies must be JSON objects.


    ## Response status and errors


    The Agent Studio API returns JSON responses. Since JSON doesn't guarantee
    any specific ordering, don't rely on the order of attributes in the API
    response.


    Successful responses return `2xx` statuses. Client errors return `4xx`
    statuses. Server errors return `5xx` statuses.

    Error responses have a `message` property with more information.


    ## Version


    The current version of the Agent Studio API is version 1, indicated by the
    `/1/` in each endpoint's URL.
  version: 0.1.0
servers:
  - url: https://{APPLICATION_ID}.algolia.net/agent-studio
    description: Agent Studio API.
    variables:
      APPLICATION_ID:
        default: EXAMPLE
        description: Your Algolia application ID.
security:
  - appId: []
    apiKey: []
tags:
  - name: Agents
    description: Manage your agents.
  - name: Allowed Domains
    description: Restrict where an agent's API key may be used.
  - name: Completions
    description: Generate completions.
  - name: Configurations
    description: Manage Agent Studio related application configurations.
  - name: Conversations
    description: View, export, and delete conversation history.
  - name: Feedback
    description: Capture user feedback on agent responses.
  - name: Internal
    description: Endpoints that are needed for internal or integration logic.
  - name: Providers
    description: Manage your LLM providers.
  - name: Secret Keys
    description: Manage secret keys used to authenticate requests.
  - name: User Data
    description: Manage end-user data associated with conversations.
paths:
  /1/agents/{agentId}/conversations:
    get:
      tags:
        - Conversations
      summary: List Conversations
      description: Retrieves the conversations for the given agent ID.
      operationId: listAgentConversations
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/AgentIdUnion'
          description: The agentId.
        - name: endDate
          in: query
          required: false
          schema:
            oneOf:
              - type: string
              - type: 'null'
            description: >-
              Filter conversations created before this date (format:
              YYYY-MM-DD).
            title: enddate
          description: 'Filter conversations created before this date (format: YYYY-MM-DD).'
        - name: feedbackVote
          in: query
          required: false
          schema:
            oneOf:
              - type: integer
                maximum: 1
                minimum: 0
              - type: 'null'
            description: Filter by feedback value (requires includeFeedback=true).
            title: feedbackvote
          description: Filter by feedback value (requires includeFeedback=true).
        - name: includeFeedback
          in: query
          required: false
          schema:
            oneOf:
              - type: boolean
              - type: 'null'
            description: Include feedback per conversation.
            default: false
            title: includefeedback
          description: Include feedback per conversation.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Items per page.
            default: 20
            title: limit
          description: Items per page.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number.
            default: 1
            title: page
          description: Page number.
        - name: startDate
          in: query
          required: false
          schema:
            oneOf:
              - type: string
              - type: 'null'
            description: 'Filter conversations created after this date (format: YYYY-MM-DD).'
            title: startdate
          description: 'Filter conversations created after this date (format: YYYY-MM-DD).'
        - name: X-Algolia-Secure-User-Token
          in: header
          required: false
          schema:
            oneOf:
              - type: string
              - type: 'null'
            title: x-Algolia-Secure-User-Token
          description: The X-Algolia-Secure-User-Token.
      responses:
        '200':
          description: Successful Response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedConversationsResponse'
        '422':
          description: Validation Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: csharp
          label: C#
          source: >-
            // Initialize the client

            var client = new AgentStudioClient(
              new AgentStudioConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY")
            );


            // Call the API

            var response = await
            client.ListAgentConversationsAsync("76710f1b-8231-42e5-b0d1-f43aac618e15");


            // print the response

            Console.WriteLine(response);
        - lang: dart
          label: Dart
          source: |-
            // Initialize the client
            final client = AgentStudioClient(
                appId: 'ALGOLIA_APPLICATION_ID', apiKey: 'ALGOLIA_API_KEY');

            // Call the API
            final response = await client.listAgentConversations(
              agentId: "76710f1b-8231-42e5-b0d1-f43aac618e15",
            );

            // print the response
            print(response);
        - lang: go
          label: Go
          source: >-
            // Initialize the client

            client, err := agentStudio.NewClient("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY")

            if err != nil {
              // The client can fail to initialize if you pass an invalid parameter.
              panic(err)
            }


            // Call the API

            response, err :=
            client.ListAgentConversations(client.NewApiListAgentConversationsRequest(
              "76710f1b-8231-42e5-b0d1-f43aac618e15"))
            if err != nil {
              // handle the eventual error
              panic(err)
            }



            // print the response

            print(response)
        - lang: java
          label: Java
          source: >-
            // Initialize the client

            AgentStudioClient client = new
            AgentStudioClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");


            // Call the API

            PaginatedConversationsResponse response =
            client.listAgentConversations("76710f1b-8231-42e5-b0d1-f43aac618e15");


            // print the response

            System.out.println(response);
        - lang: javascript
          label: JavaScript
          source: >-
            // Initialize the client

            const client = agentStudioClient('ALGOLIA_APPLICATION_ID',
            'ALGOLIA_API_KEY');


            // Call the API

            const response = await client.listAgentConversations({ agentId:
            '76710f1b-8231-42e5-b0d1-f43aac618e15' });



            // print the response

            console.log(response);
        - lang: kotlin
          label: Kotlin
          source: >-
            // Initialize the client

            val client = AgentStudioClient(appId = "ALGOLIA_APPLICATION_ID",
            apiKey = "ALGOLIA_API_KEY")


            // Call the API

            var response = client.listAgentConversations(agentId =
            "76710f1b-8231-42e5-b0d1-f43aac618e15")



            // print the response

            println(response)
        - lang: php
          label: PHP
          source: >-
            // Initialize the client

            $client = AgentStudioClient::create('ALGOLIA_APPLICATION_ID',
            'ALGOLIA_API_KEY');


            // Call the API

            $response = $client->listAgentConversations(
                '76710f1b-8231-42e5-b0d1-f43aac618e15',
            );



            // print the response

            var_dump($response);
        - lang: python
          label: Python
          source: >-
            # Initialize the client

            # In an asynchronous context, you can use AgentStudioClient instead,
            which exposes the exact same methods.

            client = AgentStudioClientSync("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY")


            # Call the API

            response = client.list_agent_conversations(
                agent_id="76710f1b-8231-42e5-b0d1-f43aac618e15",
            )



            # print the response

            print(response)
        - lang: ruby
          label: Ruby
          source: >-
            # Initialize the client

            client = Algolia::AgentStudioClient.create("ALGOLIA_APPLICATION_ID",
            "ALGOLIA_API_KEY")


            # Call the API

            response =
            client.list_agent_conversations("76710f1b-8231-42e5-b0d1-f43aac618e15")



            # print the response

            puts(response)
        - lang: scala
          label: Scala
          source: >-
            // Initialize the client

            val client = AgentStudioClient(appId = "ALGOLIA_APPLICATION_ID",
            apiKey = "ALGOLIA_API_KEY")


            // Call the API

            val response = Await.result(
              client.listAgentConversations(
                agentId = "76710f1b-8231-42e5-b0d1-f43aac618e15"
              ),
              Duration(100, "sec")
            )


            // print the response

            println(response)
        - lang: swift
          label: Swift
          source: >-
            // Initialize the client

            let client = try AgentStudioClient(appID: "ALGOLIA_APPLICATION_ID",
            apiKey: "ALGOLIA_API_KEY")


            // Call the API

            let response = try await client.listAgentConversations(agentId:
            "76710f1b-8231-42e5-b0d1-f43aac618e15")


            // print the response

            print(response)
        - lang: cURL
          label: curl
          source: |-
            curl --request GET \
              --url 'https://example.algolia.net/agent-studio/1/agents/lorem/conversations?startDate=lorem&endDate=lorem&includeFeedback=true&feedbackVote=0&page=1&limit=20' \
              --header 'accept: application/json' \
              --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
              --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
              --header 'x-algolia-secure-user-token: lorem'
components:
  schemas:
    AgentIdUnion:
      oneOf:
        - type: string
        - const: test
          type: string
    PaginatedConversationsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ConversationBaseResponse'
          type: array
          title: data
        pagination:
          $ref: '#/components/schemas/PaginationMetadata'
      type: object
      required:
        - data
        - pagination
      title: paginatedConversationsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: detail
      type: object
      title: hTTPValidationError
    ConversationBaseResponse:
      properties:
        agentId:
          type: string
          title: agentid
        createdAt:
          type: string
          title: createdat
        id:
          type: string
          title: id
        updatedAt:
          type: string
          title: updatedat
        conversationMetadata:
          oneOf:
            - $ref: '#/components/schemas/ConversationMetadata'
            - type: 'null'
        feedback:
          $ref: '#/components/schemas/FeedbackUnion'
        isFromDashboard:
          type: boolean
          title: isfromdashboard
          default: false
        lastActivityAt:
          oneOf:
            - type: string
            - type: 'null'
          title: lastactivityat
        messageCount:
          type: integer
          title: messagecount
          default: 0
        title:
          oneOf:
            - type: string
            - type: 'null'
          title: title
        totalInputTokens:
          type: integer
          title: totalinputtokens
          default: 0
        totalOutputTokens:
          type: integer
          title: totaloutputtokens
          default: 0
        totalTokens:
          type: integer
          title: totaltokens
          default: 0
        userToken:
          oneOf:
            - type: string
            - type: 'null'
          title: usertoken
      type: object
      required:
        - id
        - agentId
        - createdAt
        - updatedAt
      title: conversationBaseResponse
      description: Lightweight response model without its messages.
    PaginationMetadata:
      properties:
        limit:
          type: integer
          title: limit
        page:
          type: integer
          title: page
        totalCount:
          type: integer
          title: totalcount
        totalPages:
          type: integer
          title: totalpages
      type: object
      required:
        - page
        - limit
        - totalCount
        - totalPages
      title: paginationMetadata
    ValidationError:
      properties:
        loc:
          items:
            $ref: '#/components/schemas/LocationItemUnion'
          type: array
          title: location
        msg:
          type: string
          title: message
        type:
          type: string
          title: errorType
        ctx:
          type: object
          title: context
        input:
          title: input
      type: object
      required:
        - loc
        - msg
        - type
      title: validationError
    ConversationMetadata:
      properties:
        cachedAt:
          oneOf:
            - type: string
            - type: 'null'
          title: cachedat
      type: object
      title: conversationMetadata
      description: Public metadata exposed on conversation responses.
    FeedbackUnion:
      oneOf:
        - items:
            $ref: '#/components/schemas/FeedbackResponse'
          type: array
        - type: 'null'
    LocationItemUnion:
      oneOf:
        - type: string
        - type: integer
    FeedbackResponse:
      properties:
        agentId:
          type: string
          title: agentid
        createdAt:
          type: string
          title: createdat
        id:
          type: string
          title: id
        messageId:
          type: string
          title: messageid
        tags:
          items:
            type: string
          type: array
          title: tags
        updatedAt:
          type: string
          title: updatedat
        vote:
          type: integer
          title: vote
        model:
          oneOf:
            - type: string
            - type: 'null'
          title: model
        notes:
          oneOf:
            - type: string
            - type: 'null'
          title: notes
      type: object
      required:
        - id
        - agentId
        - messageId
        - vote
        - tags
        - createdAt
        - updatedAt
      title: feedbackResponse
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-algolia-application-id
      description: Your Algolia application ID.
    apiKey:
      type: apiKey
      in: header
      name: x-algolia-api-key
      description: >
        Your Algolia API key with the necessary permissions to make the request.

        Permissions are controlled through access control lists (ACL) and access
        restrictions.

        The required ACL to make a request is listed in each endpoint's
        reference.

````