LedgerProof adapter for the Cohere Python SDK. Side-channel transparency receipts for EU AI Act Article 50.
Project description
ledgerproof-cohere
LedgerProof adapter for the Cohere Python SDK (V2).
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 Cohere SDK directly, including:
cohere.ClientV2/cohere.AsyncClientV2- Cohere RAG pipelines using
Embed+Rerank+ groundedchat()(rag_response/v1receipts) - Multi-language EU deployments where Article 50(5) requires disclosure in a language the recipient understands
(
multilingual_disclosure/v1receipts capturing the BCP-47 language tag and hash of the disclosure shown)
Why this matters for EU enterprise
Cohere is the AI provider of choice for many Tier-1 EU enterprise RAG deployments — multilingual support across DE/FR/IT/NL/ES, on-prem and private-cloud deployment options, and a Canadian (EU-friendly) data residency story. This adapter is built around two surfaces that EU compliance teams care about most:
- Retrieval attestation — When a grounded
chat()call cites retrieved documents (Cohere Embed + Rerank pipeline), therag_response/v1receipt binds the SHA-256 of each document and its rerank relevance score into the signed receipt. This lets a CRO/CCO answer the question "can you prove the model saw exactly these sources and no others?" with cryptographic evidence rather than logs. - Multilingual disclosure binding — Article 50(5) requires that the AI-interaction disclosure be made "in
a clear and distinguishable manner... in [the] official language of [the relevant Member State]". The
multilingual_disclosure/v1receipt records the BCP-47 language tag and a hash of the exact disclosure string shown, so a deployer operating across DE / FR / IT can prove per-jurisdiction language compliance without storing the user's locale or other PII.
5-minute quickstart
pip install ledgerproof-cohere
export COHERE_API_KEY=...
from cohere_ledgerproof import LedgerProofCohere, LogEmitter
client = LedgerProofCohere(
deployer_id="acme-corp-eu",
emitter=LogEmitter(),
)
response = client.chat(
model="command-a-03-2025",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.message.content[0].text)
# Receipt has already been emitted to the side-channel.
The Cohere response object is returned unchanged. The receipt is emitted to the side channel only (C7).
Three integration patterns
- Client wrapper (recommended) —
LedgerProofCoherewrapscohere.ClientV2and interceptschat()/chat_stream(). Sync, async, streaming, RAG (chat_with_retrieved_documents()), and multilingual disclosure (chat_with_disclosure()) are all supported. - Decorator —
@lpr_track(deployer_id="...")for user-defined functions that wrap Cohere calls. Supports declaring kwargs that hold retrieved documents or a disclosure ref for schema promotion. - Manual emission —
emit_receipt(response, deployer_id, regulatory_context)for full control inside a custom orchestration layer (Embed-only flows, Classify pipelines, batch Rerank).
See examples/ for runnable code:
examples/01_chat_v2_quickstart.py— vanillaClientV2.chat()examples/02_rag_with_rerank.py— Embed + Rerank + grounded chat withrag_response/v1examples/03_multilingual_disclosure.py—multilingual_disclosure/v1across DE / FR / IT
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 chats are signed using an incremental SHA-256 over
content-deltatext deltas; multibyte UTF-8 (German umlauts, French accents, etc.) is handled correctly. - C7: Side-channel emission only. The adapter cannot and does not modify the Cohere response payload.
GDPR posture
Receipts reference content by SHA-256 hash only. The adapter does not store raw prompts, raw responses, raw
retrieved-document text, or raw disclosure strings. Identifiers (deployer_id, document_id, tool_call_id)
are length-bounded and character-set-restricted (no free-form PII). The deployer is responsible for ensuring
the inputs they feed in (e.g. document_id values) do not themselves leak PII.
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 Cohere Inc.
This adapter wraps the official Cohere Python SDK; it is not affiliated with Cohere Inc.
License
Apache 2.0. Copyright 2026 LedgerProof Foundation (in formation: US 501(c)(3) Delaware + Dutch Stichting EU subsidiary).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cohere_ledgerproof-0.1.0.tar.gz.
File metadata
- Download URL: cohere_ledgerproof-0.1.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e07f9d0ff2f63fd7a8792aa775da22cbc24ce1ee824c24b062d3f0eee69bacb
|
|
| MD5 |
e4dcd6bcd8324c7bca88df1dfa5f14ef
|
|
| BLAKE2b-256 |
bafa7b8a6facc768c59fbc44f4dbfe7598e06b99b5c9d964987129480f34efb1
|
File details
Details for the file cohere_ledgerproof-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cohere_ledgerproof-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06c08fec9d12ce8981c8256e412d24f15bcf03b209ba0fc0fd82ec62cd06794a
|
|
| MD5 |
dfdf1b775f02872578877d7adfdca567
|
|
| BLAKE2b-256 |
cb5b77e5b729566e7bcbd8fce8ca9dec41f258b7b0f8b0513edb1967843085ee
|