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

# Create agent evaluation

> Register a new two-plane agent evaluation and return its initial record.

This is the control-plane entry point for the two-plane agent-eval system and is
gated by the `SGP_TWO_PLANE_AGENT_EVALS_ENABLED` feature flag. The request is
metadata-only: it must reference data that already lives in the data plane via
`data_plane_dataset_id` and must supply at least one task and a
`projection_policy_id`. Inline raw evaluation data is rejected — if the payload
contains any forbidden raw-data field (e.g. `prompt`, `output`, `response`,
`dataset`, `rows`, `traces`, `credentials`), validation fails before the request
is forwarded. Use this instead of embedding evaluation rows in the request.

The call is proxied to the agent-eval control service; if that service is
unreachable the endpoint returns 503. On success the returned record includes a
`run_id`, a `status`, and a `progress` block (per-workflow status and item
completion counts) that reflect the run as it executes over time — poll the get
or results endpoints to observe completion rather than expecting a finished run
on this response.



## OpenAPI

````yaml https://api.dev-sgp.scale.com/openapi-versions/v5/openapi.json post /v5/agent-evaluations
openapi: 3.1.0
info:
  title: EGP API V5
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
paths:
  /v5/agent-evaluations:
    post:
      tags:
        - Agent Evaluations
      summary: Create agent evaluation
      description: >-
        Register a new two-plane agent evaluation and return its initial record.


        This is the control-plane entry point for the two-plane agent-eval
        system and is

        gated by the `SGP_TWO_PLANE_AGENT_EVALS_ENABLED` feature flag. The
        request is

        metadata-only: it must reference data that already lives in the data
        plane via

        `data_plane_dataset_id` and must supply at least one task and a

        `projection_policy_id`. Inline raw evaluation data is rejected — if the
        payload

        contains any forbidden raw-data field (e.g. `prompt`, `output`,
        `response`,

        `dataset`, `rows`, `traces`, `credentials`), validation fails before the
        request

        is forwarded. Use this instead of embedding evaluation rows in the
        request.


        The call is proxied to the agent-eval control service; if that service
        is

        unreachable the endpoint returns 503. On success the returned record
        includes a

        `run_id`, a `status`, and a `progress` block (per-workflow status and
        item

        completion counts) that reflect the run as it executes over time — poll
        the get

        or results endpoints to observe completion rather than expecting a
        finished run

        on this response.
      operationId: POST-V5-/v5/agent-evaluations
      parameters:
        - name: x-selected-account-id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Account ID Header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentEvaluationCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentEvaluation'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    AgentEvaluationCreateRequest:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
        description:
          title: Description
          type: string
        tags:
          items:
            type: string
          type: array
          title: Tags
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        data_plane_dataset_id:
          type: string
          minLength: 1
          title: Data Plane Dataset Id
        tasks:
          items:
            $ref: '#/components/schemas/AgentEvaluationTask'
          type: array
          minItems: 1
          title: Tasks
        projection_policy_id:
          type: string
          minLength: 1
          title: Projection Policy Id
        account_id:
          type: string
          minLength: 1
          title: Account Id
          default: local-account
        tenant_id:
          type: string
          minLength: 1
          title: Tenant Id
          default: local-tenant
      additionalProperties: false
      type: object
      required:
        - name
        - data_plane_dataset_id
        - tasks
        - projection_policy_id
      title: AgentEvaluationCreateRequest
      example:
        account_id: acct_123
        data_plane_dataset_id: dp_dataset_123
        description: Metadata-only control-plane request
        metadata:
          suite: golden
        name: Agent judge eval
        projection_policy_id: policy_eval_projection_v1
        tags:
          - two-plane
          - mvp
        tasks:
          - alias: mock_judge
            config:
              judge_adapter: mock
            type: auto_evaluation.agent
        tenant_id: tenant_123
    AgentEvaluation:
      properties:
        id:
          type: string
          title: Id
        run_id:
          type: string
          title: Run Id
        name:
          type: string
          title: Name
        description:
          title: Description
          type: string
        status:
          $ref: '#/components/schemas/AgentEvaluationStatus'
        progress:
          $ref: '#/components/schemas/AgentEvaluationProgress'
        tasks:
          items:
            $ref: '#/components/schemas/AgentEvaluationTask'
          type: array
          title: Tasks
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        tags:
          items:
            type: string
          type: array
          title: Tags
        account_id:
          type: string
          title: Account Id
        tenant_id:
          type: string
          title: Tenant Id
        data_plane_dataset_id:
          type: string
          title: Data Plane Dataset Id
        data_plane_version:
          title: Data Plane Version
          type: string
        projection_policy_id:
          type: string
          title: Projection Policy Id
        projection_freshness_seconds:
          title: Projection Freshness Seconds
          type: integer
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        error_count:
          type: integer
          minimum: 0
          title: Error Count
          default: 0
      additionalProperties: false
      type: object
      required:
        - id
        - run_id
        - name
        - status
        - progress
        - tasks
        - account_id
        - tenant_id
        - data_plane_dataset_id
        - projection_policy_id
        - created_at
        - updated_at
      title: AgentEvaluation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AgentEvaluationTask:
      properties:
        alias:
          type: string
          minLength: 1
          title: Alias
        type:
          type: string
          minLength: 1
          title: Type
        config:
          additionalProperties: true
          type: object
          title: Config
        depends_on:
          items:
            type: string
          type: array
          title: Depends On
      additionalProperties: false
      type: object
      required:
        - alias
        - type
      title: AgentEvaluationTask
    AgentEvaluationStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
      title: AgentEvaluationStatus
    AgentEvaluationProgress:
      properties:
        workflows:
          items:
            $ref: '#/components/schemas/AgentEvaluationProgressWorkflow'
          type: array
          title: Workflows
        total_items:
          type: integer
          minimum: 0
          title: Total Items
          default: 0
        completed_items:
          type: integer
          minimum: 0
          title: Completed Items
          default: 0
      additionalProperties: false
      type: object
      title: AgentEvaluationProgress
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          title: Error Type
          type: string
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AgentEvaluationProgressWorkflow:
      properties:
        name:
          type: string
          title: Name
        status:
          $ref: '#/components/schemas/AgentEvaluationStatus'
          default: pending
      additionalProperties: false
      type: object
      required:
        - name
      title: AgentEvaluationProgressWorkflow
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````