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

# List Agents

> List all agents matching the query parameters sorted anti-chronologically by when they were last updated (`updated_at`).



## OpenAPI

````yaml get /api/v1/agents
openapi: 3.1.0
info:
  title: AskUI Workspaces API
  version: 0.2.15
servers: []
security: []
paths:
  /api/v1/agents:
    get:
      tags:
        - agents
      summary: List Agents
      description: >-
        List all agents matching the query parameters sorted
        anti-chronologically by when they were last updated (`updated_at`).
      operationId: list_agents_api_v1_agents_get
      parameters:
        - name: agent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid4
              - type: 'null'
            title: Agent Id
        - name: workspace_id
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  format: uuid4
              - type: 'null'
            title: Workspace Id
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  enum:
                    - ACTIVE
                    - ARCHIVED
              - type: 'null'
            title: Status
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Skip
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 100
            title: Limit
        - name: expand
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  const: total_count
                  type: string
              - type: 'null'
            description: >-
              total_count: Include the total number of agents that match the
              query, only accurate up to 100.
            title: Expand
          description: >-
            total_count: Include the total number of agents that match the
            query, only accurate up to 100.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentsListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
        - Basic: []
components:
  schemas:
    AgentsListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Agent'
          type: array
          title: Data
        hasMore:
          type: boolean
          title: Hasmore
          description: >-
            Whether there are more agents that match the query that were not
            included in this response.
          default: false
        totalCount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Totalcount
          description: >-
            The total number of agents that match the query, only accurate up to
            100.
      type: object
      required:
        - data
      title: AgentsListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Agent:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        name:
          type: string
          pattern: ^[a-zA-Z0-9]([a-zA-Z0-9-_. ]{0,62}[a-zA-Z0-9])?$
          title: Name
          description: >-
            The name of the agent. The name must only contain the following
            characters: a-z, A-Z, 0-9, -, _, and space. The name must not be
            empty. The name must start and end with a letter or a number. The
            name must not be longer than 64 characters.
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          title: Status
        autoConfirm:
          type: boolean
          title: Autoconfirm
          description: >-
            If true, the agent will automatically confirm the data extracted,
            i.e., no review is necessary.
        description:
          type: string
          maxLength: 1024
          title: Description
          default: ''
        emailTrigger:
          $ref: '#/components/schemas/EmailAgentTrigger'
        dataSchema:
          anyOf:
            - $ref: '#/components/schemas/JsonSchema'
            - type: 'null'
          description: |2-

                        The data schema describes the data to extract in form of a [JSON schema draft 2020-12](https://json-schema.org/draft/2020-12/release-notes). Use the ["description" keyword](https://json-schema.org/understanding-json-schema/reference/annotations) of each property to provide additional information about the field, e.g., the prompt for extraction from sources. 
                    
        dataDestinations:
          items:
            oneOf:
              - $ref: '#/components/schemas/DataDestinationAskUiWorkflow'
              - $ref: '#/components/schemas/DataDestinationWebhook'
            discriminator:
              propertyName: type
              mapping:
                ASKUI_WORKFLOW:
                  $ref: '#/components/schemas/DataDestinationAskUiWorkflow'
                WEBHOOK:
                  $ref: '#/components/schemas/DataDestinationWebhook'
          type: array
          title: Datadestinations
        workspaceId:
          type: string
          format: uuid4
          title: Workspaceid
        folderPath:
          anyOf:
            - type: string
            - type: 'null'
          title: Folderpath
      type: object
      required:
        - name
        - status
        - autoConfirm
        - emailTrigger
        - dataDestinations
        - workspaceId
      title: Agent
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    EmailAgentTrigger:
      properties:
        active:
          type: boolean
          title: Active
          description: If false, no emails can be send to trigger agent.
          default: true
        allowedSenders:
          items:
            type: string
          type: array
          uniqueItems: true
          title: Allowedsenders
          description: >-
            The email addresses that are allowed to send emails to trigger the
            agent. If empty, no emails can be send to trigger agent.
        email:
          type: string
          pattern: ^[a-zA-Z0-9-_.+]+@.*$
          title: Email
          description: >-
            The email address of the agent to send emails to to trigger the
            agent. The email address must be unique for each agent. The domain
            of the email address is fixed. The local part of the email address
            must be between 1 and 64 characters long and can only contain the
            following characters: a-z, A-Z, 0-9, -, _, . and +.
      type: object
      required:
        - email
      title: EmailAgentTrigger
    JsonSchema:
      properties:
        title:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
          title: Title
          default: DataToExtract
        description:
          type: string
          title: Description
          default: ''
        type:
          type: string
          const: object
          title: Type
          default: object
        properties:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          minProperties: 1
          title: Properties
        required:
          items:
            type: string
          type: array
          title: Required
      type: object
      required:
        - properties
      title: JsonSchema
    DataDestinationAskUiWorkflow:
      properties:
        type:
          type: string
          const: ASKUI_WORKFLOW
          title: Type
          default: ASKUI_WORKFLOW
        host:
          $ref: '#/components/schemas/AskUiRunnerHost'
        runnerTags:
          items:
            type: string
          type: array
          title: Runnertags
        workflows:
          items:
            type: string
          type: array
          minItems: 1
          title: Workflows
      type: object
      required:
        - host
        - runnerTags
        - workflows
      title: DataDestinationAskUiWorkflow
    DataDestinationWebhook:
      properties:
        type:
          type: string
          const: WEBHOOK
          title: Type
          default: WEBHOOK
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        headers:
          additionalProperties:
            type: string
          type: object
          title: Headers
      type: object
      required:
        - url
        - headers
      title: DataDestinationWebhook
    AskUiRunnerHost:
      type: string
      enum:
        - SELF
        - ASKUI
      title: AskUiRunnerHost
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
    Basic:
      type: apiKey
      in: header
      name: Authorization

````