Skip to main content

awr-emitter

Emit a signed AWR/2 WorkReceipt in one function call.

There are two sides to AWR and they need different code. A verifier reads a receipt and checks it; that is the awr package. An emitter writes one: it takes what your system just did and signs a document saying so. That is this package. It implements none of the format itself — every byte of canonicalization, every signature and every identifier comes from awr, so an emitted receipt and a verified receipt can never disagree about the rules.

from awr_emitter import emit_receipt, generate_key, jcs_payload

key = generate_key()                      # keep this; its .did is your issuer identity

receipt = emit_receipt(
    key=key,
    model_id="claude-opus-5@anthropic",
    input_payload=jcs_payload({"prompt": "summarise this", "n": 3}),
    output_payload=b"...the model's answer...",
    latency_ms=2340,
)

receipt is a plain dict, ready for json.dump. Anyone can check it without this package and without trusting you:

pip install awr
python -m awr verify receipt.json

The document is a W3C Verifiable Credential 2.0 with an eddsa-jcs-2022 DataIntegrityProof over RFC 8785 canonical bytes, issued under a did:key. Nothing about it is specific to this implementation: an unmodified off-the-shelf VC library verifies it, and there are two other independent verifiers (Rust and browser JavaScript) that agree byte for byte.

What it will not do

It does not verify. That is deliberate and the two jobs stay in different packages — a component that both issues and judges its own work is not evidence of anything.

Framework adapters

awr_emitter.adapters holds bridges to agent frameworks. Each is duck-typed against the framework instead of importing it, so this package depends on no framework and importing the adapters never pulls one in:

adapter use it for
awr_emitter.adapters.langgraph_callback LangChain / LangGraph — a callback handler that emits one receipt per LLM call

Links

MIT.

Metadata

Release files for awr-emitter 2.0.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 awr-emitter 2.0.0
File Size Uploaded
awr_emitter-2.0.0.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awr-emitter 2.0.0
File Interpreter ABI Platform
awr_emitter-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.9 kB

Release files / awr_emitter-2.0.0.tar.gz

Download URL awr_emitter-2.0.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
74106b3fabcf8856b9d2de9bd4b2620f6fcd14bae83e4d11ad433ee2d26b12d8
BLAKE2b-256 checksum
How to use checksums
b4fc5bc42a4af03f4502d2e676f51aa6d9cbe5424dafc729e323879cbc29e8ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / awr_emitter-2.0.0-py3-none-any.whl

Download URL awr_emitter-2.0.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6da1238175859802ebcf7a515b8c2d9f6db24b1608f60cb3f42247a9ee6aa3c3
BLAKE2b-256 checksum
How to use checksums
4327e9b05666392b4e20f4fbb7c014daf2dbbad2dc8001f4fb8c127f6165d7b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

2.0.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