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

# agents.list({ template?, metadata? })



## OpenAPI

````yaml /api-reference/openapi.json get /agents
openapi: 3.1.0
info:
  title: paddock API
  version: 1.0.0
  description: >-
    The paddock API. Send an API key, or a session token on its own session, as
    a bearer token.
servers:
  - url: https://api.paddock.build/v1
security:
  - bearer: []
paths:
  /agents:
    get:
      summary: agents.list({ template?, metadata? })
      operationId: listAgents
      parameters:
        - $ref: '#/components/parameters/TemplateFilter'
        - $ref: '#/components/parameters/MetadataFilter'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: A page of agents
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentPage'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    TemplateFilter:
      name: template
      in: query
      required: false
      description: name or name@version
      schema:
        type: string
    MetadataFilter:
      name: metadata
      in: query
      required: false
      description: 'Matches every listed key exactly: metadata[teamId]=t_42'
      schema:
        $ref: '#/components/schemas/Metadata'
      style: deepObject
      explode: true
    Limit:
      name: limit
      in: query
      required: false
      description: Page size
      schema:
        type: integer
        minimum: 1
        maximum: 200
        default: 50
    Cursor:
      name: cursor
      in: query
      required: false
      description: The nextCursor of the previous page
      schema:
        type: string
  headers:
    RequestId:
      description: The request's ID, for support and logs
      schema:
        type: string
  schemas:
    AgentPage:
      allOf:
        - $ref: '#/components/schemas/Page'
        - type: object
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/Agent'
    Metadata:
      description: The customer's own string keys and values; never case-converted.
      type: object
      additionalProperties:
        type: string
    Page:
      description: >-
        Every resource list returns one page: a cursor-paged slice of items.
        Typed pages extend it.
      type: object
      required:
        - data
        - nextCursor
      properties:
        data:
          type: array
        nextCursor:
          type:
            - string
            - 'null'
    Agent:
      type: object
      required:
        - id
        - template
        - harness
        - model
        - generation
        - status
        - lastError
        - capabilities
        - sessionCount
        - metadata
        - createdAt
      properties:
        id:
          type: string
          pattern: ^agt_[0-7][0-9a-hjkmnp-tv-z]{25}$
        template:
          type: string
          pattern: ^[a-z0-9-]{1,64}@[1-9][0-9]*$
        harness:
          $ref: '#/components/schemas/Harness'
        model:
          description: >-
            The effective model: the agent's own if set, otherwise the
            template's.
          type: string
        generation:
          description: >-
            The generation of its effective configuration; it increases each
            time the configuration changes.
          type: integer
          minimum: 1
        status:
          $ref: '#/components/schemas/AgentStatus'
        lastError:
          oneOf:
            - $ref: '#/components/schemas/TurnError'
            - type: 'null'
        capabilities:
          $ref: '#/components/schemas/Capabilities'
        sessionCount:
          description: Its active sessions.
          type: integer
          minimum: 0
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          $ref: '#/components/schemas/Timestamp'
    ErrorBody:
      description: The body of every non-2xx response.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    Harness:
      type: string
      enum:
        - claude-code
        - codex
        - pi
    AgentStatus:
      type: string
      enum:
        - sleeping
        - waking
        - awake
        - unavailable
    TurnError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/TurnErrorCode'
        message:
          type: string
    Capabilities:
      type: object
      required:
        - mcp
        - plugins
        - workflows
        - memory
      properties:
        mcp:
          type: boolean
        plugins:
          type: boolean
        workflows:
          type: boolean
        memory:
          type: boolean
    Timestamp:
      description: RFC 3339 in UTC with milliseconds.
      type: string
      format: date-time
      pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
      x-go-type: wire.Timestamp
      x-go-type-import:
        path: github.com/wenfengwang/paddock/internal/wire
    ErrorObject:
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
        details:
          type: object
    TurnErrorCode:
      type: string
      enum:
        - harness_error
        - watchdog_timeout
        - model_unavailable
        - model_auth
        - context_too_long
        - conversation_lost
        - sandbox_unavailable
        - internal
    ErrorCode:
      type: string
      enum:
        - invalid_request
        - unauthorized
        - forbidden
        - not_found
        - conflict
        - payload_too_large
        - unsupported
        - unavailable
        - internal
  responses:
    Error:
      description: Every non-2xx response
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: An API key, or a session token on its own session

````

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