Skip to main content

ComplyEdge Python SDK

Runtime compliance engine for EU AI Act. Open source. Deterministic.

Installation

pip install complyedge

Quick Start — EU AI Act in Three Lines

from complyedge import compliance_check

@compliance_check(jurisdiction="EU", agent_id="my-agent")
def my_agent(prompt):
    return llm.generate(prompt)  # every input and output checked

That's it. Every input and output is checked against the EU AI Act rule corpus (Article 5, Article 50, GPAI). Violations are blocked before they reach the user, with legal citation, rule ID, and timestamp on every check.

The decorator reads your API key from the COMPLYEDGE_API_KEY environment variable by default. Pass api_key_env="MY_VAR" to use a different one.

Multi-Jurisdiction Enforcement

jurisdiction selects which rule corpus is evaluated server-side.

Value Corpus
EU EU AI Act Article 5 + Article 50 + GPAI (Articles 51–55)
US HIPAA, SOX, COPPA, TCPA, BIPA
@compliance_check(jurisdiction="EU", agent_id="hr-screening")
def hr_screening(candidate: str) -> str:
    return llm.generate(candidate)

Per-rule scoping (e.g. only Article 5) is planned but not yet exposed in the SDK — all rules for the selected jurisdiction run today.

Additional Installation Options

# Development setup
pip install complyedge[dev]

# Local development from source
pip install -e ./sdks/python

Client API — Without the Decorator

from complyedge import ComplyEdge

ce = ComplyEdge(api_key="your-key")
result = ce.check("AI-generated content", jurisdiction="EU")

if result.allowed:
    print("Content approved")
else:
    for v in result.violations:
        print(f"{v.rule_id}: {v.citation}")

Or the global convenience functions:

from complyedge import is_safe, check
import os

api_key = os.environ["COMPLYEDGE_API_KEY"]

# Boolean check
if not is_safe(text, api_key=api_key, jurisdiction="EU"):
    raise ValueError("Compliance violation")

# Full result
result = check(text, api_key=api_key, jurisdiction="EU")

MCP Server — Use ComplyEdge as an AI Agent Tool

Smithery

Agent/MCP tools that check prompts and outputs against ComplyEdge’s TrustLint corpus with article-cited findings — not another EU AI Act risk-tier chatbot and not a law-search database.

Hosted Streamable HTTP (preferred for remote / Smithery Toolbox): https://mcp.complyedge.io/mcp

npx -y @smithery/cli@latest mcp add complyedge/complyedge --client cursor

Local stdio for any MCP-compatible host (Claude, Cursor, Inspector):

pip install 'complyedge[mcp]>=0.2.8'
python -m complyedge.mcp_server
# or: complyedge-mcp

Add to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "complyedge": {
      "command": "complyedge-mcp"
    }
  }
}

(command/args with python -m complyedge.mcp_server is also valid.)

Exposed tools (TrustLint offline YAML corpus):

Tool Description
check_compliance Check text against TrustLint rules. Returns PASS/FAIL with article-cited findings.
list_rules List available TrustLint rules, filterable by jurisdiction.
scan_prompt Pre-generation prompt scan. Returns SAFE or RISK_DETECTED.

No API key is required for these tools. The optional extra installs mcp and trustlint (engine + bundled rules). This MCP path does not run the REST API policy engine.

Documentation

Download files

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

Source Distribution

complyedge-0.2.9.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

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

complyedge-0.2.9-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file complyedge-0.2.9.tar.gz.

File metadata

  • Download URL: complyedge-0.2.9.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for complyedge-0.2.9.tar.gz
Algorithm Hash digest
SHA256 a876528ccf5e281010dc463bf04d27458ab1befbef743b7d757db2a6fe2f2281
MD5 b2f2b64564d909d2e016aa96b7c34dbb
BLAKE2b-256 f2cea3530f1b260c8c4220a094900402688291f2e659fe33cacd5c48479db69e

See more details on using hashes here.

Provenance

The following attestation bundles were made for complyedge-0.2.9.tar.gz:

Publisher: publish.yml on ComplyEdge/complyedge-platform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file complyedge-0.2.9-py3-none-any.whl.

File metadata

  • Download URL: complyedge-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for complyedge-0.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9b666590fbc925f878de6bab6bf850e9fee7304195319a591dd0fbde0462adc5
MD5 682fa2f70f4d9bca384f8ea1ac6e8c4f
BLAKE2b-256 cfa426547fbc453847484d619403b5814efd2d558bd28265c8470a6187e9b967

See more details on using hashes here.

Provenance

The following attestation bundles were made for complyedge-0.2.9-py3-none-any.whl:

Publisher: publish.yml on ComplyEdge/complyedge-platform

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.15

2 files

0.2.10

2 files

This release

0.2.9 This release

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page