Skip to main content

LedgerProof adapter for the Anthropic Python SDK. Side-channel transparency receipts for EU AI Act Article 50.

Project description

ledgerproof-anthropic

LedgerProof adapter for the Anthropic Python SDK.

Emits side-channel cryptographic transparency receipts for AI-touched interactions, suitable as an evidence layer for EU AI Act Article 50 (transparency obligations for providers and deployers of AI systems).

This adapter works with anyone using the Anthropic SDK directly, including users of:

  • anthropic.Anthropic / anthropic.AsyncAnthropic clients
  • Claude Code (which uses the Anthropic SDK under the hood)
  • The Claude Agent SDK (tool-use receipts via agent_action/v1)

5-minute quickstart

pip install ledgerproof-anthropic
export ANTHROPIC_API_KEY=sk-ant-...
from ledgerproof_anthropic import LedgerProofAnthropic, LogEmitter

client = LedgerProofAnthropic(
    deployer_id="acme-corp-eu",
    emitter=LogEmitter(),
)

response = client.messages.create(
    model="claude-opus-4-1",
    max_tokens=256,
    messages=[{"role": "user", "content": "Hello"}],
)

print(response.content[0].text)
# Receipt has already been emitted to the log emitter side-channel.

The Anthropic response object is returned unchanged. The receipt is emitted to the side channel only.

Three integration patterns

  1. Client wrapper (recommended) — LedgerProofAnthropic wraps anthropic.Anthropic and intercepts messages.create(). Sync, async, streaming and non-streaming all supported.
  2. Decorator@lpr_track(deployer_id="...") for user-defined functions that wrap Anthropic calls.
  3. Manual emissionemit_receipt(response, deployer_id, regulatory_context) for full control.

See examples/ for runnable code.

Architectural discipline (C1–C8)

This adapter is implemented under the LedgerProof protocol's load-bearing constraints:

  • C1: No claim of regulator endorsement. No claim of Article 40 presumption of conformity.
  • C4: Local verification only. The adapter does not phone home to LedgerProof servers during normal operation.
  • C6: Stream-aware signing. Streaming messages are signed using an incremental SHA-256 over text deltas.
  • C7: Side-channel emission only. The adapter cannot and does not modify the Anthropic response payload.

Scope disclaimer

LedgerProof provides an evidence layer for Article 50 transparency obligations only.

It does not cover:

  • Article 9 (risk management system)
  • Article 10 (data and data governance)
  • Article 13 (transparency and information to deployers)
  • Article 15 (accuracy, robustness, and cybersecurity)
  • Article 72 (post-market monitoring)

LedgerProof does not confer presumption of conformity under Article 40. LedgerProof is not endorsed by the European Commission, the AI Office, any national competent authority, or Anthropic, PBC.

This adapter wraps the official Anthropic Python SDK; it is not affiliated with Anthropic.

License

Apache 2.0. Copyright 2026 LedgerProof Foundation (in formation: US 501(c)(3) Delaware + Dutch Stichting EU subsidiary).

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

anthropic_ledgerproof-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

anthropic_ledgerproof-0.1.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file anthropic_ledgerproof-0.1.0.tar.gz.

File metadata

  • Download URL: anthropic_ledgerproof-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for anthropic_ledgerproof-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dc6628e2eb1763b81e61e95620d099317408a87665d62c871be4b7370bc08026
MD5 4ea1a3e8eeb2f398f36251a1a6ffb368
BLAKE2b-256 29f21881f7a1e01b8df31a01a73cbb64d8b5e38069bcb42eda68a36bed29da12

See more details on using hashes here.

File details

Details for the file anthropic_ledgerproof-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for anthropic_ledgerproof-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9049925aa85c11712cf8c3c38fcac4523ae1080529808dd3fe37d35abd4aad7
MD5 0d3d59cd13e30872e91ffbf1d749e523
BLAKE2b-256 58a18aefbfa01dd12ba023a2b4c1be4aca7db163beddfd6fbdac9c75815609f8

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