Skip to main content
Workflow evals let you freeze inputs for one workflow block and assert something about that block’s output on a later run. This page documents the API shapes for eval definitions, assertions, parent eval runs, and result rows. For the conceptual workflow and dashboard flow, see Evals.

Eval Definition

A WorkflowEval is a saved assertion plus the inputs needed to replay one block.

target

target is a discriminated union by type. The API shape is a union so workflow-level targets can be added later without renaming the field.

source

source is also a discriminated union by type. Manual handle_inputs values are typed:
When an eval is created from a run_step, Retab snapshots the inputs at create time. File handles are materialized as durable Retab file references so later eval runs do not depend on the original upload session.

assertion

Workflow evals use one assertion per eval. An assertion targets one output handle and an optional path inside that handle’s payload.
The current condition.kind values are: number_compare and length_compare support op values gt, gte, lt, lte, eq, and neq. For llm_judged_as and llm_not_judged_as, expected_label defaults to "yes" and the judge is instructed to answer "yes"/"no" for a yes/no rubric. Set it only when the rubric returns some other vocabulary, and only to a label that rubric can actually produce — an unreachable expected_label makes llm_judged_as always fail and llm_not_judged_as always pass. See Evals.

Runs

Create a parent eval run with:
The request body requires workflow_id. scope is optional:
Scope variants: A WorkflowEvalRun is the parent resource for one batch:
Run lifecycle values are pending, queued, running, completed, error, and cancelled.

Results

After a parent run finishes, list child rows with:
Each WorkflowEvalResult is the immutable record for one eval execution:
Result lifecycle values match parent run lifecycle values. verdict and assertion_result.outcome are assertion outcomes: passed, failed, or blocked. Execution errors are represented in lifecycle.status = "error" and the lifecycle error details, not as a fourth verdict value.

Freshness and Drift

Read responses recompute drift against the current workflow draft. Latest-run summaries expose lifecycle and outcome separately:

Endpoint Map

MCP Tools

The eval API is also exposed through MCP tools:
  • workflows_evals_create
  • workflows_evals_list
  • workflows_evals_get
  • workflows_evals_update
  • workflows_evals_delete
  • workflows_evals_runs_create
  • workflows_evals_runs_get
  • workflows_evals_results_list
  • workflows_evals_results_get
The tool input schemas match the request bodies above. See the MCP page for setup.