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

# List agents

> List agents in the caller's workspace. Cursor-paginated. Filter by free-text
name match (`q`) and status.




## OpenAPI

````yaml GET /api/v1/agents
openapi: 3.1.0
info:
  title: Nanonets Agents Platform — Public API
  version: 1.0.0
  summary: >-
    Programmatically run AI agents, send follow-up messages, fetch results, and
    update agent prompts.
  description: >
    The Nanonets Agents Platform Public API lets you trigger agents, stream task
    progress,

    and integrate agent outputs into your own systems.


    ## Authentication


    All requests must include a workspace API key as a Bearer token:


    ```

    Authorization: Bearer YOUR_API_KEY

    ```


    Workspace API keys are minted from the web app under **Settings → API
    Keys**. Each key

    is scoped to a single workspace; requests against agents or tasks outside
    that workspace

    return `403`.


    ## Lifecycle


    A typical integration is three calls:


    1. `POST /v1/agents/{agent_id}/run` — start a task. Returns a `task_id`
    immediately.

    2. Poll `GET /v1/tasks/{task_id}` until `status` is a terminal value
    (`completed`,
       `failed`, or `stopped`), **or** wait until it reaches `waiting_for_input` to
       respond with `POST /v1/tasks/{task_id}/message`.
    3. `GET /v1/tasks/{task_id}/summary` for the final answer, or `/result` for
    the full
       reasoning trace.

    ## Errors


    Every error response is `{"error": "<human-readable message>"}`. The HTTP
    status

    indicates the class:


    | Status | Meaning |

    |--------|---------|

    | 400 | Malformed request (bad UUID, missing required field, file too large)
    |

    | 401 | Missing or invalid API key |

    | 403 | API key is valid but the agent/task belongs to a different workspace
    |

    | 404 | Agent or task not found |

    | 500 | Server error — safe to retry with backoff |
  contact:
    name: Nanonets Support
    url: https://nanonets.com/support
  license:
    name: Proprietary
servers:
  - url: https://agents.nanonets.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Manage agents — create, list, update, run, and version.
  - name: Tasks
    description: >-
      Inspect task status, fetch results, list and cancel tasks, and send
      follow-up messages.
paths:
  /api/v1/agents:
    get:
      tags:
        - Agents
      summary: List agents
      description: >
        List agents in the caller's workspace. Cursor-paginated. Filter by
        free-text

        name match (`q`) and status.
      operationId: listAgents
      parameters:
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/Limit'
        - name: q
          in: query
          description: Substring match against agent name (case-insensitive).
          schema:
            type: string
        - name: status
          in: query
          description: >-
            Comma-separated list of statuses to include (`draft`, `published`,
            `archived`). Default returns all non-archived.
          schema:
            type: string
      responses:
        '200':
          description: Paginated list of agents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAgentsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    Cursor:
      name: cursor
      in: query
      required: false
      description: >
        Opaque pagination cursor returned by a previous response in
        `next_cursor`.

        Omit on the first request.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      required: false
      description: Maximum number of items to return. Defaults to 20; max 100.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  schemas:
    ListAgentsResponse:
      type: object
      required:
        - data
        - has_more
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AgentSummary'
        next_cursor:
          type:
            - string
            - 'null'
          description: Cursor to fetch the next page. `null` when there are no more items.
        has_more:
          type: boolean
    AgentSummary:
      type: object
      description: Slim agent representation for list responses (config omitted).
      required:
        - id
        - agent_group_id
        - version_number
        - status
        - name
        - is_active
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        agent_group_id:
          type: string
          format: uuid
        version_number:
          type: integer
        status:
          $ref: '#/components/schemas/AgentStatus'
        name:
          type: string
        is_active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
          examples:
            - Invalid agent_id format
    AgentStatus:
      type: string
      description: |
        Lifecycle status of an agent version.

        - `draft` — work-in-progress, not yet runnable for end users
        - `published` — live, runnable
        - `archived` — superseded by a newer version
      enum:
        - draft
        - published
        - archived
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected server error. Safe to retry with exponential backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        Workspace API key issued from the web app. Pass as
        `Authorization: Bearer YOUR_API_KEY`.

````