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

# Create an evaluation pack

> **Security Requirements**

| Auth Types | Entities | Permissions | Required Roles |
|------------|----------|-------------|----------------|
| USER | TENANT | WRITE | TENANT:WRITE |



## OpenAPI

````yaml /openapi/swarmd.json post /relay/v1/evaluation-packs
openapi: 3.1.0
info:
  title: Relay
  version: v0
servers:
  - url: https://api.dev.swarmd.ai
    description: Development
security: []
tags:
  - name: Policy Groups
    x-displayName: Policy Groups
  - name: Policy Bindings
    x-displayName: Policy Bindings
  - name: Evaluation Packs
    x-displayName: Evaluation Packs
  - name: Webhooks
    x-displayName: Webhooks
  - name: MCP JSON-RPC
    x-displayName: MCP JSON-RPC
  - name: Conversations
    x-displayName: Conversations
  - name: Human JSON-RPC
    x-displayName: Human JSON-RPC
  - name: Channel JSON-RPC
    x-displayName: Channel JSON-RPC
  - name: HITL Approvals
    x-displayName: HITL Approvals
  - name: Agent JSON-RPC
    x-displayName: Agent JSON-RPC
  - name: Tasks
    x-displayName: Tasks
  - name: Push Notifications
    x-displayName: Push Notifications
  - name: Messaging
    x-displayName: Messaging
  - name: LLM Runtime
    x-displayName: LLM Runtime
  - name: Agent Discovery
    x-displayName: Agent Discovery
  - name: MCP Servers
    x-displayName: MCP Servers
  - name: LLM Gateways
    x-displayName: LLM Gateways
  - name: Agents
    x-displayName: Agents
  - name: User Subscriptions
    x-displayName: User Subscriptions
  - name: LLM Providers
    x-displayName: LLM Providers
  - name: LLM Gateway Subscriptions
    x-displayName: LLM Gateway Subscriptions
  - name: Kill Switches
    x-displayName: Kill Switches
  - name: Channels
    x-displayName: Channels
  - name: Channel Subscriptions
    x-displayName: Channel Subscriptions
  - name: Agent Subscriptions
    x-displayName: Agent Subscriptions
  - name: Marketplace
    x-displayName: Marketplace
  - name: Identity Providers
    x-displayName: Identity Providers
  - name: Groups
    x-displayName: Groups
  - name: Authentication
    x-displayName: Authentication
  - name: Users
    x-displayName: Users
  - name: Tenants
    x-displayName: Tenants
  - name: mcp-consent-controller
    x-displayName: mcp-consent-controller
  - name: Audit Monitors
    x-displayName: Audit Monitors
  - name: Audit Integrity
    x-displayName: Audit Integrity
  - name: Audit Events
    x-displayName: Audit Events
  - name: Audit Traces
    x-displayName: Audit Traces
  - name: audit-rest-controller
    x-displayName: audit-rest-controller
  - name: Audit Dashboard
    x-displayName: Audit Dashboard
  - name: A2A Payments
    x-displayName: A2A Payments
paths:
  /relay/v1/evaluation-packs:
    post:
      tags:
        - Evaluation Packs
      summary: Create an evaluation pack
      description: |-
        **Security Requirements**

        | Auth Types | Entities | Permissions | Required Roles |
        |------------|----------|-------------|----------------|
        | USER | TENANT | WRITE | TENANT:WRITE |
      operationId: createEvaluationPack
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Relay_EvaluationPackRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Relay_EvaluationPackDetail'
      security:
        - Relay_bearerAuth: []
components:
  schemas:
    Relay_EvaluationPackRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 300
          minLength: 0
        description:
          type: string
          maxLength: 2000
          minLength: 0
        ownerUserId:
          type: string
          format: uuid
        enabled:
          type: boolean
      required:
        - name
        - ownerUserId
    Relay_EvaluationPackDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        owner:
          $ref: '#/components/schemas/Relay_UserRef'
        enabled:
          type: boolean
        evaluations:
          type: array
          items:
            $ref: '#/components/schemas/Relay_Evaluation'
        lastRun:
          $ref: '#/components/schemas/Relay_EvaluationRunSummary'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Relay_UserRef:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
    Relay_Evaluation:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 300
          minLength: 0
        description:
          type: string
          maxLength: 2000
          minLength: 0
        input:
          type: string
          maxLength: 20000
          minLength: 0
        source:
          $ref: '#/components/schemas/Relay_ParticipantRef'
        target:
          $ref: '#/components/schemas/Relay_ParticipantRef'
        hops:
          type: array
          items:
            $ref: '#/components/schemas/Relay_EvaluationHop'
          maxItems: 100
          minItems: 0
        enabled:
          type: boolean
      required:
        - name
        - source
        - target
    Relay_EvaluationRunSummary:
      type: object
      properties:
        runId:
          type: string
          format: uuid
        packId:
          type: string
          format: uuid
        packName:
          type: string
        status:
          type: string
          enum:
            - PENDING
            - RUNNING
            - PASSED
            - FAILED
            - ERROR
            - SKIPPED
        triggeredBy:
          $ref: '#/components/schemas/Relay_UserRef'
        triggerSource:
          type: string
          enum:
            - USER
        evaluationCount:
          type: integer
          format: int32
        passed:
          type: integer
          format: int32
        failed:
          type: integer
          format: int32
        skipped:
          type: integer
          format: int32
        durationMs:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
        startedAt:
          type: string
          format: date-time
        finishedAt:
          type: string
          format: date-time
        errorMessage:
          type: string
        verdictsSimulated:
          type: boolean
    Relay_ParticipantRef:
      type: object
      properties:
        type:
          type: string
          enum:
            - AGENT
            - USER
            - CHANNEL
            - MCP
            - LLM_GATEWAY
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - type
    Relay_EvaluationHop:
      type: object
      properties:
        hopId:
          type: string
          format: uuid
        source:
          $ref: '#/components/schemas/Relay_ParticipantRef'
        sink:
          $ref: '#/components/schemas/Relay_ParticipantRef'
        expectedAction:
          type: string
          enum:
            - LOG
            - MASK
            - WARN
            - BLOCK
            - HUMAN_REVIEW_REQUIRED
        expectedPolicyIds:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 50
          minItems: 0
        expectedMaskedFields:
          type: array
          items:
            type: string
            maxLength: 200
            minLength: 0
          maxItems: 50
          minItems: 0
        expectedPatterns:
          type: array
          items:
            $ref: '#/components/schemas/Relay_PatternAssertion'
          maxItems: 25
          minItems: 0
        notes:
          type: string
          maxLength: 2000
          minLength: 0
        assertions:
          type: array
          items:
            $ref: '#/components/schemas/Relay_HopAssertion'
      required:
        - expectedAction
        - sink
        - source
    Relay_PatternAssertion:
      type: object
      properties:
        patternId:
          type: string
          format: uuid
        label:
          type: string
          maxLength: 200
          minLength: 0
        pattern:
          type: string
          maxLength: 4000
          minLength: 0
        flags:
          type: string
          maxLength: 16
          minLength: 0
        mode:
          type: string
          enum:
            - MUST_NOT_MATCH
            - MUST_MATCH
      required:
        - label
        - mode
        - pattern
    Relay_HopAssertion:
      type: object
      properties:
        checkId:
          type: string
        kind:
          type: string
          enum:
            - ACTION
            - POLICY
            - MASKED_FIELD
            - PATTERN
        subject:
          type: string
        expected:
          type: string
  securitySchemes:
    Relay_bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token (USER, AGENT, or SERVICE auth)

````