*.eval.ts file and is declared with defineEval.
What an eval contains
An eval does not declare which Agent it runs against — it stays agent-neutral by default, so the same eval can run against different Agents under different experiments. Choosing the Agent is a field of the experiment, not something the CLI overrides ad hoc.
Do not hand-write
id or name. NiceEval derives the eval ID from the file path.Path is identity
evals/weather/brooklyn.eval.ts has ID weather/brooklyn. Positional arguments after the experiment name filter by ID prefix:
terminal-swe-bench also matches terminal-swe-bench-astropy-1 — the character right after the match is not required to be /.
Lifecycle
1
Discovery
The runner loads the
*.eval.ts files and fixture directories under evals/.2
Scheduling
Build the execution plan from concurrency, cache, attempts, and early exit.
3
agent.send
t.send() calls the selected Adapter and receives a standard Turn.4
Evaluate assertions
NiceEval collects value assertions, scoped assertions, judge scores, and test results.
5
Verdict
All assertion results fold into one final verdict.
6
Report
The console and reporters emit the results, and facts are committed to the
.niceeval/ Record root.Verdict types
passed
All gate assertions passed (under
--strict, soft assertions also met their thresholds), and no execution error occurred.failed
At least one gate assertion failed, or under
--strict a soft assertion came in below its threshold.errored
An execution error, timeout, or authoring error — this run cannot produce a trustworthy conclusion.
skipped
The eval skipped itself, usually through
t.skip(reason).Gate and soft
gate is a hard threshold. Failure makes the eval fail. soft contributes a score without necessarily failing the eval. See Assert for the full rules.
The *.eval.ts convention
Only files ending in .eval.ts are discovered. Use directories for grouping:
Array exports and data-driven tests (dataset fan-out)
A file can also default-export an array ofdefineEval(...) calls to generate multiple cases from the same logic:
sql/0000 and sql/0001. See Dataset fan-out.
Related reading
- Experiment — The other half: who to evaluate and how to run it, and why it is kept separate from the eval (late binding).
- Assert — The full verdict rules for gate and soft assertions.