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

# List agents

> Returns a paginated list of the environment's agents, newest first.



## OpenAPI

````yaml /openapi.json get /agents
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /agents:
    get:
      summary: List agents
      description: Returns a paginated list of the environment's agents, newest first.
      parameters:
        - in: query
          name: cursor
          required: false
          schema:
            type: string
          description: >-
            Opaque cursor from a previous response's `next_cursor`. Omit for the
            first page.
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
      responses:
        '200':
          description: Paginated list of agents
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Agent'
                  next_cursor:
                    type: string
                    nullable: true
                    description: Opaque cursor for the next page. Null when no more pages.
                  limit:
                    type: integer
        '401':
          description: Unauthorized
components:
  schemas:
    Agent:
      type: object
      required:
        - name
        - instructions
      description: >-
        An agent: standing instructions executed in an isolated sandbox with
        access to the environment's data, on a schedule or on demand. The same
        objects the app's Agents page manages.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Unique within the environment
        description:
          type: string
          nullable: true
        instructions:
          type: string
          description: The standing prompt every run executes
        mentions:
          type: array
          description: >-
            Reconciliations, data streams, users, and other agents whose context
            is resolved into every run's prompt. Mentioning an agent also
            teaches the run how to trigger it (see POST /agents/{id}/runs)
          items:
            type: object
            required:
              - type
              - id
              - label
            properties:
              type:
                type: string
                enum:
                  - reconciliation
                  - data_stream
                  - user
                  - agent
              id:
                type: string
              label:
                type: string
        model:
          type: string
          description: >-
            The model the agent runs on — resolved to the platform default when
            not set explicitly
        cadence:
          type: string
          enum:
            - manual
            - hourly
            - daily
            - weekdays
            - weekly
          description: '`manual` agents only run when triggered (POST /agents/{id}/runs)'
        hour:
          type: integer
          nullable: true
          minimum: 0
          maximum: 23
          description: Required for daily, weekdays, and weekly cadences
        minute:
          type: integer
          nullable: true
          minimum: 0
          maximum: 59
          description: Required for every cadence except manual
        day_of_week:
          type: integer
          nullable: true
          minimum: 0
          maximum: 6
          description: 0 = Sunday. Required for weekly cadence
        timezone:
          type: string
          description: IANA timezone the schedule is evaluated in
          default: UTC
        active:
          type: boolean
          description: Inactive agents are never scheduled but can still be run on demand
        handles_file_drops:
          type: boolean
          description: >-
            Whether this agent processes files dropped in the app. At most one
            active agent per environment can have this enabled.
        delivery_enabled:
          type: boolean
          description: >-
            Email output files matching delivery_file_pattern to
            delivery_recipients after each completed run
        delivery_recipients:
          type: array
          items:
            type: string
            format: email
        delivery_file_pattern:
          type: string
          description: Case-insensitive glob selecting which output files are delivered
          default: '*.csv'
        input_files:
          type: array
          items:
            $ref: '#/components/schemas/AgentFile'
        next_run_at:
          type: string
          format: date-time
          nullable: true
        last_run_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AgentFile:
      type: object
      description: >-
        A file attached to an agent (input) or produced by a run (output). `url`
        is a signed, relative download path on the API host.
      properties:
        id:
          type: string
          format: uuid
        filename:
          type: string
        byte_size:
          type: integer
        content_type:
          type: string
        created_at:
          type: string
          format: date-time
        url:
          type: string
          description: Signed download path, relative to the API host
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````