YY Workload Receipt
YY Workload Receipt (wlr) creates deterministic, content-free receipts from
AI workload usage metadata. It gives developers a small, local artifact they
can verify after it is copied, archived, or shared without collecting prompts
or tool payloads.
Use it to answer a narrow question:
What measurable resources and operations did this run consume, and has its receipt changed since it was generated?
The package has no runtime dependencies and makes no model or API calls.
Installation
Install a published release from PyPI:
python -m pip install yy-workload-receipt
Before the first PyPI release, install a release wheel directly:
python -m pip install ./yy_workload_receipt-0.1.0-py3-none-any.whl
Python 3.10 or newer is required.
Quick start
Generate a receipt from portable JSONL events and verify it later:
wlr receipt ./events.jsonl -o ./receipt
wlr verify ./receipt
The same commands are available through the module entry point:
python -m yy_workload_receipt receipt ./events.jsonl -o ./receipt
python -m yy_workload_receipt verify ./receipt
receipt writes exactly three files:
summary.json: canonical aggregate measurements and explicit evidence gaps.report.md: a deterministic human-readable view of the same receipt.manifest.sha256: SHA-256 hashes covering both artifacts.
verify fails when either covered artifact is missing or changed, when the
manifest is malformed or incomplete, or when the receipt directory contains an
unexpected entry. Symbolic links cannot stand in for covered artifacts.
OpenAI Agents SDK usage adapter
The openai-usage adapter accepts the JSON object returned by the OpenAI Agents
SDK public agents.usage.serialize_usage(...) helper. It does not inspect
traces:
wlr receipt ./usage.json -o ./receipt --adapter openai-usage \
--run-id run-001 --observed-at 2026-07-31T12:00:00Z \
--provider openai --model example-model
In PowerShell, replace each trailing \ with a backtick. The adapter requires
per-request usage entries. It reports disagreements between those entries and
aggregate counters as evidence gaps rather than silently choosing one value.
A sanitized input and generated receipt are available under examples/.
Portable JSONL format
Each non-empty line is one flat JSON event:
{"schema_version":"0.1","run_id":"run-001","seq":1,"ts":"2026-07-31T12:00:00Z","kind":"model_call","provider":"openai","model":"example-model","tokens_input":120,"tokens_output":30,"tokens_cached":0,"tokens_reasoning":0,"duration_ms":850}
Supported event kinds are model_call, tool_call, approval, retry, and
error. See yy_workload_receipt.model.ALLOWED_FIELDS for the complete flat
schema.
Unknown fields are discarded and reported without reproducing their names or
values. Common content-bearing fields, including prompt, message,
content, arguments, and payload fields, cause the entire line to be rejected
without reproducing the field name or value in output.
Exit codes
| Code | Meaning |
|---|---|
0 |
Receipt generation or verification completed successfully. |
1 |
Input, build, I/O, or verification failed. |
2 |
A partial JSONL receipt was written, but one or more input lines were rejected. |
Treat exit code 2 as incomplete evidence. Inspect the evidence gaps before
using or sharing the receipt.
Privacy and security boundary
This project is designed for metadata, not content. Do not put prompts, messages, tool arguments, tool results, credentials, personal data, or raw exception messages into an input file. Its allowlist and rejection rules reduce accidental retention; they are not a substitute for reviewing data before it is shared.
The tool does not provide an observability dashboard, billing or cost
estimate, security audit, compliance certification, or hardware recommendation.
Missing observations remain explicit evidence gaps rather than assumed zeroes.
The future hardware-analysis input boundary is documented, without an
implementation, in docs/hardware-fit-input-contract.md.
Development
python -m venv .venv
python -m pip install -e ".[dev]"
python -m ruff check .
python -m pytest
python -m build
python -m twine check dist/*
See CONTRIBUTING.md for the initial contribution boundary, SUPPORT.md for
support expectations, and SECURITY.md for private vulnerability reporting.
License
Licensed under Apache License 2.0. See LICENSE and NOTICE.
Release files for yy-workload-receipt 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 | |
|---|---|---|---|
| yy_workload_receipt-0.1.0.tar.gz | 26.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yy_workload_receipt-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.9 kB
Release files / yy_workload_receipt-0.1.0.tar.gz
| Download URL | yy_workload_receipt-0.1.0.tar.gz |
|---|---|
| Size | 26.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e5b9ac75ea0e2f9d5238acde6fc81f1719271503ef8040126a70ed8c958877f
|
|
BLAKE2b-256 checksum How to use checksums |
b9e88638f0b109420de46fc16cefd82a0b82967158d82de1808b5dee6707fe3d
|
| 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 Aug 1, 2026.
Transparency logRelease files / yy_workload_receipt-0.1.0-py3-none-any.whl
| Download URL | yy_workload_receipt-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5006ea2e7f15cc70548668874f54488e18c6aed0213540f0169c4e83a691e7bd
|
|
BLAKE2b-256 checksum How to use checksums |
ab0bf4bf63e978fadf77d4353a779546c8291af12eaf7b08dbfa02baa360462b
|
| 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 Aug 1, 2026.
Transparency log