Skip to main content

EU AI Act compliant AI agent compliance layer — plug into any agent framework, enforce deterministic policy guards, audit every decision.

Project description

chimera-compliance

chimera-compliance

EU AI Act compliance layer for AI agents
Plug into any agent framework. Enforce deterministic policy guards. Audit every decision.

PyPI Python License Dashboard CSL-Core

QuickstartDashboardArchitectureIntegrationsEU AI Act


What is chimera-compliance?

chimera-compliance is a plug-in compliance layer for AI agents. It wraps any agent framework (LangChain, LangGraph, LlamaIndex, CrewAI, AutoGen) with deterministic policy guards that BLOCK, ALLOW, or ASK_HUMAN before every action executes.

Agent Action --> Policy Guard --> BLOCK / ALLOW / ASK_HUMAN --> Audit Record
                    |
              Violation report + EU AI Act compliant audit trail

Why? AI agents in enterprise are hard to audit and hard to control. chimera-compliance solves this by binding agents to a deterministic runtime guard -- every tool call, every decision goes through policy evaluation before execution.

Key properties:

  • Deterministic safety -- Policy constraints enforced via rules (or Z3 formal verification with CSL-Core)
  • Framework agnostic -- Works with LangChain, LangGraph, LlamaIndex, CrewAI, AutoGen, or raw LLMs
  • Full audit trail -- Every decision produces a complete JSON record (Art. 12)
  • Human oversight -- Confirm, override, or halt at any point (Art. 14)
  • Right to explanation -- One-click HTML reports for any decision (Art. 86)

Quickstart

Install

# Core (YAML rules, no Z3)
pip install chimera-compliance

# With CSL-Core for Z3 formal verification (recommended)
pip install chimera-compliance[csl]

# Everything
pip install chimera-compliance[all]

Initialize a project

chimera-compliance init

This creates .chimera/config.yaml and a starter policy file.

Write a policy

Option A: YAML rules (no extra dependencies)

# policies/governance.yaml
rules:
  - name: manager_limit
    when: "role == 'MANAGER' and amount > 250000"
    then: BLOCK
    message: "Managers cannot approve more than $250,000"
  - name: weekend_freeze
    when: "is_weekend == 'YES' and urgency != 'CRITICAL'"
    then: BLOCK
    message: "No changes on weekends unless critical"

Option B: CSL policy (requires chimera-compliance[csl])

CONFIG {
  ENFORCEMENT_MODE: BLOCK
}

DOMAIN GovernanceGuard {
  VARIABLES {
    amount: 0..1000000
    role: {"ANALYST", "MANAGER", "DIRECTOR", "VP", "CEO"}
  }

  STATE_CONSTRAINT manager_approval_limit {
    WHEN role == "MANAGER"
    THEN amount <= 250000
  }
}

Run the agent

export CHIMERA_OPENAI_API_KEY=sk-...
chimera-compliance run

Verify a policy

chimera-compliance verify policies/governance.csl

Dashboard

chimera-compliance comes with a full-featured compliance dashboard at compliance.chimera-protocol.com.

Dashboard — Real-time audit monitoring

Real-time audit monitoring -- Live feed of agent decisions with ALLOW/BLOCK/ESCALATE status, EU AI Act compliance score, and top violations.

Policy Management

Policy management -- Create, edit, and verify CSL/YAML policies with Z3 formal verification. View constraints, variables, and policy hashes.

Analytics

Analytics -- Decision trends, block rate heatmaps, and violation frequency across all agents.

Connect Agent Wizard

Connect Agent -- 4-step wizard to integrate compliance guard into LangChain, LangGraph, CrewAI, LlamaIndex, or AutoGen.

Agent Framework Integrations

LangChain

from langchain_openai import ChatOpenAI
from chimera_compliance.integrations.langchain import wrap_tools, ChimeraCallbackHandler

# Wrap your tools with compliance guard
guarded_tools = wrap_tools(your_tools, policy="./policies/governance.yaml")

# Or use callback handler
handler = ChimeraCallbackHandler(policy="./policies/governance.yaml")
llm = ChatOpenAI(callbacks=[handler])

LangGraph

from chimera_compliance.integrations.langgraph import compliance_node

# Add a compliance gate node to your graph
graph.add_node("compliance_check", compliance_node(policy="./policies/governance.yaml"))

CrewAI

from chimera_compliance.integrations.crewai import wrap_crew_tools

guarded_tools = wrap_crew_tools(your_tools, policy="./policies/governance.yaml")

Raw LLM (direct)

from chimera_compliance import ChimeraAgent

agent = ChimeraAgent(
    model="gpt-4o",
    api_key="sk-...",
    policy="./policies/governance.csl",
)

result = agent.decide(
    "Approve $200k marketing spend for Q3",
    context={"role": "MANAGER", "department": "MARKETING"},
)

print(result.result)       # "ALLOWED"
print(result.action)       # "Allocate $200k to digital channels"

CLI Reference

Command Description
chimera-compliance init Initialize project with config and starter policy
chimera-compliance run Interactive agent with real-time reasoning display
chimera-compliance run --daemon Pipe mode for JSON stdin/stdout
chimera-compliance stop [--force] Graceful or immediate halt
chimera-compliance verify [POLICY] Verify CSL policy (syntax + Z3 + IR)
chimera-compliance test [--skip-llm] End-to-end system test
chimera-compliance audit --stats Aggregate decision statistics
chimera-compliance audit --last 10 Recent decisions table
chimera-compliance audit --export FILE Export records (json/compact/stats)
chimera-compliance policy new NAME Create policy from template
chimera-compliance policy list List and verify all policies
chimera-compliance policy simulate FILE '{"k":"v"}' Test policy against input
chimera-compliance explain --id ID Generate Art. 86 HTML explanation
chimera-compliance docs generate Generate Annex IV documentation
chimera-compliance license status Show current license tier and details
chimera-compliance license activate KEY Activate a license
chimera-compliance license deactivate Remove license key

EU AI Act Compliance

Article Requirement Implementation
Art. 9 Risk management Formal verification (Z3) or rule-based policy evaluation
Art. 12 Record-keeping Complete DecisionAuditRecord for every decision
Art. 13 Transparency Right to explanation, audit queries, HTML reports
Art. 14 Human oversight Confirm/override/halt with full audit trail
Art. 15 Accuracy & security Deterministic policy gate, API key protection
Art. 19 Retention Configurable retention with automatic enforcement
Art. 86 Right to explanation Self-contained HTML reports per decision
Annex IV Technical documentation Auto-generated 14/19 sections

Supported Providers & Frameworks

Integration Install Notes
LangChain pip install chimera-compliance[langchain] Tool wrapper + callback handler
LangGraph pip install chimera-compliance[langgraph] Node guard + state checkpoint
LlamaIndex pip install chimera-compliance[llamaindex] Tool spec + callback handler
CrewAI pip install chimera-compliance[crewai] Tool wrapper for crews
AutoGen pip install chimera-compliance[autogen] Agent wrapper
OpenAI pip install chimera-compliance[openai] gpt-4o, gpt-4o-mini, o1, o3
Anthropic pip install chimera-compliance[anthropic] claude-sonnet-4-20250514, claude-opus-4-20250514
Google pip install chimera-compliance[google] gemini-2.0-flash, gemini-2.5-pro
Ollama pip install chimera-compliance[ollama] llama3, mistral, qwen (local)
CSL-Core pip install chimera-compliance[csl] Z3 formal verification

Development

git clone https://github.com/akarlaraytu/chimera-compliance
cd chimera-compliance
pip install -e ".[dev,all]"
pytest tests/ -v

Related Projects

License

Apache License 2.0 -- see LICENSE for details.


Building AI Governance.
Built by Aytug Akarlar

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

chimera_compliance-1.0.0.tar.gz (128.9 kB view details)

Uploaded Source

Built Distribution

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

chimera_compliance-1.0.0-py3-none-any.whl (109.5 kB view details)

Uploaded Python 3

File details

Details for the file chimera_compliance-1.0.0.tar.gz.

File metadata

  • Download URL: chimera_compliance-1.0.0.tar.gz
  • Upload date:
  • Size: 128.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for chimera_compliance-1.0.0.tar.gz
Algorithm Hash digest
SHA256 973c72171f0ab81cc24a5a717f5535cbb702e1fa1f70bad5a33f3e5fa61440b1
MD5 54e50c3b5a85cb1c4267ec7917503588
BLAKE2b-256 260f70ba171438f77e6b6097b07afdb85c100a52803b236a7436810664cb778f

See more details on using hashes here.

File details

Details for the file chimera_compliance-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chimera_compliance-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 929c346d4c35e480fd46f7069ec6fb2f341c901bd2ed7553c7cf49497b4383fe
MD5 009b613aa40c2ee2ce46932675b3b18f
BLAKE2b-256 ce47c68be6b7c4032697656a6aae32e2a8a8d942a8437bc769976d2a2ff6e41d

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