llm-test-harness
Deterministic testing framework for LLM-powered apps — record/replay cassettes, eval scoring, and regression testing.
Installation
pip install llm-test-harness
pip install "llm-test-harness[anthropic]" # with Anthropic support
pip install "llm-test-harness[openai]" # with OpenAI support
Quick Start
from llm_test_harness import Harness, Metrics
import anthropic
harness = Harness(cassettes_dir='./cassettes', mode='replay')
client = harness.wrap(anthropic.Anthropic())
response = client.messages.create(
model='claude-haiku-4-5-20251001',
max_tokens=100,
messages=[{'role': 'user', 'content': 'Say hello.'}]
)
result = harness.evaluate(response.content[0].text, [
Metrics.contains('hello'),
])
assert result.passed
Release files for llm-test-harness 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_test_harness-0.1.0.tar.gz | 19.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_test_harness-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.0 kB
Release files / llm_test_harness-0.1.0.tar.gz
| Download URL | llm_test_harness-0.1.0.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25f9dd1a4297885f56285c56bee1f1887a160a574cfa4de14b6f3e52fa0d90d3
|
|
BLAKE2b-256 checksum How to use checksums |
1b87e1c259e175276e26fb50cee00cce0fb6836728ebd23dd37cc7357c099343
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 16, 2026.
Transparency logRelease files / llm_test_harness-0.1.0-py3-none-any.whl
| Download URL | llm_test_harness-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e87c2e0d4b203306e5825a4cb53f34e4c807775e81df40f4cda670821f3ee03
|
|
BLAKE2b-256 checksum How to use checksums |
dbc00504a0f8c457e1c63cdcde1f1f5cbdc0fa6ae228c26c7d281e4fda9ead8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 16, 2026.
Transparency log