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

# Get All Assistants

Retrieves a paginated list of all assistants with optional filtering criteria using the Rapida API.

<Info>
  For more authentication options, see: [https://doc.rapida.ai/api-reference/authentication](https://doc.rapida.ai/api-reference/authentication)
</Info>

### Parameters

<ParamField body="connectionConfig" type="ConnectionConfig" required>
  Configuration for the client connection.
</ParamField>

<ParamField body="request" type="GetAllAssistantRequest" required>
  <Expandable>
    <ParamField body="paginate" type="Paginate" required>
      Pagination configuration for the request.

      <Expandable>
        <ParamField body="page" type="uint32" required>
          The page number to retrieve (0-based indexing).
        </ParamField>

        <ParamField body="pageSize" type="uint32" required>
          Number of assistants to return per page.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="criterias" type="Criteria[]" optional>
      Optional array of filtering criteria to apply to the assistant search.

      <Expandable>
        <ParamField body="key" type="string" required>
          The field name to filter by.
        </ParamField>

        <ParamField body="value" type="string" required>
          The value to match against the specified key.
        </ParamField>

        <ParamField body="logic" type="string" required>
          The logic operator for the criteria. Accepted values: "should" | "must"
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

### Usage

<CodeGroup>
  ```python Python theme={null}
  from rapida import (
      ConnectionConfig,
      GetAllAssistantRequest,
      get_all_assistant,
  )
  from pprint import pprint

  connection_config = ConnectionConfig.default_connection_config(
      ConnectionConfig.with_sdk("{rapida-api-key}")
  )
  response = get_all_assistant(
      client_cfg=connection_config,
      request=GetAllAssistantRequest(
          paginate=Paginate(page=0, pageSize=20),
          # criterias=[Criteria(key="KEY", value="VALUE", logic="should")],
      ),
  )
  pprint(response)
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"os"

  	clients "github.com/rapidaai/rapida-go/rapida/clients"
  	rapida_proto "github.com/rapidaai/rapida-go/rapida/clients/protos"
  	connections "github.com/rapidaai/rapida-go/rapida/connections"
  )

  func main() {
  	// Configure client connection using RAPIDA_PROJECT_CREDENTIAL environment variable
  	connectionConfig := connections.
  		DefaultconnectionConfig(connections.WithSDK(os.Getenv("RAPIDA_PROJECT_CREDENTIAL")))

  	// Retrieve all assistants with pagination
  	response, err := clients.GetAllAssistant(context.Background(), connectionConfig, &rapida_proto.GetAllAssistantRequest{
  		Paginate: &rapida_proto.Paginate{
  			Page:     0,
  			PageSize: 20,
  		},
  		// Optional: Add filtering criteria
  		// Criterias: []*rapida_proto.Criteria{{
  		// 	Key:   "key",
  		// 	Value: "value",
  		// 	Logic: "should", // or "must"
  		// }},
  	})

  	if err != nil {
  		fmt.Printf("Error while making call using rapida: %+v\n", err)
  		return
  	}

  	// Print the response
  	fmt.Printf("Rapida calling response: %+v\n", response)
  }
  ```

  ```typescript NodeJs theme={null}

  import {
    ConnectionConfig,
    Paginate,
    GetAssistant,
    GetAllAssistant,
  } from "@rapidaai/nodejs";

  (async () => {
    const connectionCfg = ConnectionConfig.DefaultConnectionConfig(
      ConnectionConfig.WithSDK({
        ApiKey: process.env.RAPIDA_PROJECT_CREDENTIAL,
      })
    );
    getAllAssistant(connectionCfg);
  })();

  async function getAllAssistant(connectionCfg, page = 0, pageSize = 20) {
    const pagination = new Paginate();
    pagination.setPage(page);
    pagination.setPageSize(pageSize);

    const request = new GetAllAssistantRequest();
    request.setPaginate(pagination);

    try {
      const response = await GetAllAssistant(connectionCfg, request);
      console.log("All Assistants Response:", response.toObject());
    } catch (error) {
      console.error("Error with GetAllAssistant call:", error);
    }
  }
  ```
</CodeGroup>

### Response

<ParamField body="code" type="int32">
  Numeric status code for the operation.
</ParamField>

<ParamField body="success" type="boolean">
  Indicates whether the operation was successful.
</ParamField>

<ParamField body="data" type="Assistant[]">
  Array of assistant objects returned by the request.

  <Expandable>
    <ParamField body="id" type="uint64">
      Unique identifier for the assistant.
    </ParamField>

    <ParamField body="status" type="string">
      Current status of the assistant.
    </ParamField>

    <ParamField body="visibility" type="string">
      Visibility setting of the assistant.
    </ParamField>

    <ParamField body="source" type="string">
      Source system or origin of the assistant.
    </ParamField>

    <ParamField body="sourceIdentifier" type="uint64">
      Identifier mapping to the assistant's source.
    </ParamField>

    <ParamField body="assistantTools" type="AssistantTool[]">
      Array of tools available to the assistant.
    </ParamField>

    <ParamField body="projectId" type="uint64">
      Associated project identifier.
    </ParamField>

    <ParamField body="organizationId" type="uint64">
      Associated organization identifier.
    </ParamField>

    <ParamField body="assistantProviderModelId" type="uint64">
      Model identifier tied to the assistant provider.
    </ParamField>

    <ParamField body="assistantProviderModel" type="AssistantProviderModel">
      Detailed information about the assistant's provider model.

      <Expandable>
        <ParamField body="id" type="uint64">
          Unique identifier for the provider model.
        </ParamField>

        <ParamField body="template" type="TextChatCompletePrompt">
          Template configuration for text chat completion.

          <Expandable>
            <ParamField body="prompt" type="TextPrompt[]">
              Array of prompt configurations.

              <Expandable>
                <ParamField body="role" type="string">
                  Role of the prompt (e.g., "system", "user", "assistant").
                </ParamField>

                <ParamField body="content" type="string">
                  Content of the prompt.
                </ParamField>
              </Expandable>
            </ParamField>

            <ParamField body="promptVariables" type="Variable[]">
              Array of variables used in the prompt template.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="description" type="string">
          Description of the provider model.
        </ParamField>

        <ParamField body="modelProviderId" type="uint64">
          Identifier of the model provider.
        </ParamField>

        <ParamField body="modelProviderName" type="string">
          Name of the model provider.
        </ParamField>

        <ParamField body="assistantModelOptions" type="Metadata[]">
          Array of model configuration options.

          <Expandable>
            <ParamField body="id" type="uint64">
              Unique identifier for the metadata entry.
            </ParamField>

            <ParamField body="key" type="string">
              The option key name.
            </ParamField>

            <ParamField body="value" type="string">
              The option value.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="status" type="string">
          Status of the provider model.
        </ParamField>

        <ParamField body="createdBy" type="uint64">
          Identifier of the creator.
        </ParamField>

        <ParamField body="createdUser" type="User">
          User object of the creator.
        </ParamField>

        <ParamField body="updatedBy" type="uint64">
          Identifier of the last updater.
        </ParamField>

        <ParamField body="updatedUser" type="User">
          User object of the last updater.
        </ParamField>

        <ParamField body="createdDate" type="timestamp">
          Timestamp when the provider model was created.
        </ParamField>

        <ParamField body="updatedDate" type="timestamp">
          Timestamp when the provider model was last updated.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="name" type="string">
      Name of the assistant.
    </ParamField>

    <ParamField body="description" type="string">
      Description of the assistant's purpose.
    </ParamField>

    <ParamField body="assistantTag" type="Tag">
      Tag information associated with the assistant.
    </ParamField>

    <ParamField body="language" type="string">
      Language setting for the assistant.
    </ParamField>

    <ParamField body="organization" type="Organization">
      Organization details associated with the assistant.
    </ParamField>

    <ParamField body="createdBy" type="uint64">
      Identifier of the assistant creator.
    </ParamField>

    <ParamField body="createdUser" type="User">
      User object of the assistant creator.
    </ParamField>

    <ParamField body="updatedBy" type="uint64">
      Identifier of the last updater.
    </ParamField>

    <ParamField body="updatedUser" type="User">
      User object of the last updater.
    </ParamField>

    <ParamField body="createdDate" type="timestamp">
      Timestamp when the assistant was created.
    </ParamField>

    <ParamField body="updatedDate" type="timestamp">
      Timestamp when the assistant was last updated.
    </ParamField>

    <ParamField body="debuggerDeployment" type="AssistantDebuggerDeployment">
      Configuration for debugger deployment.
    </ParamField>

    <ParamField body="phoneDeployment" type="AssistantPhoneDeployment">
      Configuration for phone deployment.
    </ParamField>

    <ParamField body="whatsappDeployment" type="AssistantWhatsappDeployment">
      Configuration for WhatsApp deployment.
    </ParamField>

    <ParamField body="webPluginDeployment" type="AssistantWebpluginDeployment">
      Configuration for web plugin deployment.
    </ParamField>

    <ParamField body="apiDeployment" type="AssistantApiDeployment">
      Configuration for API deployment.
    </ParamField>

    <ParamField body="assistantConversations" type="AssistantConversation[]">
      Array of conversations associated with the assistant.
    </ParamField>

    <ParamField body="assistantWebhooks" type="AssistantWebhook[]">
      Array of webhooks configured for the assistant.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="error" type="object">
  Error information, if applicable.

  <Expandable>
    <ResponseField name="errorCode" type="string">
      Machine-readable error code.
    </ResponseField>

    <ResponseField name="errorMessage" type="string">
      Detailed error message.
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="paginated" type="object">
  Pagination information for the response.

  <Expandable>
    <ParamField body="totalCount" type="int64">
      Total number of assistants available.
    </ParamField>

    <ParamField body="totalPages" type="int32">
      Total number of pages available.
    </ParamField>

    <ParamField body="currentPage" type="int32">
      Current page number (0-based).
    </ParamField>

    <ParamField body="pageSize" type="int32">
      Number of items per page.
    </ParamField>

    <ParamField body="hasNext" type="boolean">
      Indicates if there are more pages available.
    </ParamField>

    <ParamField body="hasPrevious" type="boolean">
      Indicates if there are previous pages available.
    </ParamField>
  </Expandable>
</ParamField>
