Skip to main content

chimera-runtime

chimera-runtime

Deterministic Runtime for AI Agents
Stop trusting LLMs. Start constraining them.

PyPI Python License Dashboard CSL-Core

Quickstart • Constraints • Integrations • Dashboard • How It Works


The Problem

LLMs don't follow rules. They approximate them.

They hallucinate. They get prompt-injected. They break constraints silently. And yet, we hand them real-world decisions -- financial approvals, infrastructure changes, customer-facing actions -- and hope for the best.

Hope is not a runtime strategy.

The Solution

Chimera is a deterministic execution layer that sits between your AI agent and the real world.

Not a wrapper. Not a filter. Not another prompt engineering trick.

A runtime that enforces constraints outside the model, verifies policies with formal logic (Z3), and blocks invalid actions before they happen.

Every decision is: Checked. Proven. Enforced.

Agent Intent → Constraint Guard → ALLOW / BLOCK / ASK_HUMAN → Audit Record

No exceptions. No bypass. No "the model said it was fine."


Quickstart

pip install chimera-runtime

chimera-runtime init
chimera-runtime run

Three commands. Your agent is now constrained.


Define Constraints

Two paths. Same enforcement.

Option A: YAML Rules (zero 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"
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
  }
}

YAML gives you rules. CSL gives you mathematical proof that your constraints are consistent, reachable, and conflict-free -- before a single agent runs.

chimera-runtime verify policies/governance.csl

Framework Integrations

Chimera drops into whatever you're already using. No rewrites.

LangChain

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

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

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

LangGraph

from chimera_runtime.integrations.langgraph import compliance_node

graph.add_node("constraint_gate", compliance_node(policy="./policies/governance.yaml"))

CrewAI

from chimera_runtime.integrations.crewai import wrap_crew_tools

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

Direct Usage

from chimera_runtime 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"

Every tool call. Every decision. Through the constraint guard. No exceptions.


Dashboard

Full runtime control plane at compliance.chimera-protocol.com.

Real-time decision enforcement

Real-time decision enforcement -- Live feed of every ALLOW, BLOCK, and ESCALATE. See exactly what your agents are doing and what they're being stopped from doing.

Policy management with formal verification

Policy management with formal verification -- Write, edit, and verify CSL policies. Z3 proves correctness before deployment. No untested constraints reach production.

Decision analytics

Decision analytics & block rate heatmaps -- What's getting blocked, when, and why. Patterns across agents, frameworks, and time.

Framework integration wizard

Framework integration wizard -- Four steps to wire Chimera into LangChain, LangGraph, CrewAI, LlamaIndex, or AutoGen.


How It Works

1. Define constraints in CSL
2. Z3 verifies correctness (reachability, consistency, conflict-freedom)
3. Runtime enforces at execution time

The model never sees the constraints. The model never evaluates the constraints. The model's opinion on whether it should be allowed to do something is irrelevant.

Constraints live outside the model. Enforcement happens outside the model. The model is a generator. Chimera is the governor.


CLI Reference

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

EU AI Act

Compliance is a consequence -- not the product.

When you enforce deterministic constraints, maintain complete audit trails, and provide human oversight by design, you don't need to bolt on compliance after the fact. You already have it.

Article Requirement How Chimera Delivers It
Art. 9 Risk management Formal verification (Z3) proves policy correctness before deployment
Art. 12 Record-keeping Complete DecisionAuditRecord for every decision, automatically
Art. 13 Transparency Full decision explanations, audit queries, HTML reports
Art. 14 Human oversight ASK_HUMAN escalation, confirm/override/halt with audit trail
Art. 15 Accuracy & security Deterministic constraint gate -- not probabilistic filtering
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 Frameworks & Providers

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

Development

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

License

Apache License 2.0 -- see LICENSE for details.


LLMs generate. Chimera governs.
Built by Aytug Akarlar

Metadata

Release files for chimera-runtime 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chimera-runtime 1.1.0
File Size Uploaded
chimera_runtime-1.1.0.tar.gz 132.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chimera-runtime 1.1.0
File Interpreter ABI Platform
chimera_runtime-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 245.5 kB

Release files / chimera_runtime-1.1.0.tar.gz

Download URL chimera_runtime-1.1.0.tar.gz
Size 132.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c23a8cf75f5fff16dc543ca430c1096a1bd6876fa7257f70bf18febf9ac38663
BLAKE2b-256 checksum
How to use checksums
8ad064d8a44d502e75b9585aa3249b55caf97cf47fc99754b182c98456cfc24f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release files / chimera_runtime-1.1.0-py3-none-any.whl

Download URL chimera_runtime-1.1.0-py3-none-any.whl
Size 113.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd04f2b848492991c2717c1f440a669695a318faaaaad0c974013dec0f88446e
BLAKE2b-256 checksum
How to use checksums
12f5fe80352c0324d8597103b711ede9fade78b234f673ead2a738ec15bf4358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release 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