Skip to main content

Opencomplai core risk assessment engine for EU AI Act compliance

Project description

opencomplai-core

License: AGPL-3.0 PyPI Python

The EU AI Act compliance risk engine at the heart of Opencomplai. opencomplai-core turns a declared system-manifest.json and your source tree into a deterministic, rule-based risk classification — no LLM calls, no network access, fully reproducible.

It powers risk classification (UnacceptableRiskRule, AnnexIIIClassifierRule, ProfilingDetectionRule, SubstantialModificationRule) and the code-corroboration scan engine that cross-checks what a manifest claims against what the code actually does.

Install

pip install opencomplai-core

For PDF report generation, install the optional extra:

pip install "opencomplai-core[reports]"

Most users want the opencomplai meta-package (engine + CLI) or the opencomplai-cli command-line tool. Install opencomplai-core directly when you are embedding the engine in your own application.

Quick start

Classify a model from a declared manifest

from opencomplai import assess, AssessmentInput, ModelMetadata

result = assess(AssessmentInput(
    model=ModelMetadata(
        name="loan-scorer",
        version="1.0.0",
        modality="tabular",
        use_case="creditworthiness scoring for consumer loans",
        deployment_context="production",
    )
))

print(result.risk_level)        # e.g. RiskLevel.HIGH
for rule in result.rule_results:
    print(rule.rule_id, "PASS" if rule.passed else "FAIL")

Corroborate a manifest against the code

from pathlib import Path
from opencomplai_core.scan_engine import run_scan

report = run_scan(
    repo_root=Path("."),
    commit_ref="HEAD",
)

print(report.summary.result)            # PASS / CONTROL_FAIL / ...
for finding in report.findings:
    print(finding.finding_id, finding.mapped_taxonomy)

The scan engine extracts features from the repository, fuses evidence across detectors, and maps findings to EU AI Act taxonomy (Annex III high-risk areas, Article 5 prohibited practices, profiling under Article 6).

What you get

  • Deterministic risk classification — same inputs always produce the same output, so results are auditable and CI-gateable.
  • Code corroboration — detect when a manifest under-declares (claims minimal risk while the code does biometric identification, profiling, etc.).
  • Merkle-linked evidence — findings carry verifiable evidence items for audit trails.

Documentation

Full docs, the EU AI Act concepts guide, and the SDK reference live at docs.opencomplai.com.

License

AGPL-3.0-only. See LICENSE.

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

opencomplai_core-0.1.0.tar.gz (77.1 kB view details)

Uploaded Source

Built Distribution

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

opencomplai_core-0.1.0-py3-none-any.whl (87.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opencomplai_core-0.1.0.tar.gz
  • Upload date:
  • Size: 77.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opencomplai_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0f43cfd63793f6ec083d4f5c7da3e91deba15015299f00028226abfdb817c43c
MD5 50e2109f72fbfa0540755348ca816d61
BLAKE2b-256 a868f6691a9e21c77e359263a17223e46c8cf6f106e6455b330586af89f97e78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opencomplai_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a965751e13641bf10e8675f04e4dfa66eff6ba4e02a9e900876e1b81ef7a7062
MD5 0ac3f8d4721651cfbc0b14742f11e59f
BLAKE2b-256 89010f4ed3996bac924ab0129114df2fa694e0ab9fa3c26d69f86a44110ddb03

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