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

# Search agents



## OpenAPI

````yaml /openapi.json get /api/v1/agents/search
openapi: 3.0.3
info:
  title: 2501 Public API
  version: v1
  description: >-
    The stable, versioned HTTP API for driving 2501 as code. See the API
    Overview for authentication, the org_id rule, cursor pagination, and the
    error envelope.
servers:
  - url: https://{command_center_host}
    variables:
      command_center_host:
        default: your-command-center-host
        description: Your Command Center host
security:
  - bearerAuth: []
paths:
  /api/v1/agents/search:
    get:
      tags:
        - Agents
      summary: Search agents
      parameters:
        - schema:
            type: string
            default: '25'
          required: false
          name: limit
          in: query
        - schema:
            type: string
          required: false
          name: starting_after
          in: query
        - schema:
            type: string
          required: false
          name: ending_before
          in: query
        - schema:
            anyOf:
              - type: string
                enum:
                  - total_count
              - type: array
                items:
                  type: string
                  enum:
                    - total_count
          required: false
          name: include
          in: query
        - schema:
            type: string
          required: true
          name: org_id
          in: query
        - schema:
            type: string
          required: false
          name: q
          in: query
        - schema:
            type: string
          required: false
          name: id
          in: query
        - schema:
            type: string
          required: false
          name: name
          in: query
        - schema:
            type: string
          required: false
          name: hostname
          in: query
        - schema:
            type: string
          required: false
          name: host_additional_names
          in: query
        - schema:
            type: string
          required: false
          name: credential_id
          in: query
      responses:
        '200':
          description: A filtered page of agents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentList'
        '400':
          description: >-
            Bad request - a field is missing, malformed, or not allowed
            (VALIDATION_FAILED, BAD_REQUEST, INVALID_CURSOR)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No credentials, or a key that is invalid, revoked, or expired
            (UNAUTHORIZED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Authenticated but not allowed (FORBIDDEN, ORG_ACCESS_DENIED,
            LICENSE_CAP_REACHED, LICENSE_EXPIRED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AgentList:
      type: object
      properties:
        object:
          type: string
          enum:
            - list
        data:
          type: array
          items:
            $ref: '#/components/schemas/Agent'
        has_more:
          type: boolean
        total_count:
          type: integer
          description: Present only when include=total_count is set
      required:
        - object
        - data
        - has_more
    Error:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed
        request_id:
          type: string
          example: req_3702b7e7-...
        field:
          type: string
          description: Set when one input is at fault
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: Set when several inputs are at fault
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - message
        - request_id
    Agent:
      type: object
      properties:
        id:
          type: string
          example: agt_a9bf5a2b-...
        name:
          type: string
          example: linux-ops - web-01
        status:
          type: string
          enum:
            - idle
            - running
            - error
            - archived
        org_id:
          type: string
          example: org_460b541c-...
        tenant_id:
          type: string
          example: ten_115bea44-...
        host_id:
          type: string
          nullable: true
          example: hst_8272f9b4-...
        specialty_id:
          type: string
          example: spc_9e274f8c-...
        main_engine:
          type: string
          example: qwen3-coder-480b
        secondary_engine:
          type: string
          example: qwen3-coder-30b
        remote_execution:
          type: boolean
        credential_config:
          type: array
          nullable: true
          items:
            type: object
            properties:
              credential_id:
                type: string
                example: crd_1f3c8a90-...
              credential_role:
                type: string
                enum:
                  - ssh_username
                  - ssh_password
                  - ssh_private_key
                  - ssh_public_key
              order:
                type: integer
              is_required:
                type: boolean
            required:
              - credential_id
              - credential_role
              - order
              - is_required
        disabled_rule_ids:
          type: array
          items:
            type: string
        accessible_credential_ids:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
      required:
        - id
        - name
        - status
        - org_id
        - tenant_id
        - host_id
        - specialty_id
        - main_engine
        - secondary_engine
        - remote_execution
        - credential_config
        - disabled_rule_ids
        - accessible_credential_ids
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in Command Center (Settings -> API Keys), sent as
        `Authorization: Bearer 2501_ak_...`. A Command Center session cookie is
        also accepted.

````