getsentry/vitest-evals
A vitest extension for running evals.
What it solves
This project provides a structured way to test and evaluate AI agents and LLM-powered applications. It solves the difficulty of measuring agent performance by integrating directly with the Vitest testing framework, allowing developers to treat AI evaluations like standard unit tests.
How it works
It uses a "harness" pattern where you define a suite using describeEval and execute agent actions via a run function. You can use standard Vitest assertions for deterministic checks and layer in AI-powered "judges" (like a FactualityJudge) to grade agent outputs against specific rubrics. The system supports tool replay to record and reuse tool interactions, and it generates detailed JSON reports that can be inspected via a local React-based UI or published as summaries in GitHub Actions.
Who it’s for
Developers building AI agents or LLM applications who want to incorporate rigorous, repeatable evaluations into their existing CI/CD pipelines and testing workflows.
Highlights
- Integrates seamlessly with Vitest for a familiar testing experience.
- Includes built-in judges for factuality, structured output, and tool call validation.
- Supports tool replay to record and reuse agent interactions, reducing costs and latency.
- Provides a local UI for inspecting traces, usage metadata, and evaluation results.
- Offers a dedicated GitHub reporter for CI/CD integration, including PR annotations and pass-rate gating.
Related
- Project
- Project
- Project
- Dispatch
- Project