Agenta Evaluators API

Configure evaluators used to score variants.

OpenAPI Specification

agenta-evaluators-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Agenta Applications Evaluators API
  description: Agenta is an open-source LLMOps platform for prompt management, LLM evaluation, and LLM observability. This specification documents the public cloud REST API surface used to manage applications and variants, fetch and deploy versioned prompt configurations, run evaluations and configure evaluators, manage testsets, and ingest and query observability traces. All endpoints are authenticated with an Agenta API key passed in the Authorization header. Agenta is MIT licensed and may also be self-hosted.
  termsOfService: https://agenta.ai/terms
  contact:
    name: Agenta Support
    url: https://agenta.ai/
    email: team@agenta.ai
  license:
    name: MIT
    url: https://github.com/Agenta-AI/agenta/blob/main/LICENSE
  version: '1.0'
servers:
- url: https://cloud.agenta.ai/api
  description: Agenta Cloud (US)
- url: https://eu.cloud.agenta.ai/api
  description: Agenta Cloud (EU)
security:
- ApiKeyAuth: []
tags:
- name: Evaluators
  description: Configure evaluators used to score variants.
paths:
  /evaluators/query:
    post:
      operationId: queryEvaluators
      tags:
      - Evaluators
      summary: List and filter evaluators.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluatorQueryRequest'
      responses:
        '200':
          description: A list of evaluators.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Evaluator'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /evaluators/:
    post:
      operationId: createEvaluator
      tags:
      - Evaluators
      summary: Create an evaluator.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EvaluatorCreateRequest'
      responses:
        '200':
          description: The created evaluator.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Evaluator'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /evaluators/catalog/templates/:
    get:
      operationId: listEvaluatorCatalogTemplates
      tags:
      - Evaluators
      summary: List the built-in evaluator catalog templates.
      responses:
        '200':
          description: A list of evaluator templates.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EvaluatorTemplate'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    EvaluatorCreateRequest:
      type: object
      required:
      - evaluator
      properties:
        evaluator:
          type: object
          required:
          - slug
          properties:
            slug:
              type: string
            name:
              type: string
            data:
              type: object
              additionalProperties: true
    EvaluatorQueryRequest:
      type: object
      properties:
        include_archived:
          type: boolean
          default: false
        windowing:
          $ref: '#/components/schemas/Windowing'
    Evaluator:
      type: object
      properties:
        id:
          type: string
          format: uuid
        slug:
          type: string
        name:
          type: string
        data:
          type: object
          additionalProperties: true
        lifecycle:
          $ref: '#/components/schemas/Lifecycle'
    Lifecycle:
      type: object
      description: Audit metadata attached to most Agenta resources.
      properties:
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by_id:
          type: string
          format: uuid
        updated_by_id:
          type: string
          format: uuid
    EvaluatorTemplate:
      type: object
      properties:
        key:
          type: string
          example: auto_exact_match
        name:
          type: string
        description:
          type: string
        settings_schema:
          type: object
          additionalProperties: true
    Windowing:
      type: object
      description: Cursor / time-window pagination controls.
      properties:
        next:
          type: string
        limit:
          type: integer
          default: 100
        oldest:
          type: string
          format: date-time
        newest:
          type: string
          format: date-time
        order:
          type: string
          enum:
          - ascending
          - descending
    Error:
      type: object
      properties:
        detail:
          oneOf:
          - type: string
          - type: object
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Agenta API key sent in the Authorization header. Generate keys from the Agenta web app under Settings > API keys. The value is passed as `Authorization: ApiKey <key>` (Bearer-style header credential).'