Eval API overview
v1alpha1 is alpha: no compatibility guarantee.
An eval run is one eval config plus one or more task files. A task is one simulated conversation, identified by goal_id (unique within the run). The run executes in the org the bearer token belongs to, as the user the token is bound to, against a copy of the scoped agent’s configuration that cleanup removes.
Requirements
- The org is enabled for the Eval API and the Files API. Otherwise:
404 NOT_FOUND. - A Conversations API credential (
POST /oauth/v1/token, client credentials) bound to a user with Creator Studio view access and, where enforced, MW Setup edit access. Otherwise:403 REQUEST_ACCESS_DENIED.
Flow
- Upload each task file with the Files API. See Creating tasks.
- Submit with
POST /rest/v1alpha1/eval_runs, passing the eval config inline aseval_config.content. Returns202with the run, or400 VALIDATION_FAILED.validate_only: truereturns200with a run preview and creates nothing. - Poll
GET /rest/v1alpha1/eval_runs/{eval_run_id}no more than every 30 s, untillifecycle.report.statusisREPORT_STATUS_AVAILABLEorlifecycle.statusisEVAL_RUN_STATUS_COMPLETED,EVAL_RUN_STATUS_FAILED, orEVAL_RUN_STATUS_CANCELED. - Fetch
GET /rest/v1alpha1/eval_runs/{eval_run_id}/reportfor per-task results and execution traces. - Stop a run with
POST /rest/v1alpha1/eval_runs/{eval_run_id}/cancel.
Runs are visible only to the submitting user and the org’s eval admins; any other id returns 404 RESOURCE_NOT_FOUND.
Creating tasks
Tasks are uploaded with the Files API’s POST /rest/v1alpha1/files, one task file per request, then referenced by id in task_files[].file_id on POST /rest/v1alpha1/eval_runs.
purposemust beEVAL_RUNS_TASKand must precede thefilepart. YAML is detected astext/plain, which this purpose accepts.- The upload filename becomes the task file name: ≤ 128 chars matching
^[A-Za-z0-9_.-]+$, unique within the submission. - The returned
idis valid for 24 hours and only for the uploading credential. The run copies the bytes at submit. - Every upload counts against the org rate limit (120 requests per minute). Put many tasks in one
----separated file. - Upload checks are deferred to submit, which reports
ISSUE_CODE_FILE_NOT_FOUND,ISSUE_CODE_FILE_WRONG_PURPOSE,ISSUE_CODE_FILE_TOO_LARGE, orISSUE_CODE_DUPLICATE_TASK_FILE_NAMEper task file.
The eval config is not uploaded; it is sent inline as eval_config.content.
Errors
Limits
Runs over the active-run limit (per submitting user and service-wide) wait as EVAL_RUN_STATUS_QUEUED; lifecycle.queue_reason gives the limit. A run stops counting once it is failed, canceled, or completed with cleanup terminal. By default one invalid task rejects the submission; on_invalid_task: ON_INVALID_TASK_SKIP drops invalid tasks instead.
Eval config file
YAML sent inline as eval_config.content, one per run.
Persona the simulated user plays. Does not change who the conversations run as. Optional string attributes: location, timezone (default America/Los_Angeles), country_code (default USA), last_name, preferred_name, pronunciation, employee_id, department, division, cost_center_id, cost_center_name, role, manager_email, office, city, state, region, seat_link, seat_name.
hera or minerva. Agents with MCP connectors require hera.
hera only. Simulated-app ids to enable for connector_map rows whose eval_URL is an MCP endpoint that names no app.
If set, must be the token’s org (else 403 REQUEST_ACCESS_DENIED).
If set, must equal source_org (else ISSUE_CODE_UNSUPPORTED_TARGET_ORG).
One entry per connector the agent calls. Undeclared connectors are skipped and reported as WARNING_CODE_UNMAPPED_CONNECTOR_SKIPPED.
mocked: the connector points at eval_URL. as_is: the real connector and system, writes enabled; the run carries a warning.
Required for mocked, omitted for as_is.
Disambiguates connectors that share a name.
Task file
YAML with one or more tasks separated by ---.
Pinned “now” for date logic.
Seed records per collection, in the simulated app’s API shape.
Scripted turns (utterance). Omit for a goal-based task.
At least one. Every grader has name (unique within the task file), type, and optional desc.
Graders
comparison_type values: equals/eq, not_equal/ne, greater_than/gt, greater_than_or_equal/gte, less_than/lt, less_than_or_equal/lte.