Skip to main content

evalsi

Evaluate AI before you ship, while it runs, and as you train it.

evalsi is the Python SDK and CLI of Evalsi, a pluggable, sandboxed and self-hosted evaluation service. Before you ship, it runs agents, RAG pipelines and models on datasets and sandboxed tasks and fails the build when a gate fails. While it runs, it scores live traces. As you train, the same evaluators become RL rewards and checkpoint checks. Agents come first, and a metric means the same thing in CI, in production and in training.

Documentation · GitHub · Changelog · Examples

A terminal: pip install evalsi, evalsi init my-evals, then evalsi run passes its gates on run.yaml and fails one on regressed.yaml, exiting 3.

Real output of the published package: a starter, a passing gate, and a regression that fails the build with exit code 3.

Why Evalsi

  • Built first for agents. Agents run on sandboxed tasks (SWE-bench, τ-bench, Terminal-Bench, BFCL) and a hidden checker grades the end state. Evaluators score tool calls, trajectories, loops, step budgets and policy violations, with pass@k and pass^k over trials, and gates fail the build when an agent gets worse.
  • RAG, scored where it breaks. Retrieval (context-precision, context-recall) and generation (faithfulness, answer-relevance) are scored separately, plus citation-accuracy, which needs no judge. RAGAS and DeepEval metrics run through your judge.
  • Training, not only testing. Evaluators become RL rewards for TRL, verl and OpenRLHF, and every checkpoint is checked against the base model with regression gates.
  • Live traffic. Production traces from LangGraph, CrewAI, the OpenAI Agents SDK, LlamaIndex and the Claude Agent SDK are scored as they arrive, and the scores go back to MLflow, Phoenix or Langfuse.
  • Four ways in. Run an agent, a model or a RAG pipeline on a dataset with trials, gates and budgets, Watch live traces with online policies, Score outputs you have, and Reward RL training with the same evaluators.
  • Honest numbers. Every mean has a confidence interval. Records an evaluator can't judge are skipped, never scored as zero, and evaluator failures are errors. There is no default judge, so nothing is billed by surprise.
  • Pluggable. Your evaluators are Python functions or sandboxed Wasm modules; lm-evaluation-harness, Inspect AI, RAGAS and DeepEval run as adapters. DeepEval's 30 metrics include G-Eval and JevEval, whose decisions can come from token logprobs of a model you serve on vLLM, SGLang or Ollama.
  • Fails closed. Untrusted code runs in Firecracker microVMs, bubblewrap, Landlock or hardened pods, never with weaker isolation than asked.

Install

python -m venv .venv
. .venv/bin/activate
python -m pip install evalsi

On Windows, activate with .venv\Scripts\Activate.ps1 instead. Reuse your application's existing activated environment when integrating its callable.

Python 3.11 or newer. Basic recorded-output scoring needs only this SDK, not the harness, server, Docker, Kubernetes or a model API key.

Install extras only for a capability you choose: anthropic for Claude, server for the server's evaluator worker, analytics for DuckDB, hf for Hugging Face datasets, grpc for streaming, jsonschema for JSON Schema, and math for symbolic checks.

On Linux (amd64 and arm64), pip installs a platform wheel that also carries the evalsid server and its static bubblewrap, so evalsi serve, sandboxed code evaluators and Wasm plugins need nothing else (evalsi evalsid-path shows the one in use). Elsewhere you get the pure-Python wheel; point EVALSID at an evalsid from the releases page when you need the server.

Quickstart

Save these synthetic records as cases.jsonl, or use your application's approved records with the same fields:

{"id":"correct","input":"What is the return window?","output":"30 days","reference":"30 days"}
{"id":"regression","input":"What is the return window?","output":"7 days","reference":"30 days"}
evalsi eval --data cases.jsonl --evaluators exact-match --output results.json
evalsi report results.json -o report.html

Open report.html. One check passes; inspect regression for the incorrect answer. Exact match checks literal agreement, not semantic quality. An exit code of 0 means scoring completed, not that every check passed or a release was approved. Two synthetic examples do not establish release safety. Choose appropriate checks and explicit gates for your own application.

The guided setup explains connecting an application, version availability, and optional harness execution. No source checkout is needed for this recorded-output quickstart.

Add a judge explicitly, any OpenAI-compatible server or Claude:

evalsi eval --data cases.jsonl --evaluators llm-judge \
  --judge-provider anthropic --judge-model claude-opus-5-5 --param llm-judge.rubric=helpfulness

From Python, with your own evaluator beside the built-in ones:

import evalsi
from evalsi import Record, Score, evaluator


@evaluator(name="acme/polite", version="1.0.0")
def polite(record: Record) -> Score:
    return Score(passed="please" in record.output.as_text().lower())


result = evalsi.evaluate("cases.jsonl", ["exact-match", polite])
print(result.table())
result.save("results.json")  # manifest, summaries and every per-record result

Runs and CI gates

A run spec generates outputs from a target, scores them and checks gates. The same file runs in-process, on a server, or as a Kubernetes EvalRun; a failed gate exits 3, so CI fails.

evalsi run -f run.yaml                                   # embedded
evalsi run -f run.yaml --server https://evalsi.example   # on a server
evalsi compare --server https://evalsi.example <baseline-run> <candidate-run>
evalsi gate -f gate.yaml --server https://evalsi.example --release v42   # a deploy gate

On a server

evalsid serves the same evaluators over gRPC, HTTP/JSON and REST, with durable runs, online policies, trace sources, webhooks, auth and a web UI. From Python:

import evalsi
from evalsi.client import Client

with Client("https://evalsi.example") as client:  # API key from EVALSI_API_KEY
    print(client.evaluate("cases.jsonl", ["exact-match"]).table())
    client.log_run(
        evalsi.evaluate("cases.jsonl", ["exact-match"]), name="nightly"
    )  # store a local result

Client.evaluate() returns the same result as in-process evalsi.evaluate(), intervals included.

Rewards for RL

A reward spec turns evaluators into a weighted, gated reward, in-process or served to trainers:

from trl import GRPOConfig, GRPOTrainer
from evalsi.rewards.trl import reward_funcs

funcs, weights = reward_funcs("code-reward.yaml")
trainer = GRPOTrainer(
    model=model,
    reward_funcs=funcs,
    args=GRPOConfig(..., reward_weights=weights),
    train_dataset=dataset,
)

verl (evalsi.rewards.verl) and OpenRLHF (evalsi.rewards.openrlhf, or evalsi rewards serve) use the same spec. evalsi checkpoints evaluates every training checkpoint against the base model.

Evaluators

Pack Evaluators
core exact, contains, fuzzy, numeric and regex match; JSON validity and schema; length; latency; tokens; cost
judge llm-judge with rubrics
text BLEU, ROUGE, chrF, token F1
rag faithfulness, answer relevance, context precision and recall, citation accuracy
safety PII, secret and canary leaks; refusal; harmlessness
agent tool-call accuracy, trajectory match, tool errors, loops, step budget, task success (pass@k, pass^k), code quality
code unit tests in the sandbox, Python syntax
rl format, math answers, sandboxed code tests, overlong penalty, reward models
finetune diversity, calibration, contamination, reward hacking
ml-classic classification, regression and ranking metrics
ml-monitoring drift (PSI, KS, Jensen-Shannon), data quality, group fairness

evalsi catalog lists every installed evaluator and its params. Third-party packs plug in through the evalsi.packs entry point, exactly like the built-in ones.

More

  • evalsi-harness: the built-in agent harness for agent runs.
  • Guides: agent runs, online evaluation, trace sources, fine-tuning and RL, Kubernetes, identity and more.
  • evalsi mcp serves Evalsi to coding agents over MCP.

Evalsi is pre-1.0: the API is v1alpha1 and can change between minor versions. Apache-2.0.

Metadata

Release files for evalsi 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evalsi 0.4.0
File Size Uploaded Provenance Actions
evalsi-0.4.0.tar.gz 634.0 kB With provenance Details for evalsi-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for evalsi 0.4.0
File Interpreter ABI Platform Actions
evalsi-0.4.0-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for evalsi-0.4.0-py3-none-manylinux_2_17_x86_64.whl
evalsi-0.4.0-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for evalsi-0.4.0-py3-none-manylinux_2_17_aarch64.whl
evalsi-0.4.0-py3-none-any.whl Python 3 none any Details for evalsi-0.4.0-py3-none-any.whl

Total release size: 47.1 MB

Release files / evalsi-0.4.0.tar.gz

Download URL evalsi-0.4.0.tar.gz
Size 634.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5190d482b456964f67bc37e049da326c7f097b9f87ea667984694fc1c4b580a6
BLAKE2b-256 checksum
How to use checksums
8d848d3b38315f363b7e7110671875fff1fe8cde1f20fb42f7e4d7aeae4aceed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / evalsi-0.4.0-py3-none-manylinux_2_17_x86_64.whl

Download URL evalsi-0.4.0-py3-none-manylinux_2_17_x86_64.whl
Size 24.1 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
e426d9272f378c9589c4d4dce2dccf29d5545762225d2990727662a725bd42bb
BLAKE2b-256 checksum
How to use checksums
e8452e098d9530c9613474e60129b2e6df1f3e76fdb55630f6ff761a96e498aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / evalsi-0.4.0-py3-none-manylinux_2_17_aarch64.whl

Download URL evalsi-0.4.0-py3-none-manylinux_2_17_aarch64.whl
Size 21.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
b67c47ef3b9a3d4e1e3c1a0f359f1548910b341b2ee5a8d24853da3eef3ffb8d
BLAKE2b-256 checksum
How to use checksums
57af75b590cec2ce692caa2f02e590608557a716bfd1e5e2b79dfbf7a8801a77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / evalsi-0.4.0-py3-none-any.whl

Download URL evalsi-0.4.0-py3-none-any.whl
Size 585.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ad9b6d84423e448efda93c1488f6e7cb1d8c6e56e19c6bc037999565f1bbe07
BLAKE2b-256 checksum
How to use checksums
0ffa80df70236818bb031dc7c4c2eaceac6d5f7612314d2e0bb56f8585fe2767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for evalsi 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for evalsi-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page