Skip to main content

EU AI Act Article 50 disclosure for LiteLLM, LangChain, Haystack, LlamaIndex and the Vercel AI SDK - one line, content never leaves your system

Project description

eucompliance-ai-act

EU AI Act Article 50 disclosure for deployers — one line, and your content never leaves your system.

Article 50 of the EU AI Act has applied since 2 August 2026. If you build someone else's model into your product, you are the deployer and the disclosure obligation is yours — not the model provider's. Exposure is up to EUR 15 million or 3 % of worldwide annual turnover (Art. 99(4)(g)).

pip install eucompliance-ai-act
from eucompliance_ai_act import wrap
from openai import OpenAI

client = wrap(OpenAI(), deployer="Muster GmbH")

response = client.chat.completions.create(model="gpt-5", messages=[...])
print(response.disclosure)          # the text you must show your users
print(response.disclosure.record)   # the signed provenance record, for your files

Nothing else changes: same calls, same return values, same errors.

Already using LiteLLM or LangChain?

import litellm
from eucompliance_ai_act.integrations import litellm_logger

log = litellm_logger(deployer="Muster GmbH")
litellm.callbacks = [log]          # every model behind the proxy, one line
from eucompliance_ai_act.integrations import langchain_callback

log = langchain_callback(deployer="Muster GmbH")
chain.invoke(input, config={"callbacks": [log]})

Both run the disclosure on a background thread — your model call never waits for us — and swallow their own errors, so nothing here can take your application down. log.last is the most recent record, log.summary() the tally, and file="disclosures.jsonl" writes them straight to disk.

Haystack and LlamaIndex too

# Haystack — a component you drop in after the generator
from eucompliance_ai_act.integrations import haystack_component

pipe.add_component("disclosure", haystack_component(deployer="Muster GmbH"))
pipe.connect("llm.replies", "disclosure.replies")
# LlamaIndex — an event handler on every model call
import llama_index.core.instrumentation as instrument
from eucompliance_ai_act.integrations import llamaindex_handler

instrument.get_dispatcher().add_event_handler(
    llamaindex_handler(deployer="Muster GmbH"))

None of these frameworks — LiteLLM, LangChain, Haystack, LlamaIndex — becomes a dependency of this package; the classes are located at call time, so installing eucompliance-ai-act pulls in nothing you did not already have.

Your content never leaves your system

This is the point of the design, not a footnote.

The library computes the SHA-256 of the output locally and transmits only that hash. We attest a hash we cannot reverse. Verification works by recomputing, so nothing is lost — and there is no data-protection question to answer, no latency added on the content path, and no liability for us over data we never saw.

{"provenance": {"content_sha256": "e3b0c442…", "hashed_by": "client"}}

What you get back

  • The disclosure text in German or English, in the wording required for your case — generated content, edited content, deepfake, or interactive system.
  • A signed provenance record: content hash, model, provider, deployer, timestamp — signed with EIP-191 and verifiable by anyone, free and without an account.
  • The obligations that actually apply to you, with their article references — and if you are neither established in the EU nor serving EU users, it says so instead of selling you something.

Failure does not break you

Two deliberate properties, because a compliance tool that takes down production is removed after the first incident:

  • If our service is unreachable, you still get a valid disclosure text, flagged offline=True. The legal obligation applies regardless of our uptime.
  • If anything in this library fails, your model call still returns normally. The disclosure is attached on a best-effort basis and never raises into your code path.

Verifying later

from eucompliance_ai_act import verify
result = verify(response.disclosure.record, content=the_text)
# {'valid': True, 'content_matches': True, ...}

Free, no account. If the content was altered after signing, content_matches is False and the verdict carries receipt_tampered.

What this does and does not prove

Proves: that this exact content was attested as AI-generated by this deployer at this time, and is unchanged since.

Does not prove: that content without a record is human. Reliable detection of AI-written text does not exist — anything sold as such is a coin flip with a price tag. We attest origin. We do not guess it.

Also worth saying: a detachable record can be removed. It protects against alteration, not against omission.

This is a technical attestation, not legal advice. Classifying your own system remains your responsibility.

Pricing

The free tier needs no account: five calls per day per address. Beyond that, POST /x402/ai-disclosure costs $0.01 per call, payable per request in USDC — no account, no subscription. Verification is always free.

import os
os.environ["EUCOMPLIANCE_API_KEY"] = "…"   # optional

Links

MIT licensed. Operated by Patrick Kaufmann, sole proprietor in Vienna, Austria.

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

eucompliance_ai_act-0.3.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

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

eucompliance_ai_act-0.3.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file eucompliance_ai_act-0.3.0.tar.gz.

File metadata

  • Download URL: eucompliance_ai_act-0.3.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for eucompliance_ai_act-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3a2f81e7c3e6b307d7b6d1d7b92eee633ba1abeb9d1fb9d698b2311f18d3a68c
MD5 9045b51679d83ee549dc92a7d8636d83
BLAKE2b-256 9c6697a0db0c207e7937a9e39f7b98ffeff4e9a745b1aeb27c153bba9b320d77

See more details on using hashes here.

File details

Details for the file eucompliance_ai_act-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for eucompliance_ai_act-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 776461bb240dde7301354f9583061591b142cd2a3c9ba06c8af71fd4f5a73733
MD5 1bd25b9dcc0f33097d4a318fd58dbf04
BLAKE2b-256 74c49e341c42d112bfffa53b73ff8055c0dda551c210c98bf06aa2444118acc5

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