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

# Link tests to agent

> Link one or more tests to an agent. Tests that are already linked are skipped.



## OpenAPI

````yaml /api-reference/openapi.json post /agent-tests
openapi: 3.1.0
info:
  title: Calibrate Public API
  version: 0.1.0
  description: Programmatic API for CI/automation. Pass your key in the `X-API-Key` header.
servers:
  - url: https://api.calibrate.artpark.ai
    description: Production
security: []
paths:
  /agent-tests:
    post:
      tags:
        - agent-tests
      summary: Link tests to agent
      description: >-
        Link one or more tests to an agent. Tests that are already linked are
        skipped.
      operationId: create_agent_test_links_agent_tests_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentTestsCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentTestsCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentTestsCreate:
      properties:
        agent_uuid:
          type: string
          maxLength: 36
          minLength: 36
          title: Agent Uuid
          description: Agent to link tests to
          examples:
            - f47ac10b-58cc-4372-a567-0e02b2c3d479
        test_uuids:
          items:
            type: string
          type: array
          title: Test Uuids
          description: Tests to link. Any that are already linked are skipped
          examples:
            - - b1c2d3e4-f5a6-7890-bcde-f12345678901
      type: object
      required:
        - agent_uuid
        - test_uuids
      title: AgentTestsCreate
    AgentTestsCreateResponse:
      properties:
        message:
          type: string
          title: Message
          description: Confirmation message
      type: object
      required:
        - message
      title: AgentTestsCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````