Skip to main content

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

Metadata

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)

Source distribution for llm-test-harness 0.1.0
File Size Uploaded Provenance Actions
llm_test_harness-0.1.0.tar.gz 19.9 kB With provenance Details for llm_test_harness-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-test-harness 0.1.0
File Interpreter ABI Platform Actions
llm_test_harness-0.1.0-py3-none-any.whl Python 3 none any Details for llm_test_harness-0.1.0-py3-none-any.whl

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 log

Release 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

Security for llm-test-harness 0.1.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_test_harness-0.1.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 Mar 16, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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