API Reference
The API is generated from the public vitest-evals exports. Start with the
workflow functions, then use the generated export pages for exact signatures,
type parameters, options, and examples.
Core Workflow
Section titled “Core Workflow”describeEvalDefine an eval suite with a bound harness and eval-aware test API.createHarnessAdapt an app, workflow, or agent into normalized eval runs.createJudgePackage reusable scoring logic for suite-level or explicit assertions.
Normalized Results
Section titled “Normalized Results”HarnessRunThe normalized result shape shared by assertions, judges, replay, and reports.NormalizedSessionSerializable messages and tool calls captured from one app execution.UsageSummaryStable provider, model, token, tool, retry, and metadata usage fields.
Judges and Matchers
Section titled “Judges and Matchers”FactualityJudgeModel-grade harness output against an expert answer.ToolCallJudgeScore expected tool names, order, and arguments from normalized calls.StructuredOutputJudgeScore JSON-safe output fields against expected metadata or matcher input.toSatisfyJudgeRun a judge explicitly from a Vitest expectation.
Generated Exports
Section titled “Generated Exports”The sidebar lists every generated function, interface, and type alias. Use the generated export index when you need a flat list of the full public surface.