Skip to main content

assay-evals

Record what your AI system does, and how it went, in Assay: runs, agent steps, user feedback and test results. Standard library only, Python 3.9+.

pip install assay-evals

You need an Assay server to send to. See the setup guide.

import assay_sdk as assay

assay.init("https://assay.example.com", key="ak_...")   # or set ASSAY_URL / ASSAY_KEY

# An agent
with assay.run("refund_request", input=message, version={"prompt": "support@v5", "model": "claude-sonnet-5"}) as run:
    run.llm(model="claude-sonnet-5", tokens_in=620, tokens_out=180, cost_usd=0.0024)
    order = run.call("get_order", get_order, order_id="O-17")    # runs it; records the result or the error
    run.state("refund:O-17", "create", {"amount": order["price"]})
    run.answer(f"Refunded ${order['price']}.")

# A pipeline
with assay.run("invoice", kind="pipeline", input_ref="s3://inbox/inv-9.pdf") as run:
    with run.stage("extract", prompt="extract_fields@v13") as s:
        run.llm(model="claude-sonnet-5", cost_usd=0.01)          # nested under the stage
        s.outputs.update(fields)

# Outcomes, whenever they're known
assay.feedback(run.id, "thumbs_down")
assay.correction(run.id, "total", expected="1240.00", observed="1204.00")
assay.check("nightly-0924", "case-17", "fail", run_id=run.id, field="total", expected="1240.00", actual="1204.00")
assay.expect("case-17", calls=[{"tool": "get_order", "args": {"order_id": "O-17"}}], answer="27.61")
Call Records
assay.run(task, kind="agent"|"pipeline", input=, version=, test={"run", "case", "attempt"}) one run; an exception ends it as failed
run.llm(...), run.tool(name, args, result), run.call(name, fn, **args), run.state(obj, op, value), run.answer(text), with run.stage(name) as s its steps, in order
assay.feedback, assay.check, assay.correction, assay.expect outcomes, sent whenever they're known
assay.flush() send now (short-lived scripts); also happens every second and at exit

These options go to init():

  • redact: a function applied to inputs, arguments, results, text and outputs before they leave the process.
  • sample=0.1: record one run in ten. A run is recorded whole or not at all, and outcomes are always sent.
  • strict=True: raise send errors while developing. Otherwise the SDK never raises into your code.
  • enabled=False: the SDK does nothing, e.g. in unit tests.

Events follow the Assay event schema v1. They stream to POST /v1/ingest in the background, so a run that crashes still shows every step up to the crash.

Release files for assay-evals 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 assay-evals 0.1.0
File Size Uploaded
assay_evals-0.1.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for assay-evals 0.1.0
File Interpreter ABI Platform
assay_evals-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / assay_evals-0.1.0.tar.gz

Download URL assay_evals-0.1.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
90d0ef272b79a0d8bfbac3c1d263f1f624df18a100bae16d64f80450f8c9658a
BLAKE2b-256 checksum
How to use checksums
2b8c69d0c4d15f217f9fcf7542f4c11b3aed2cb43dbd0729c75a3392bb492dc0
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 24, 2026.

Transparency log

Release files / assay_evals-0.1.0-py3-none-any.whl

Download URL assay_evals-0.1.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a814a25699ce5f7be9aebea1eaca83d059be8b87ffeb48eb1bde5c6d1522ede
BLAKE2b-256 checksum
How to use checksums
cfc66650b448fc17000a0aa5c6b7b5c10d84bc3914073ed2e905ff97fd5e9d61
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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