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

# List Agents

> Retrieve a list of all `Agents`.



## OpenAPI

````yaml api-reference/openapi.json get /agents
openapi: 3.1.0
info:
  title: Endpoints
  version: '1.0'
servers:
  - url: https://api.contextual.ai/v1
security:
  - BearerAuth: []
paths:
  /agents:
    get:
      tags:
        - /agents
      summary: List Agents
      description: Retrieve a list of all `Agents`.
      operationId: list_agents_agents_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Maximum number of agents to return
            default: 1000
            title: Limit
          description: Maximum number of agents to return
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            description: >-
              Cursor from the previous call to list agents, used to retrieve the
              next set of results
            title: Cursor
          description: >-
            Cursor from the previous call to list agents, used to retrieve the
            next set of results
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAgentsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListAgentsResponse:
      properties:
        next_cursor:
          type: string
          title: Next Cursor
          description: >-
            Next cursor to continue pagination. Omitted if there are no more
            agents to retrieve.
        agents:
          items:
            $ref: '#/components/schemas/AgentEntry'
          type: array
          title: Agents
          description: List of active agents
          default: []
      type: object
      title: ListAgentsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentEntry:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: ID of the agent
        name:
          type: string
          title: Name
          description: Name of the agent
        description:
          type: string
          title: Description
          description: Description of the agent
      type: object
      required:
        - id
        - name
        - description
      title: AgentEntry
    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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````