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

# Search Agents

> Searches for AI agents based on various criteria including name, status, and configuration. Supports advanced filtering and full-text search capabilities.



## OpenAPI

````yaml /api-reference/conversation-ai/openapi.json get /conversation-ai/agents/search
openapi: 3.0.0
info:
  title: Conversation AI API
  description: Documentation for AI Employees API
  version: '1.0'
  contact: {}
servers:
  - url: https://services.leadconnectorhq.com
security: []
tags:
  - name: AI-Employees
    description: Documentation for AI Employees API
  - name: Actions
    description: Documentation for AI Employees API
  - name: Agents
    description: Documentation for AI Employees API
  - name: Generations
    description: Documentation for AI Employees API
paths:
  /conversation-ai/agents/search:
    get:
      tags:
        - Agents
      summary: Search Agents
      description: >-
        Searches for AI agents based on various criteria including name, status,
        and configuration. Supports advanced filtering and full-text search
        capabilities.
      operationId: search-agent
      parameters:
        - name: Version
          in: header
          description: API Version
          required: true
          schema:
            type: string
            enum:
              - '2021-04-15'
        - name: startAfter
          required: false
          in: query
          description: >-
            Start after is the agent id to start after, Serving as skip, send
            empty when first page
          schema:
            example: Exampleee123
            type: string
        - name: limit
          required: false
          in: query
          description: Records per page
          schema:
            example: 1
            type: number
        - name: query
          required: false
          in: query
          description: query to search on agent name, must be provided in lowercase
          schema:
            example: booking
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchEmployeeResponseDTO'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDTO'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableDTO'
      security:
        - bearer:
            - conversation-ai.readonly
components:
  schemas:
    SearchEmployeeResponseDTO:
      type: object
      properties:
        agents:
          description: List of agents matching the search criteria.
          type: array
          items:
            $ref: '#/components/schemas/EmployeeListItemDTO'
        totalCount:
          type: number
          example: 100
          description: Total number of agents in the location (unfiltered count).
        count:
          type: number
          example: 25
          description: Number of agents in the current response (filtered/paginated count).
      required:
        - agents
        - totalCount
        - count
    BadRequestDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Bad Request
    UnauthorizedDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: 'Invalid token: access token is invalid'
        error:
          type: string
          example: Unauthorized
    UnprocessableDTO:
      type: object
      properties:
        statusCode:
          type: number
          example: 422
        message:
          example:
            - Unprocessable Entity
          type: array
          items:
            type: string
        error:
          type: string
          example: Unprocessable Entity
    EmployeeListItemDTO:
      type: object
      properties:
        id:
          type: string
          example: emp_123
          description: Unique identifier for the agent.
        name:
          type: string
          example: John Doe
          description: Name of the agent.
        businessName:
          type: string
          example: Tech Corp
          description: Name of the business the agent represents.
        mode:
          type: string
          enum:
            - 'off'
            - suggestive
            - auto-pilot
          example: auto-pilot
          description: Current operating mode of the agent.
        channels:
          example:
            - SMS
            - LIVE_CHAT
          description: Communication channels the agent operates on.
          type: array
          items:
            type: string
        waitTime:
          type: number
          example: 30
          description: Wait time before agent responds.
        waitTimeUnit:
          type: string
          enum:
            - minutes
            - seconds
          example: seconds
          description: Unit for wait time.
        sleepEnabled:
          type: boolean
          example: false
          description: Indicates if sleep functionality is enabled.
        sleepTime:
          type: number
          example: 2
          description: Duration of sleep period.
        sleepTimeUnit:
          type: string
          enum:
            - hours
            - minutes
            - seconds
          example: hours
          description: Unit of sleep time.
        actions:
          example:
            - id: action_123
              type: triggerWorkflow
          description: List of actions associated with this agent.
          type: array
          items:
            type: object
        isPrimary:
          type: boolean
          example: false
          description: >-
            Indicates if this agent is a primary agent. (First agent created for
            a location is primary by default)
        autoPilotMaxMessages:
          type: number
          example: 25
          description: >-
            Maximum number of messages in auto-pilot mode before requiring human
            intervention.
        goal:
          type: object
          example:
            prompt: Assist customers
            type: custom
            actionId: null
          description: Goal configuration for the agent.
        knowledgeBaseIds:
          example:
            - kb_123
            - kb_456
          description: Array of knowledge base IDs associated with this agent.
          type: array
          items:
            type: string
        createdAt:
          type: string
          example: '2024-01-01T00:00:00Z'
          description: Timestamp when the agent was created.
        updatedAt:
          type: string
          example: '2024-01-01T00:00:00Z'
          description: Timestamp when the agent was last updated.
      required:
        - id
        - name
        - mode
        - channels
        - waitTime
        - waitTimeUnit
        - sleepEnabled
        - actions
        - isPrimary
        - autoPilotMaxMessages
        - createdAt
        - updatedAt
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access Token or Private Integration Token

````