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

# Search Agents

> Search for an agent using sort, filter and pagination.



## OpenAPI

````yaml POST /agent/search
openapi: 3.0.1
info:
  title: Machina Sports SDK
  description: >-
    Machina Sports API for seamless AI integration in sports, offering real-time
    insights, personalized content, and fan sentiment analysis.
  version: '1.0'
  termsOfService: http://machina.gg/tos/
  contact:
    email: support@machina.gg
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://{api-address}.org.machina.gg
    description: Production server
    variables:
      api-address:
        default: https://api.machina.gg
        description: Your api-address
  - url: http://local.machina:5001
    description: Local development server
security:
  - ApiToken: []
paths:
  /agent/search:
    post:
      tags:
        - Agents
      summary: Search Agents
      description: Search for an agent using sort, filter and pagination.
      operationId: searchAgents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                filters:
                  type: object
                  description: Query filters object
                  default: {}
                sorters:
                  type: array
                  description: Array containing field name and sort direction
                  items:
                    type: string
                  default:
                    - _id
                    - -1
                  example:
                    - name
                    - 1
                page:
                  type: integer
                  description: Page number (starts from 1)
                  default: 1
                page_size:
                  type: integer
                  description: Number of items per page
                  default: 10
              example:
                filters: {}
                sorters:
                  - name
                  - 1
                page: 1
                page_size: 10
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: Unique identifier of the agent
                          example: 67e09cb441dc71ef8db3992f
                        name:
                          type: string
                          description: Unique name of the agent
                          example: my-new-agent
                        title:
                          type: string
                          description: Display title of the agent
                          example: My New Agent
                        description:
                          type: string
                          description: Description of the agent's purpose
                          example: Your agent description
                        status:
                          type: string
                          enum:
                            - active
                            - inactive
                          description: Current status of the agent
                          example: inactive
                        context:
                          type: object
                          description: Configuration settings for the agent
                          example:
                            config-frequency: 0.04
                        workflows:
                          type: array
                          description: List of workflows associated with the agent
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Name of the workflow
                                example: sync-nba-embeds
                              description:
                                type: string
                                description: Description of the workflow
                                example: sync-nba-embeds
                              inputs:
                                type: object
                                description: Input mappings for the workflow
                                example:
                                  event_code: $.get('event_code') or None
                              outputs:
                                type: object
                                description: Output mappings for the workflow
                                example:
                                  sync-nba-embeds-status: $.get('workflow-status', False)
                        created:
                          type: string
                          description: Creation timestamp
                          example: Sun, 23 Mar 2025 23:43:48 GMT
                        date:
                          type: string
                          description: Date of creation
                          example: Sun, 23 Mar 2025 23:43:48 GMT
                  status:
                    type: boolean
                    description: Operation status
                    example: true
                  total_documents:
                    type: integer
                    description: Total number of documents matching the query
                    example: 1
        '400':
          description: Bad request
        '401':
          description: Unauthorized
      security:
        - ApiToken: []
components:
  securitySchemes:
    ApiToken:
      type: apiKey
      name: x-api-token
      in: header
      description: API key authentication

````