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

# List associated agents

> List the agents currently associated with a test set. Returns every associated agent (not paginated); associations are bounded per test set. An unknown test_set_id returns an empty list rather than 404.



## OpenAPI

````yaml /api-reference/v1/test-sets-v1.yaml get /test-sets/{test_set_id}/agents
openapi: 3.0.3
info:
  title: Test Sets API
  version: 1.0.0
  description: >
    API for managing test sets - collections of test cases for evaluation.


    Test sets organize test cases and can define parameters for test case
    generation.
  contact:
    name: Coval API Support
    url: https://coval.dev
    email: support@coval.dev
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - apiKey: []
tags:
  - name: Test Sets
    description: Operations for managing test sets
paths:
  /test-sets/{test_set_id}/agents:
    parameters:
      - name: test_set_id
        in: path
        required: true
        description: Test set ID (8-character ID)
        schema:
          type: string
          minLength: 8
          maxLength: 8
        example: abc12345
    get:
      tags:
        - Test Sets
      summary: List associated agents
      description: >-
        List the agents currently associated with a test set. Returns every
        associated agent (not paginated); associations are bounded per test set.
        An unknown test_set_id returns an empty list rather than 404.
      operationId: listTestSetAgents
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTestSetAgentsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ListTestSetAgentsResponse:
      type: object
      description: The agents currently associated with the test set.
      required:
        - agents
      properties:
        agents:
          type: array
          items:
            $ref: '#/components/schemas/TestSetAgentResource'
    TestSetAgentResource:
      type: object
      description: An agent associated with a test set.
      required:
        - name
        - agent_id
        - display_name
      properties:
        name:
          type: string
          description: Resource name, "test-sets/{test_set_id}/agents/{agent_id}".
          example: test-sets/abc12345/agents/abc123def456ghi789jklm
        agent_id:
          type: string
          description: Agent identifier (22-char ShortUUID).
          example: abc123def456ghi789jklm
        display_name:
          type: string
          description: Human-readable agent name.
          example: Support Bot
    ErrorResponse:
      type: object
      description: Standard error response
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameters
            details:
              type: array
              description: Detailed error information
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: Field that caused the error
                    example: slug
                  description:
                    type: string
                    description: Description of the error
                    example: slug already exists for this organization
  responses:
    Unauthorized:
      description: Authentication failed or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred while processing the request
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Organization API key for authentication

````