Skip to main content
Tests live in their own .test.yml files. Each file points at one agent (its target), lists a set of cases — a prompt plus the answer you expect — and says how many times to run each one. An LLM judge scores every run against the expected answer.
Only .agentic.yml agents can be tested. Inline tests: blocks in .agent.yml or .workflow.yml files are no longer supported — .test.yml is the only way to define tests.

Test file format

sales.agentic.test.yml

Top-level fields

settings

cases

How evaluation works

For each case, Oxygen:
  1. Runs the target agent runs times with the case’s prompt
  2. Asks the judge model whether each answer is factually consistent with expected — formatting and wording differences are ignored
  3. Records a pass rate per case, and whether all runs reached the same verdict
Across the file, the score is the overall pass rate over every case and run, and consistency is the fraction of cases whose runs all agreed.

Running tests

Tests run on your Oxygen deployment with oxyc, the Oxygen API client. Install it with npm i -g @oxy-hq/cli and sign in with oxyc login. The deployment queues the eval and runs it against the test files and agents the workspace has compiled — what you pushed, not the files on your machine — so push a new or edited .test.yml (and the agent change it tests) before you run it. The file argument is the test file’s path in the workspace, from the project root.

Accuracy thresholds

Use --min-accuracy to fail the command (exit code 9) when the score is below a threshold — useful as a CI quality gate:
Each test file produces one score. When several files run, --threshold-mode controls how the threshold is applied: average (default) checks the average score across files; all requires every file’s score to meet it.

Machine-readable output

The summary shows each file’s score and the prompts of the runs that failed. --json prints the full results as JSON on stdout instead. --output-json also writes the JSON to a file at the test file’s path (sales.agentic.test.results.json, or test-results.json when running every file), or to the file you name after it.

Long runs

--detach queues the run and prints its id; oxyc evals wait <run-id> picks it up later. --wait <seconds> stops waiting after that long (exit code 7) while the run goes on.

CLI reference

  • FILE — the workspace path of a .test.yml file. Omit it to run every compiled .test.yml file in the workspace.

CI example

The tests score the workspace’s compiled revision, not a pull request’s branch, so run them after a push to the branch the workspace serves has compiled. Store a personal access token as a repository secret:

Error handling

  • Wrong file type — oxyc evals run rejects any file that doesn’t end in .test.yml, and the eval engine any test whose target isn’t an .agentic.yml agent.
  • No tests found — running oxyc evals run with no file fails (exit code 5) if the workspace has no compiled .test.yml files.
  • Threshold failures — the command exits with code 9 only when --min-accuracy is set and not met. If no score was produced, it prints a warning and exits 0.