Catalog PyPI
Back to packageRELEASE DETAILS

0.8.1

PyPI

aicertify

Open-source compliance-as-code for AI systems: evaluate declared facts and measured evidence with versioned OPA/Rego policies and generate portable PDF, Markdown, JSON, or HTML reports.

ai-actai-auditai-certificationai-complianceai-evaluationai-governanceai-safetyeu-ai-actfairnessnist-ai-rmfopaopen-policy-agentpolicy-as-coderegoregulatory-complianceresponsible-ai
Published31 Aug 2026
Direct dependencies51
Transitive dependenciesNot calculated

README

Version 0.8.1 documentation
AICertify — Compliance-as-code for AI systems

Open-source compliance-as-code for AI systems: one contract, executable OPA/Rego policies, and reproducible evidence across the EU AI Act, UK AI governance, NIST AI RMF, and more.

PyPI Downloads CI Stars Python 3.12 Apache 2.0 Built on OPA 92 Rego Policies

From AI app to audit-ready report: AI Application -> AICertify Contract -> OPA Policy Evaluation -> Compliance Report


📦 Full documentation, forkable examples, contributing guides, translations, and 92 GOPAL/Rego policies live in the GitHub repository.

AICertify is the open execution and evidence layer for AI governance. Describe an AI system in a contract, supply organisation-known facts, attach or compute measured metrics, evaluate that evidence against versioned GOPAL policies through Open Policy Agent, and generate dated PDF, Markdown, JSON, or HTML reports.

The goal is simple: move from “we have an AI policy” to evidence another engineer, auditor, or risk team can inspect and reproduce.

Use AICertify to:

  • evaluate an AI system against named governance and regulatory policy sets
  • keep declared facts distinct from evaluator-produced measurements
  • run inspectable OPA/Rego policy logic locally, in CI/CD, or air-gapped
  • generate portable PDF, Markdown, JSON, or HTML evidence with per-policy results
  • extend the stack with your own Rego policies and evaluator adapters

AICertify is part of the Open Policy Agent ecosystem, using the same policy engine widely used for Kubernetes admission, service authorisation, and infrastructure policy.

⭐ Building AI governance as code? Star the GitHub repo so other practitioners can find it.


Quick Start

# 1. Install AICertify (~3–5 min on first install; pulls langchain + transformers)
pip install aicertify

# 2. Install the OPA binary, one-time (~80 MB)
curl -L https://openpolicyagent.org/downloads/latest/opa_linux_amd64 -o /usr/local/bin/opa && sudo chmod +x /usr/local/bin/opa

# 3. Run the bundled demo (no contract file or API keys)
aicertify demo

aicertify demo loads a bundled sample contract, evaluates it against the EU AI Act policy set via OPA, and writes aicertify_demo_report.md. The sample intentionally contains no compliance declarations, so evidence-dependent policies deny; this demonstrates fail-closed behavior rather than an artificially green demo.

aicertify demo recording: banner, spinners, evaluation progress, generated report path

For richer evaluations (LangFair fairness metrics, DeepEval content-safety scoring, PDF reports), see examples/quickstart.py and the forkable example bots, each of which ships an input_contract.json, a policy_config.yaml, and a run.py.

Minimal Python usage

from aicertify import regulations, application

# 1. Pick the regulations you want to certify against
regs = regulations.create("my_regulations")
regs.add("eu_ai_act")

# 2. Wrap your AI app
app = application.create(
    name="customer-support-bot",
    model_name="gpt-4o",
    model_version="2024-08-06",
)

# 3. Feed it real interactions
app.add_interaction(
    input_text="I want a refund for my order",
    output_text="I can help with that. Could you share your order number?",
)

# 4. Evaluate and get reports back
await app.evaluate(regulations=regs, report_format="pdf", output_dir="reports")

That's the whole loop. Contract → evidence → policy evaluation → report.


Why AICertify?

Evaluation libraries such as Fairlearn and AI Fairness 360 measure specific properties. Governance platforms address broader inventory and workflow needs. AICertify provides the open execution layer between them: combine declared system facts with measured evidence, run inspectable GOPAL/Rego policies through OPA, and emit portable, dated results.

The differentiator is reproducibility: inspect the rules, pin versions, run locally or air-gapped, review changes in Git, and retain the evidence outside a vendor account.

See the full positioning in docs/why-aicertify.md on GitHub.


Compared with alternatives

AICertifyFairlearn / AIF360MS RAI ToolboxGovernance SaaS
Open source✅ Apache 2.0✅ MIT✅ MITVaries
Local / air-gapped execution✅✅✅Varies
Named governance / regulatory policy sets✅ via GOPAL❌ (measurement library)❌ (toolkit)Common
Inspectable policy-as-code✅ OPA / Rego❌❌Varies
Industry-specific policy coverage✅❌❌Varies
Portable dated reports✅ PDF / MD / JSON / HTML❌PartialCommon
Custom policy logic✅ Rego❌N/AProduct-specific

For OPA / Rego users

If you already use OPA, AICertify gives you the AI-application context layer OPA was missing. You bring your AI app; AICertify captures the interactions, feeds them through the OPA engine against AI-specific Rego policies sourced from gopal, and emits audit-ready evidence.

The whole stack is policy-as-code: the same workflow you already use for Kubernetes admission, microservice authorisation, and infrastructure governance.


Forkable examples

Copy any of these and substitute your own contract:

Each example ships an input_contract.json, policy_config.yaml, sample_interactions.json, an expected_report.md, and a run.py you can execute directly.


See the output

You don't have to install anything to see what AICertify produces. A sample pre-generated PDF is in the repo:

  • demo-report-eu-ai-act.pdf: a customer-support agent evaluated against the EU AI Act
  • expected reports: committed Markdown reports for the customer-support, healthcare-triage and hiring-screening examples, and a retained fair-lending PDF under examples/outputs/loan_evaluation/

More on GitHub


License

Apache 2.0, see the LICENSE file.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 51

Native requirements
51 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
Pygments
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
Pygments>=2.20.0runtime
aiohttp
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
aiohttp>=3.14.1runtime
banks
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
banks>=2.4.2runtime
black
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
black<27.0.0,>=26.3.1runtime
brotli
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
brotli>=1.2.0runtime
colorlog
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
colorlog<7.0.0,>=6.9.0runtime
cryptography
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
cryptography>=50.0.0runtime
datasets
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
datasets<4.0.0,>=3.3.2runtime
deepeval
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
deepeval<3.0.0,>=2.4.8runtime
fastapi
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
fastapi<1.0,>=0.119.0runtime
filelock
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
filelock>=3.20.3runtime
h11
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
h11>=0.14.0runtime
huggingface-hub
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
huggingface-hub<2.0,>=0.34.0runtime
langchain
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langchain>=1.3.9runtime
langchain-community
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langchain-community>=0.3.27runtime
langchain-core
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=1.2.22runtime
langchain-openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langchain-openai>=1.1.14runtime
langchain-text-splitters
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langchain-text-splitters>=1.1.2runtime
langfair
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langfair<1.0,>=0.8.0runtime
langgraph-checkpoint
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langgraph-checkpoint>=4.1.1runtime
langgraph-sdk
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langgraph-sdk>=0.3.15runtime
langsmith
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
langsmith>=0.8.18runtime
markdown
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
markdown<4.0,>=3.8.1runtime
marshmallow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
marshmallow>=3.26.2runtime
nltk
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
nltk>=3.10.0runtime
opa-python-client
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
opa-python-client>=0.1.0runtime
orjson
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
orjson>=3.11.6runtime
pandas
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pandas>=2.2.0runtime
pillow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pillow>=12.3.0runtime
protobuf
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
protobuf<6,>=5.29.6runtime
pyasn1
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pyasn1>=0.6.4runtime
pycares
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pycares<5.0.0,>=4.9.0runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic<3.0.0,>=2.10.6runtime
pydantic-ai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic-ai<0.0.25,>=0.0.24runtime
pydantic-settings
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pydantic-settings>=2.14.2runtime
pypdf
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pypdf>=6.15.0runtime
pytest
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
pytest<10.0.0,>=9.0.3runtime
python-dotenv
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
python-dotenv>=1.2.2runtime
reportlab
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
reportlab<5.0.0,>=4.3.1runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
requests<3.0.0,>=2.33.0runtime
rich
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
rich<14.0.0,>=13.8.0runtime
sentencepiece
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
sentencepiece>=0.2.1runtime
setuptools
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
setuptools>=83.0.0runtime
soupsieve
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
soupsieve>=2.8.4runtime
starlette
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
starlette>=1.3.1runtime
torch
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
torch>=2.13.0runtime
transformers
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
transformers>=5.5.0runtime
urllib3
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
urllib3>=2.7.0runtime
uvicorn
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
uvicorn<0.35.0,>=0.34.0runtime
virtualenv
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
virtualenv>=20.36.1runtime
yfinance
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "<3.13,>=3.12",
  "evaluation": "NOT_EVALUATED"
}
yfinance<0.3.0,>=0.2.54runtime

Distribution files

2 collected
aicertify-0.8.1-py3-none-any.whl

bdist_wheel · 832.25 KB · Python py3

Source file
aicertify-0.8.1.tar.gz

sdist · 588.27 KB · Python source

Source file

Repository

PENDING
principled-evolution/gopal

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
principled-evolution/aicertify

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:07 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:a8bc5800bcf02368b97fb38b5c6f082effbc04cfca5b6b6b079e729f0453044c

Other collected versions

View all collected versions →