Skip to main content

Signed execution receipts for AI model calls and tool invocations

Project description

traceseal-observe

Every model and tool call your AI agent makes — signed, timestamped, third-party verifiable. One line of code. Hand the receipts to your auditor.


The question your auditor is about to ask

"Prove what your AI agent did yesterday. Which model, which prompt, what did it send to which provider, what came back. Not a screenshot — something I can verify independently."

Today, the honest answer is "trust our logs." Tomorrow, under the EU AI Act, the NIS2 directive, the UK AI Bill, and half the compliance frameworks your customers are writing into their procurement forms, "trust our logs" won't cut it.

traceseal-observe is the cryptographic primitive that makes the question answerable. Every model call, every tool call, every data-flow leaving your system produces a signed JSON receipt. Anyone — your auditor, your regulator, your customer — can verify it with a one-line command, on any machine, with no access to yours.

One minute

from traceseal_observe import OperatorKey, observe_anthropic
from anthropic import Anthropic

key = OperatorKey.load_from_file("~/.traceseal/keys/my-operator.key")
client = Anthropic()

response, receipt = observe_anthropic(
    client,
    {"model": "claude-sonnet-4", "messages": [{"role": "user", "content": "Hi"}]},
    key,
)

receipt.to_json()  # shareable, signed, verifiable

Your auditor runs:

pip install traceseal-verify
traceseal-verify receipt.json
[OK] receipt.json
  operator:  ed25519:9dae521400bb39e17e74d8bc1222c45d

That's the whole loop. No API keys exchanged. No access to your machine. No shared infrastructure.

What gets signed

Receipt type What it proves
Model call which provider, which model, hash of prompt, hash of response, tokens, latency, operator signature
Tool call which tool, transport (python / MCP / HTTP / shell), input/output hash, exit code, operator signature
Data flow outbound HTTP destination, payload hashes, PII pattern count, allow-list match — the signed answer to "did you send user data to OpenAI between 2pm and 4pm yesterday?"
Workflow ordered chain of child receipt hashes + wall-clock times, forming a single signed trace of a multi-step run

All four formats verify with the same traceseal-verify tool.

Integrations

  • Anthropic SDKobserve_anthropic(client, request, key)
  • OpenAI SDKobserve_openai(client, request, key)
  • Any model providerobserve_model_call(...) with your own serializer
  • LangChain / LangGraphtraceseal-langchain: one callback handler, receipts for every node
  • MCP toolsobserve_mcp_tool(...)
  • HTTP APIs and shell toolsobserve_http_tool(...), observe_shell_tool(...) — with secret redaction built in (header values and env values are excluded from hashes)

Privacy

Receipts contain hashes of inputs and outputs, not the values. You can send a receipt to your auditor without leaking the prompt your user typed. If the auditor needs to verify a specific value, you provide it separately and they recompute the hash.

Data-flow receipts add a PII fingerprint — count of email/phone/credit-card/JWT/API-key-shaped patterns detected in the payload. Counts only. No values. A signed answer to "did this request contain PII" without the request being in the receipt.

What receipts prove, and what they don't

Be honest about the trust model.

Prove: the holder of this ed25519 key signed this exact payload at this time. Don't prove: that the provider actually returned what you recorded. A compromised operator could fabricate a receipt. This is an operator attestation, not a zero-knowledge proof of execution. The guarantee is: the same guarantee your audit logs give you today, but cryptographically portable and tamper-evident.

When providers start signing their responses (the obvious next step — we have a proposal out with Anthropic), the receipt format is designed to carry a provider_attestation field alongside yours, closing the loop.

Install

pip install traceseal-observe                   # the signing library
pip install traceseal-verify                    # the verifier (one-command audit)
pip install traceseal-langchain                 # LangChain / LangGraph callback

Spec

The receipt format is open and language-agnostic. Anyone can implement a verifier in any language from the Execution Receipt Specification without touching Traceseal source code.

License

Apache 2.0 — no barriers to signing, no barriers to verification.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traceseal_observe-1.3.1.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

traceseal_observe-1.3.1-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file traceseal_observe-1.3.1.tar.gz.

File metadata

  • Download URL: traceseal_observe-1.3.1.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for traceseal_observe-1.3.1.tar.gz
Algorithm Hash digest
SHA256 014295771bb401130fccff3b2b7d70e7973df478462328455a589c91812c4441
MD5 24e790bfff7048f9fa23c03c53e5f5c8
BLAKE2b-256 e26b1172f6127a0fb4b22f3cecf4eab82e699d0d7ba7a800d137fcb5910a87eb

See more details on using hashes here.

File details

Details for the file traceseal_observe-1.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for traceseal_observe-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb26adb038688c8e611bcc0c55e28342aafb5038ad6efa2a72e835c0d064d080
MD5 d6b28f278bde9c069d643586624caad2
BLAKE2b-256 0ef832404fd4e49fcb7fcd83f7bd8c09be588f1228302a6bc412dca88adbd9b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page