Skip to main content

assay-sdk

The Python package for Assay, a self-hosted LLM tracing and evaluation platform.

uv add assay-sdk

The distribution is named assay-sdk and imported as assay.

Tracing

Content capture is off by default. Enable it explicitly when the traced input and output may be sent to Assay:

import assay

assay.init(
    endpoint="http://localhost:8080",
    api_key="asy_...",
    application="support-bot",
    capture=True,
)


@assay.trace
def answer(question: str) -> str:
    return "Assay evaluates AI systems."

Use assay.span(...) for explicit spans and call set_input, set_output, set_context, or set_reference on the active span. Call assay.flush() before a short-lived process exits and assay.shutdown() when the tracing lifecycle ends.

API Client

import assay

with assay.Client("http://localhost:8080", admin_token="...") as client:
    applications = client.applications.list()

Management, dataset, scorer, and run operations use an admin token. Trace inspection and scoring use a project API key.

CLI

Set ASSAY_ENDPOINT and the relevant credential, then use the management and evaluation commands:

assay projects list
assay apps list --project PROJECT_ID
assay datasets import APPLICATION_ID --file regression.jsonl
assay run create APPLICATION_ID --dataset DATASET_ID --scorers groundedness,correctness
assay run watch RUN_ID --gate groundedness:0.8
assay traces score --scorer correctness TRACE_ID
assay scores export APPLICATION_ID --failed --format jsonl
assay datasets from-trace DATASET_ID TRACE_ID --scorer groundedness
assay metrics APPLICATION_ID --scorer groundedness

Commands emit JSON. assay run watch returns exit code 1 when a run fails or a gate is not met, which makes it suitable for CI checks.

M6 commands are available from this checkout via uv run assay .... Metrics and score export require admin authentication and default to 30 days. --start and --end accept timezone-bearing timestamps for ranges up to 366 days. Trace imports preserve the selected scorer's latest evidence and reject duplicate trace/scorer pairs without overwriting existing items.

The optional tests/test_live_workflow.py acceptance test requires ASSAY_LIVE_TEST_ENDPOINT and ASSAY_ADMIN_TOKEN. It makes real judge calls using synthetic data and deletes its project.

Metadata

Release files for assay-sdk 0.3.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 assay-sdk 0.3.0
File Size Uploaded
assay_sdk-0.3.0.tar.gz 29.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for assay-sdk 0.3.0
File Interpreter ABI Platform
assay_sdk-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.9 kB

Release files / assay_sdk-0.3.0.tar.gz

Download URL assay_sdk-0.3.0.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c363128dd34eeb818a5cddbca11f967fc4f408353174b4c86aabb5a0925b4e1a
BLAKE2b-256 checksum
How to use checksums
7ee93a587677dd074269b12551c6f867678762f5c52c1b51b9df598dd33b9124
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release files / assay_sdk-0.3.0-py3-none-any.whl

Download URL assay_sdk-0.3.0-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d68a7f9c7018d51a29802ac5ecdc39411375fd7f49f79bae2c0eb4bf202f4e7a
BLAKE2b-256 checksum
How to use checksums
fc78b1697e4e4e61eb800a79a7d9a10d9b73d5b9732035761a8053b4ecd67c22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.1.0

2 release files

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