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 anthropic_ledgerproof 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.1.tar.gz (20.9 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.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anthropic_ledgerproof-0.1.1.tar.gz
  • Upload date:
  • Size: 20.9 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.1.tar.gz
Algorithm Hash digest
SHA256 e9e4964fb7424f4ef6988fbebe81d6086b2939194b91e9bf95f82de43218785a
MD5 e51f6dac29f7b367a732784bca5ec2b0
BLAKE2b-256 a68b8da8025bd2f4dd2281c904f91dbb290d6d6be3e5db6aa0b9b4b1afd7d05a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for anthropic_ledgerproof-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4e89996d2cd101846e107ae19b0ababbfc7d79d1d345df2b6584f2c70b36ff6
MD5 dee18f0b0f8fcf58d2f90ebfc5771289
BLAKE2b-256 b80fb2ff46ae5d0b2715651ec315b24f1aa97599a025d8f31669d278369810f0

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