> ## Documentation Index
> Fetch the complete documentation index at: https://cognitio-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List agents

> Get a list of all available AI agents in the Cognitio system.



## OpenAPI

````yaml /openapi.json get /agent
openapi: 3.1.1
info:
  title: cognitio
  description: cognitio api
  version: 1.0.0
servers: []
security: []
paths:
  /agent:
    get:
      summary: List agents
      description: Get a list of all available AI agents in the Cognitio system.
      operationId: app.agents
      parameters:
        - in: query
          name: directory
          schema:
            type: string
        - in: query
          name: workspace
          schema:
            type: string
      responses:
        '200':
          description: List of agents
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Agent'
      x-codeSamples:
        - lang: js
          source: |-
            import { createCognitioClient } from "@cognitio/sdk

            const client = createCognitioClient()
            await client.app.agents({
              ...
            })
components:
  schemas:
    Agent:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        mode:
          type: string
          enum:
            - subagent
            - primary
            - all
        native:
          type: boolean
        hidden:
          type: boolean
        topP:
          type: number
        temperature:
          type: number
        color:
          type: string
        permission:
          $ref: '#/components/schemas/PermissionRuleset'
        model:
          type: object
          properties:
            modelID:
              type: string
            providerID:
              type: string
          required:
            - modelID
            - providerID
        variant:
          type: string
        prompt:
          type: string
        options:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        steps:
          type: integer
          exclusiveMinimum: 0
          maximum: 9007199254740991
      required:
        - name
        - mode
        - permission
        - options
    PermissionRuleset:
      type: array
      items:
        $ref: '#/components/schemas/PermissionRule'
    PermissionRule:
      type: object
      properties:
        permission:
          type: string
        pattern:
          type: string
        action:
          $ref: '#/components/schemas/PermissionAction'
      required:
        - permission
        - pattern
        - action
    PermissionAction:
      type: string
      enum:
        - allow
        - deny
        - ask

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.