Skip to content

CLI reference

This page lists every context evals command, what it does and the flag you need most.

Every command except traces get prints one JSON document on standard output (traces get prints a summary and writes the JSON to a file) and takes --help for its full syntax, flags and examples. context evals describe <shape> prints the JSON shape a command reads or writes, with no key needed. Commands marked write need a key with evals:write; the rest need evals:read.

The CLI needs three environment variables: CONTEXT_APP_ORIGIN (your deployment’s address), CONTEXT_ORG_ID (the Organization ID in Settings > General) and CONTEXT_API_KEY. CONTEXT_WORKSPACE_ID is optional and is used when you don’t pass --workspace.

--workflow <id> narrows evals list, evals benchmark list, evals datasets list, evals monitors list and evals traces list to one workflow.

Datasets and tasks

CommandWhat it doesMain flag
evals datasets listLists a workspace’s datasets, a page at a time.--workspace <id>
evals datasets get <id>Shows one dataset and its version state.
evals datasets createWrite. Creates a dataset.--name <text>
evals datasets update <id>Write. Changes a dataset’s name or description.--name <text>
evals datasets delete <id>Write. Deletes a dataset.
evals datasets duplicate <id>Write. Copies a dataset and its tasks.
evals datasets links <id>Lists the evaluations that use a dataset.
evals datasets importWrite. Imports tasks with their criteria and files from a CSV, JSON or zip file.--from <file>, --check to preview
evals datasets versions <id>Lists a dataset’s saved versions, newest first.
evals datasets save <id>Write. Saves unsaved task and criteria changes as the next version.--base-version N --working-copy-hash H
evals datasets discard <id>Write. Throws away unsaved changes, back to a saved version.--base-version N --working-copy-hash H --yes
evals datasets items list <dataset-id>Lists a dataset’s tasks.--limit N
evals datasets items get <item-id>Shows one task.
evals datasets items createWrite. Adds a task.--dataset <id> --prompt <text>
evals datasets items update <item-id>Write. Changes a task.--golden <text>
evals datasets items delete <item-id>Write. Removes a task.
evals file upload <path>Write. Uploads an input or expected file for a task and prints its ID.--dataset <id>

Criteria and models

CommandWhat it doesMain flag
evals criteria getShows the criteria on a dataset or a task.--dataset <id> or --task <id>
evals criteria setWrite. Replaces a dataset’s or a task’s criteria with a JSON file.-f <file>
evals criteria addWrite. Copies a criterion one task carries onto other tasks.--dataset <id> --criterion <name> --all
evals criteria removeWrite. Takes a criterion off tasks.--dataset <id> --criterion <name> --all
evals criteria libraryLists your organization’s shared criteria, the ones a monitor can bind.--search <text>
evals criteria shareWrite. Adds or updates one shared criterion, such as an agent judge, and prints its binding.-f <file>
evals models listLists the models an agent can run, and the judge models.--agent <id> or --evaluation <id>

Evaluations and runs

CommandWhat it doesMain flag
evals benchmark listLists a workspace’s evaluations.--workspace <id>
evals benchmark get <id>Shows one evaluation.
evals benchmark createWrite. Creates an evaluation from an axis file.--axes <file>
evals benchmark update <id>Write. Changes an evaluation.--judge-model <model>
evals benchmark delete <id>Write. Deletes an evaluation.
evals benchmark duplicate <id>Write. Copies an evaluation and its dataset links, without runs.
evals benchmark links <id>Lists the datasets linked to an evaluation.
evals benchmark linkWrite. Links a dataset to an evaluation.--benchmark <id> --dataset <id>
evals benchmark unlinkWrite. Removes a dataset from an evaluation.--benchmark <id> --dataset <id>
evals benchmark run createWrite. Starts a run of every task in every cell.--benchmark <id>
evals benchmark run list <benchmark-id>Lists an evaluation’s runs.
evals benchmark run get <run-id>Shows a run’s status and counts.
evals benchmark run watch <run-id>Waits for a run to end and prints its final status. Exits 0, 3 or 4 by outcome; see Errors.--out <path>
evals benchmark run stop <run-id>Write. Asks a run to stop. Exits 5 if it had already ended.
evals benchmark run tasks <run-id>Lists one cell’s tasks with score, verdicts, cost and latency.--cell <cell-id>
evals benchmark run task <run-id> <task-id>Shows one task’s full answer and each criterion’s reasoning.--cell <cell-id>

Monitors

These need monitoring, which your administrator turns on. See Monitors.

CommandWhat it doesMain flag
evals monitors listLists a workspace’s monitors.--agent <id>, --workflow <id>
evals monitors get <id>Shows one monitor: targets, criteria, pass mark, state and revision.--as-update
evals monitors createWrite. Creates a monitor from a JSON file.--from <file>
evals monitors update <id>Write. Replaces a monitor’s settings from a file, or changes one field.--from <file> or --pass-mark <n>
evals monitors pause <id>Write. Stops grading new requests. Results stay.--revision <n>
evals monitors resume <id>Write. Grades new requests again, charged to you.--revision <n>
evals monitors delete <id>Write. Deletes a monitor and its results.--revision <n>

Evaluations of any kind

These treat monitors (monitor:<id>) and evaluations (benchmark:<id>) the same way.

CommandWhat it doesMain flag
evals listLists monitors and evaluations together, with counts for each.--kind monitor|benchmark
evals get <ref>Shows one, with its criteria.
evals createWrite. Creates a monitor or an evaluation from a JSON file.--from <file>
evals run <ref>Write. Starts a run of an evaluation. A monitor runs on its own.
evals results <ref>Lists graded results, newest first: request, answer, score, pass and each criterion’s verdict.--limit N
evals add-rowsWrite. Adds tasks to a dataset from a JSON file.--dataset <id> --from <file>
evals targets <kind>Lists your agents, skills, applets or workflows by name, with the IDs a monitor names.--search <text>

Traces, usage and feedback

CommandWhat it doesMain flag
evals traces listLists trace sessions with filters and search.--from <when>
evals traces get <session-id>Writes one session’s full detail to a file.--out <path>
evals filter-optionsLists the models, providers, agents and users that have trace data.
evals agent <agent-id>Shows one agent’s cost, tokens and daily usage.--from <when>
evals user <user-id>Shows one user’s cost, tokens and usage by agent.--from <when>
evals feedback listLists feedback, newest first.--skill <id>

Scorecards

CommandWhat it doesMain flag
evals scorecard createWrite. Creates a rubric and attaches it to a skill.--skill <id>
evals scorecard listLists the rubrics attached to a skill.--skill <id>
evals scorecard getShows one rubric.--scorecard <id>
evals scorecard set-criteriaWrite. Replaces a rubric’s questions.--from <file>
evals scorecard renameWrite. Renames a rubric.--name <text>
evals scorecard set-descriptionWrite. Sets or clears a rubric’s description.--description <text>
evals scorecard attachWrite. Attaches a rubric to a skill.--scorecard <id> --skill <id>
evals scorecard detachWrite. Detaches a rubric from a skill.--scorecard <id> --skill <id>

Help

CommandWhat it doesMain flag
evals describePrints the JSON shape of any CLI input or output. Needs no key.