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

# Create Evaluation

> Create a new evaluation job.

Creates a Kubernetes Job to run the evaluation and tracks it in memory.
Fetches agent configuration from Agent Registry using the provided agent_id.
JWT token is retrieved from request context (set by JWTAuthMiddleware).

Args:
    request: Evaluation configuration with agent_id and team_id
    claims: JWT claims with user and team info
    diamond_domain: Diamond domain orchestrator

Returns:
    Evaluation ID, status, and status URL



## OpenAPI

````yaml /openapi/api.json post /v1/evaluations/
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/evaluations/:
    post:
      tags:
        - Diamond
        - evaluations
      summary: Create Evaluation
      description: >-
        Create a new evaluation job.


        Creates a Kubernetes Job to run the evaluation and tracks it in memory.

        Fetches agent configuration from Agent Registry using the provided
        agent_id.

        JWT token is retrieved from request context (set by JWTAuthMiddleware).


        Args:
            request: Evaluation configuration with agent_id and team_id
            claims: JWT claims with user and team info
            diamond_domain: Diamond domain orchestrator

        Returns:
            Evaluation ID, status, and status URL
      operationId: create_evaluation_v1_evaluations__post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEvaluationRequest'
        required: true
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEvaluationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateEvaluationRequest:
      properties:
        agent_id:
          type: string
          format: uuid
          title: Agent Id
          description: UUID of the agent from Agent Registry
        team_id:
          type: string
          format: uuid
          title: Team Id
          description: UUID of the team that owns this evaluation (required)
        type:
          type: string
          title: Type
          description: Type of evaluation to run. Currently only 'behavioral' is supported.
          default: behavioral
        harness_names:
          items:
            type: string
          type: array
          minItems: 1
          title: Harness Names
          description: >-
            List of harnesses to run (e.g., ['safety', 'ethics', 'privacy',
            'security', 'toxicity'])
        harness_type:
          $ref: '#/components/schemas/HarnessType'
          description: >-
            Type of all harnesses: 'standard' or 'custom'. All harnesses in
            harness_names must be of this type.
          default: standard
        sample_size:
          anyOf:
            - type: integer
              maximum: 1000
              minimum: 1
            - type: 'null'
          title: Sample Size
          description: >-
            Number of prompts to randomly sample per harness. If omitted, all
            prompts run (~1250 for security). Recommended: 10 for fast
            iteration, 50 for moderate, 100 for thorough.
        evaluation_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Evaluation Id
          description: >-
            Optional UUID for the evaluation. If provided, this UUID will be
            used when creating the evaluation in Diamond. If not provided,
            Diamond will generate one.
      type: object
      required:
        - agent_id
        - team_id
        - harness_names
      title: CreateEvaluationRequest
      description: Request model for creating a new evaluation.
    CreateEvaluationResponse:
      properties:
        evaluation_id:
          type: string
          format: uuid
          title: Evaluation Id
        status:
          type: string
          title: Status
      type: object
      required:
        - evaluation_id
        - status
      title: CreateEvaluationResponse
      description: Response model for evaluation creation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    HarnessType:
      type: string
      enum:
        - standard
        - custom
      title: HarnessType
      description: Type of harness.
    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

````