Skip to content
Context docs
Evals API

Evaluations

Serverhttps://context.example.com/api/v1/evals

An evaluation measures how well agents answer, and has two kinds: a benchmark runs a fixed set of dataset tasks when you ask, and a monitor grades a sample of real requests as they finish (see Monitors). The endpoints under /benchmarks handle benchmarks. A benchmark tests one axis (model, skill or agent), compares one or more values on it, holds the rest fixed, and can set a pass threshold from 0 to 100. It has no criteria of its own: the criteria of its linked datasets grade each run.


List evaluations

GET
https://context.example.com/api/v1/evals
/benchmarks
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Lists the benchmarks in the workspace scope you read, each with its axes, judge model and threshold. Evaluations saved before axes existed are left out, and monitors are listed separately (GET /monitors/{monitorId} reads one).

List evaluations › query Parameters

workspaceScope
​string

Send it as JSON in one value, for example workspaceScope={"kind":"one","workspaceId":"<id>"}. Any other value is refused with 400.

List evaluations › Responses

Successful response

​object[]

Evaluations in the organization

An evaluation: the datasets it measures, its axes (what it tests and what it holds fixed), the default judge model for the datasets' criteria, and its pass threshold. It has no grading criteria of its own.
id
​string · minLength: 1 · required

Unique evaluation identifier

orgId
​string · minLength: 1 · required

Organization that owns this evaluation

workspaceId
​string | null · minLength: 1 · required

The workspace this evaluation belongs to; null means organization-wide, shown in every workspace

createdById
​string | null · minLength: 1 · required

User who created this evaluation

ownerUserId
​string | null · minLength: 1 · required

The person who owns this evaluation; null for evaluations made before owners were recorded (organization-wide, and changeable by an organization admin)

visibility
​string · enum · required

Where this evaluation is placed: organization-wide, shared into its workspace, or private to its owner

Enum values:
org
workspace
personal
name
​string · minLength: 1 · maxLength: 200 · required

Evaluation display name

description
​string | null · maxLength: 2000 · required

Optional evaluation description

judgeModel
​string · required

The model that grades a dataset's or task's model criterion, unless the criterion names its own model

threshold
​integer | null · min: 0 · max: 100 · required

Pass threshold on the 0 to 100 result scale; null when the evaluation sets none

​required

The question this evaluation asks: the one axis it tests, the values it compares, and what it holds fixed. Editable at any time; each run keeps its own copy from when it started.

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp


Create an Evaluation

POST
https://context.example.com/api/v1/evals
/benchmarks
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

A test-set Evaluation: what it tests (axes), its judge model and pass threshold. Every agent the axes name must be one you can run, and every skill one you can read. Link its datasets with POST /benchmarks/{evaluationId}/datasets. modelWarnings lists any model problem a run would refuse.

Create an Evaluation › Headers

Idempotency-Key
​string · maxLength: 255

A key you choose for this request (a UUID works; at most 255 characters; a blank one is refused 400, code idempotency_key_empty). A retry with the same key and the same body answers the first success again instead of acting twice; kept 24 hours. Send one on every create and run start you might retry.

Create an Evaluation › Request Body

Input for creating a new Evaluation
name
​string · minLength: 1 · maxLength: 200 · required

Benchmark display name

​required

The question: the axis tested, its values (one or more) and what is held. A skill is named at Latest (no version: its newest version, fixed when a run starts) or at a version number. Every agent it names must be one the caller can run and every skill one they can read (a pinned version must still exist), else FORBIDDEN with AxesRefusalSchema data

workspaceId
​string | null · minLength: 1

The workspace to create this in; null = organization-wide (organization admins only); omitted = the caller's only workspace, or every workspace for an organization admin

description
​string · maxLength: 2000

Optional description

judgeModel
​string

Provider-prefixed default judge model for the datasets' model criteria; omission records this deployment's effective small model

threshold
​integer | null · min: 0 · max: 100

Pass threshold (0-100); omit or null for none

Create an Evaluation › Responses

Success. A retry with the same Idempotency-Key and the same request answers this again, with Idempotent-Replayed: true.

An Evaluation as saved, and the model warnings for the axes the save wrote
id
​string · minLength: 1 · required

Unique evaluation identifier

orgId
​string · minLength: 1 · required

Organization that owns this evaluation

workspaceId
​string | null · minLength: 1 · required

The workspace this evaluation belongs to; null means organization-wide, shown in every workspace

createdById
​string | null · minLength: 1 · required

User who created this evaluation

ownerUserId
​string | null · minLength: 1 · required

The person who owns this evaluation; null for evaluations made before owners were recorded (organization-wide, and changeable by an organization admin)

visibility
​string · enum · required

Where this evaluation is placed: organization-wide, shared into its workspace, or private to its owner

Enum values:
org
workspace
personal
name
​string · minLength: 1 · maxLength: 200 · required

Evaluation display name

description
​string | null · maxLength: 2000 · required

Optional evaluation description

judgeModel
​string · required

The model that grades a dataset's or task's model criterion, unless the criterion names its own model

threshold
​integer | null · min: 0 · max: 100 · required

Pass threshold on the 0 to 100 result scale; null when the evaluation sets none

​required

The question this evaluation asks: the one axis it tests, the values it compares, and what it holds fixed. Editable at any time; each run keeps its own copy from when it started.

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp

​array · required

Every model problem in the axes this save wrote, in their order, each with its sentence (the same decision run start refuses with). Empty when every model is one its agent runs, and when an update wrote no axes: name, description and judge edits are not checked, as agents are not


Get an evaluation

GET
https://context.example.com/api/v1/evals
/benchmarks/{evaluationId}
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Returns one benchmark: its axes, judge model and pass threshold, and where it is placed. A benchmark outside your organization or your workspaces answers 404, the same as a missing one.

Get an evaluation › path Parameters

evaluationId
​string · minLength: 1 · required

Evaluation identifier

Evaluation identifier

Get an evaluation › Responses

Successful response

An evaluation: the datasets it measures, its axes (what it tests and what it holds fixed), the default judge model for the datasets' criteria, and its pass threshold. It has no grading criteria of its own.
id
​string · minLength: 1 · required

Unique evaluation identifier

orgId
​string · minLength: 1 · required

Organization that owns this evaluation

workspaceId
​string | null · minLength: 1 · required

The workspace this evaluation belongs to; null means organization-wide, shown in every workspace

createdById
​string | null · minLength: 1 · required

User who created this evaluation

ownerUserId
​string | null · minLength: 1 · required

The person who owns this evaluation; null for evaluations made before owners were recorded (organization-wide, and changeable by an organization admin)

visibility
​string · enum · required

Where this evaluation is placed: organization-wide, shared into its workspace, or private to its owner

Enum values:
org
workspace
personal
name
​string · minLength: 1 · maxLength: 200 · required

Evaluation display name

description
​string | null · maxLength: 2000 · required

Optional evaluation description

judgeModel
​string · required

The model that grades a dataset's or task's model criterion, unless the criterion names its own model

threshold
​integer | null · min: 0 · max: 100 · required

Pass threshold on the 0 to 100 result scale; null when the evaluation sets none

​required

The question this evaluation asks: the one axis it tests, the values it compares, and what it holds fixed. Editable at any time; each run keeps its own copy from when it started.

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp


Edit an Evaluation

PATCH
https://context.example.com/api/v1/evals
/benchmarks/{evaluationId}
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Changes only the fields you send. New axes replace the stored ones whole; runs already made keep the copy they froze.

Edit an Evaluation › path Parameters

evaluationId
​string · minLength: 1 · required

Evaluation identifier

Evaluation (from the path)

Edit an Evaluation › Request Body

Input for updating an existing Evaluation
name
​string · minLength: 1 · maxLength: 200

New name

description
​string | null · maxLength: 2000

New description (null to clear)

judgeModel
​string

New default judge model

threshold
​integer | null · min: 0 · max: 100

New pass threshold (0-100), or null to clear. A reading line, not part of what a run measures: no new version is cut.

​

New axes, replacing the stored ones whole. Allowed after runs exist: each run keeps the copy it froze, skill versions included. Every agent in the new axes must be one the caller can run and every skill one they can read (a pinned version must still exist), else FORBIDDEN with AxesRefusalSchema data. No new version is cut

Edit an Evaluation › Responses

Success

An Evaluation as saved, and the model warnings for the axes the save wrote
id
​string · minLength: 1 · required

Unique evaluation identifier

orgId
​string · minLength: 1 · required

Organization that owns this evaluation

workspaceId
​string | null · minLength: 1 · required

The workspace this evaluation belongs to; null means organization-wide, shown in every workspace

createdById
​string | null · minLength: 1 · required

User who created this evaluation

ownerUserId
​string | null · minLength: 1 · required

The person who owns this evaluation; null for evaluations made before owners were recorded (organization-wide, and changeable by an organization admin)

visibility
​string · enum · required

Where this evaluation is placed: organization-wide, shared into its workspace, or private to its owner

Enum values:
org
workspace
personal
name
​string · minLength: 1 · maxLength: 200 · required

Evaluation display name

description
​string | null · maxLength: 2000 · required

Optional evaluation description

judgeModel
​string · required

The model that grades a dataset's or task's model criterion, unless the criterion names its own model

threshold
​integer | null · min: 0 · max: 100 · required

Pass threshold on the 0 to 100 result scale; null when the evaluation sets none

​required

The question this evaluation asks: the one axis it tests, the values it compares, and what it holds fixed. Editable at any time; each run keeps its own copy from when it started.

createdAt
​string · date-time · required

Creation timestamp

updatedAt
​string · date-time · required

Last update timestamp

​array · required

Every model problem in the axes this save wrote, in their order, each with its sentence (the same decision run start refuses with). Empty when every model is one its agent runs, and when an update wrote no axes: name, description and judge edits are not checked, as agents are not


GET
https://context.example.com/api/v1/evals
/benchmarks/{evaluationId}/datasets
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

One link row per dataset the evaluation measures, {id, evaluationId, datasetId, order}, sorted by order; archived datasets are left out. Fetch each dataset with GET /datasets/{datasetId}.

List an evaluation's dataset links › path Parameters

evaluationId
​string · minLength: 1 · required

Evaluation identifier

Evaluation identifier

List an evaluation's dataset links › Responses

Successful response

​object[]

Dataset links for the evaluation

Ordered link between an evaluation and a dataset (many to many)
id
​string · minLength: 1 · required

Unique link identifier

evaluationId
​string · minLength: 1 · required

Parent evaluation

datasetId
​string · minLength: 1 · required

Linked dataset

order
​integer · min: 0 · required

Display and run order within the evaluation


POST
https://context.example.com/api/v1/evals
/benchmarks/{evaluationId}/datasets
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

A run of the Evaluation grades each linked dataset's latest saved version.

evaluationId
​string · minLength: 1 · required

Evaluation identifier

datasetId
​string · minLength: 1 · required
order
​integer · min: 0
Default: 0

Success

Ordered link between an evaluation and a dataset (many to many)
id
​string · minLength: 1 · required

Unique link identifier

evaluationId
​string · minLength: 1 · required

Parent evaluation

datasetId
​string · minLength: 1 · required

Linked dataset

order
​integer · min: 0 · required

Display and run order within the evaluation


List an Evaluation on an agent, skill or workflow

POST
https://context.example.com/api/v1/evals
/benchmarks/{evaluationId}/targets
Bearer (tsk_<prefix>_<secret>)
or
X-API-Key (header)

Shows the Evaluation on that agent's, skill's or workflow's page; it does not change what a run executes. An agent or skill must be one the Evaluation's axes name; a workflow must be active (GET /targets/workflows), and listing on one needs the Workflows curation the app asks for.

List an Evaluation on an agent, skill or workflow › path Parameters

evaluationId
​string · minLength: 1 · required

Evaluation identifier

Evaluation (from the path)

List an Evaluation on an agent, skill or workflow › Request Body

One target of an Offline evaluation
​required

agent or skill: one the Evaluation's axes name (tested or held); workflow: an active workflow. applet and traces are refused: a dataset run executes neither

List an Evaluation on an agent, skill or workflow › Responses

Success

An Offline evaluation's target: the Evaluation is listed on that agent's, skill's or workflow's page. It does not change what a run executes
benchmarkId
​string · minLength: 1 · required

The Evaluation (benchmark)

kind
​string · enum · required

What the Evaluation is listed on

Enum values:
agent
skill
workflow
targetId
​string · minLength: 1 · required

The agent, skill or workflow (eval_topic) id

createdById
​string · minLength: 1 · required

Who attached it; 'system' for a row moved in without a curator

createdAt
​string · date-time · required

When it was attached