Skip to main content

EU-sovereign decision record layer for AI agents.

Project description

sentinel-kernel

AI decisions. Recorded. Sovereign. Auditable.

Every AI agent makes decisions. From 2 August 2026, EU high-risk AI systems must prove it — automatically, tamper-resistantly, under EU law. Sentinel makes that possible in five minutes, with zero cloud dependencies, in any environment including air-gapped.

PyPI Version License Tests Status EU AI Act


Quick demo — full stack in one command

git clone https://github.com/sebastianweiss83/sentinel-kernel
cd sentinel-kernel/demo
docker compose up --build

Then open http://localhost:3001 (Grafana, admin / sentinel).

The demo runs a realistic EU defence contractor scenario — policy evaluation, kill switch (Art. 14), document analysis, sovereignty scan — and streams live traces to Grafana. See demo/README.md for what to look at.

Install

pip install sentinel-kernel

Five minutes to your first sovereign trace

from sentinel import Sentinel

sentinel = Sentinel()  # local storage, zero config, no network

@sentinel.trace
async def approve_request(payload: dict) -> dict:
    # your existing agent logic — unchanged
    return await your_agent.run(payload)

result = await approve_request({"action": "approve", "amount": 50000})

That's it. Every call now produces a tamper-resistant decision record:

{
  "trace_id": "01hx7k9m2n3p4q5r6s7t8u9v0w",
  "timestamp": "2026-04-01T14:23:41.234Z",
  "agent": "approve_request",
  "model": "mistral/large-2",
  "policy_result": "ALLOW",
  "inputs_hash": "sha256:a3f8c2d19e4b67f0c1a5d8e2b9c3f4a7",
  "output": {"decision": "approved"},
  "sovereign_scope": "EU",
  "data_residency": "local",
  "schema_version": "1.0.0"
}

Stored locally. No cloud account. No API key. No network call.


With policy evaluation

from sentinel import Sentinel, DataResidency
from sentinel.policy import SimpleRuleEvaluator
from sentinel.storage import FilesystemStorage

def within_threshold(ctx: dict) -> tuple[bool, str | None]:
    if ctx.get("amount", 0) > ctx.get("agent_threshold", 0):
        return False, "amount_exceeds_threshold"
    return True, None

# works fully offline — classified environments, air-gapped networks
sentinel = Sentinel(
    storage=FilesystemStorage("/mnt/traces"),
    policy_evaluator=SimpleRuleEvaluator({
        "policies/procurement.py": within_threshold,
    }),
    sovereign_scope="EU",
    data_residency=DataResidency.EU_DE,
)

@sentinel.trace(policy="policies/procurement.py")
async def evaluate_procurement(ctx: dict) -> dict:
    return await agent.run(ctx)

For OPA/Rego policies:

from sentinel import Sentinel
from sentinel.policy import LocalRegoEvaluator

sentinel = Sentinel(
    policy_evaluator=LocalRegoEvaluator(opa_binary="opa"),
    # OPA runs in-process — no network, no OPA server
)

@sentinel.trace(policy="policies/procurement.rego")
async def evaluate_procurement(ctx: dict) -> dict:
    return await agent.run(ctx)

What Sentinel does. What it doesn't.

Sentinel LLM observability tools Proprietary AI platforms
Sovereign decision records Vendor-jurisdicted
In-process policy evaluation
Air-gapped operation
BSI IT-Grundschutz path
EU AI Act Art. 12 compliance Partial
Zero hard dependencies
Apache 2.0 permanently Varies
US CLOUD Act exposure None Varies Unconditional

Sentinel is not an observability tool. It is not a content filter. It does not replace your LLM or your agent framework. It wraps them — and produces a legally-valid, portable, sovereign record of every decision they make.


Deployment

Local / development

sentinel = Sentinel()  # SQLite, no config

On-premise enterprise

from sentinel import Sentinel, DataResidency
from sentinel.storage import SQLiteStorage

sentinel = Sentinel(
    storage=SQLiteStorage("/var/lib/sentinel/traces.db"),
    sovereign_scope="EU",
    data_residency=DataResidency.EU_DE,
)
# PostgreSQL storage planned for v0.2

Air-gapped / classified

from sentinel import Sentinel, DataResidency
from sentinel.storage import FilesystemStorage

sentinel = Sentinel(
    storage=FilesystemStorage("/mnt/traces"),
    data_residency=DataResidency.AIR_GAPPED,
)
# zero network connectivity required
# traces written as NDJSON, one file per day

Why sovereignty matters

The US CLOUD Act (18 U.S.C. § 2713) requires US-incorporated companies to produce data stored anywhere in the world on valid legal process. This applies to EU data centres operated by US companies. No contract eliminates it.

EU AI Act Article 12 mandates automatic, tamper-resistant logging for high-risk AI systems from 2 August 2026. Decision logs that are simultaneously accessible to US authorities do not satisfy this requirement from EU jurisdiction.

Sentinel's critical path — interceptor, policy evaluation, trace emission, storage — contains no US-owned components. This is architectural. Not a configuration option.


Roadmap

Version Status Milestone
v0.1 ✓ shipped Kernel, in-process policy eval, SQLite + Filesystem storage
v0.1.1 ✓ shipped Kill switch (EU AI Act Art. 14 halt mechanism)
v0.2 ✓ shipped PostgreSQL storage backend (optional extra)
v0.3 ✓ shipped LangChain callback handler + OpenTelemetry export + LangFuse enrichment
v0.4 ✓ shipped Air-gapped validation suite with network blocking
v0.5 ✓ shipped Sovereignty scanner (runtime, CI/CD, infrastructure)
v0.6 ✓ shipped Manifesto-as-code (SentinelManifesto)
v0.7 ✓ shipped EU AI Act compliance checker + diff report
v0.8 ✓ shipped Demo environment (Docker Compose + Grafana dashboard)
v0.9 ✓ shipped Sovereignty dashboard (terminal + self-contained HTML)
v1.0 Q4 2026 BSI IT-Grundschutz assessment — certified sovereign
v1.1 Q1 2027 VS-NfD classified deployment profile

What's in v0.9

v0.9 ships the complete sovereignty platform: the decision record kernel (v0.1–v0.4) plus everything a regulated team needs to evaluate, declare, and verify sovereignty end-to-end.

  • sentinel scan — runtime, CI/CD, and infrastructure scanners that classify every dependency by parent company and jurisdiction.
  • SentinelManifesto — declare sovereignty requirements as a Python class; run it against reality; get a structured report with gaps, acknowledged gaps, and migration plans.
  • EUAIActChecker — automated EU AI Act compliance check with honest gap reporting. Distinguishes machine-checkable articles (12, 13, 14, 17) from organisational obligations (10, 11, 15).
  • sentinel report — generate a self-contained HTML sovereignty report suitable for BWI / QS / regulatory review. No CDN, no external resources — air-gapped safe by construction.
  • sentinel dashboard — live terminal dashboard showing decision traces, policy results, sovereignty score, and kill switch state. Zero dependencies.
  • Demo packagedemo/ with Docker Compose (OTel collector, Prometheus, Grafana, self-hosted LangFuse), BWI evaluation package, and Quantum Systems autonomous-decision demo.
  • RFC-001SovereigntyManifest specification, the first step toward a cross-project standard.

EU AI Act compliance

Article Requirement Sentinel
Art. 9 Risk management Policy eval recorded in every trace
Art. 12 Automatic tamper-resistant logging Every decision produces a trace automatically
Art. 13 Transparency to deployers Policy name, version, result in every trace
Art. 14 Human oversight + kill switch Override mechanism → linked immutable trace
Art. 17 Quality management Continuous tamper-resistant record

Enforcement for Annex III high-risk AI: 2 August 2026. Penalties up to €15M or 3% of global annual turnover.

Full mapping: docs/eu-ai-act.md


Architecture

Your AI agents (any framework, any model)
         │
         ▼
  ┌─────────────────────┐
  │   Sentinel Kernel   │  ← wraps any agent call
  │                     │
  │  Interceptor        │  ← captures inputs, timing, context
  │  Policy Evaluator   │  ← in-process: Rego / Python / custom
  │  Trace Serializer   │  ← SHA-256 hashed, schema-versioned
  └──────────┬──────────┘
             │
    ┌────────┼────────┐
    ▼        ▼        ▼
 SQLite  PostgreSQL  Filesystem
                     (NDJSON, air-gapped)

Critical path guarantees:

  • Zero hard dependencies
  • Zero network calls at runtime
  • Zero US CLOUD Act exposure
  • Full offline / air-gapped operation

Contributing

Read CONTRIBUTING.md before opening a PR.

Every integration must document its sovereignty posture. Schema changes require an RFC. Breaking changes to the trace format go through a 14-day comment period.

git clone https://github.com/sebastianweiss83/sentinel-kernel
cd sentinel-kernel
pip install -e ".[dev]"
pytest

License

Apache 2.0. Full text.

No BSL. No commercial-only features. No relicensing. Ever.


Governance

Sentinel is pursuing stewardship under Linux Foundation Europe. Until confirmed, the project is maintained independently with all significant decisions made through the RFC process in GitHub Discussions.


Documentation

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

sentinel_kernel-0.9.0.tar.gz (123.9 kB view details)

Uploaded Source

Built Distribution

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

sentinel_kernel-0.9.0-py3-none-any.whl (60.1 kB view details)

Uploaded Python 3

File details

Details for the file sentinel_kernel-0.9.0.tar.gz.

File metadata

  • Download URL: sentinel_kernel-0.9.0.tar.gz
  • Upload date:
  • Size: 123.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentinel_kernel-0.9.0.tar.gz
Algorithm Hash digest
SHA256 ce1444727b0e95538e19fe35b14a9893bec13305fcdee0a8cac2e365fc9da344
MD5 52e7f5173ae7d3d2ac7b1e22177c7ea2
BLAKE2b-256 54c3a6e15097a1f5954d0439f449be5ab10665e88b3ff8217d95312e158deb7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinel_kernel-0.9.0.tar.gz:

Publisher: release.yml on sebastianweiss83/sentinel-kernel

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

File details

Details for the file sentinel_kernel-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: sentinel_kernel-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 60.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sentinel_kernel-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45317efc5353e78788450adea2298e25ff01abafe388599f906adc7204046fe2
MD5 c50e8e147e2e720b11fde60fe0d63851
BLAKE2b-256 a1b318d98d43252146b22f521cf35f7864df4d6bbc1ecc703b41bcb6909ea3fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for sentinel_kernel-0.9.0-py3-none-any.whl:

Publisher: release.yml on sebastianweiss83/sentinel-kernel

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

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