The flight data recorder for AI agents — hash-chained, signed journal with RFC 3161 anchoring and third-party-verifiable exports.
pip install noirebox==0.23.0 Copy PIP instructions
The black box for AI agents — tamper-evident journal, guardrails, verifiable proof.
Your AI agent writes meeting notes that bind your clients. Eighteen months from now — who can prove what it exactly produced, and why? NoireBox seals every decision in a SHA-256 hash-chained + Ed25519-signed journal, flags poisoned transcripts before they reach the agent, and exports an attestation anyone can verify offline — without trusting you.
Works with any agent, in French and English. The journal, the API, the MCP tools and the verifier are domain- and language-agnostic; each language gets a ~250 KB detector trained from a reproducible dataset (seed 42) — a new market = one dataset generator + make train. Already have a guardrail? Keep it — it's just another event source. 🇪🇺 Built for the European market (GDPR & AI Act) — engineered in France.
Quickstart · Real LLM scene · Specs · Threat model · The authority ladder · ADRs
European AI vendors face a compliance reality their US competitors don't: proving — not promising — what their systems did. NoireBox is engineered around exactly that obligation. And the clock is real: GPAI incident tracking is live since August 2025 (art. 55(1)(c)), transparency obligations applied in August 2026, and high-risk logging lands 2 December 2027 (AI Act as amended by the Digital Omnibus, Reg. (EU) 2026/1744) — with fines up to €35 M / 7 % of turnover.
Honest scope (we're a building block, not a certification): NoireBox proves the integrity of your AI's record. Data minimization of payloads remains the deployer's responsibility. Key custody now ships in the box — the key can live in a dedicated process (0.15.0) or on a PKCS#11 token (0.16.0); the pinned hardware root is still the deployer's call — see the threat model. A tool that oversells compliance is a liability; one that states its perimeter is auditable.
NoireBox applies the Certificate-Transparency model to AI-agent journals: many journals, one root signed by a timestamp authority, inclusion proofs that anyone verifies offline (noirebox/merkle.py, make demo-fleet). To our knowledge, no other agent-audit tool does this.
Prevention varies per stack. Proof is universal.
pip install noirebox # the ML engine ships inside the wheel (FR + EN) pip install noirebox[pdf] # + the DPO-ready PDF attestation (optional extra) noirebox serve # API on http://127.0.0.1:8768/docs From source:
./start.sh # venv + deps + tests + API on http://127.0.0.1:8768/docs make demo # the full story in one command (see below) Or with Docker — no Python needed, the ML engine ships inside the image:
docker run -p 8768:8768 ghcr.io/noirebox/noirebox:latest # API + OpenAPI docs on http://127.0.0.1:8768/docs — data persists in ./data Standalone demos:
make demo # the full scene: micro-model → journal → auditor → caught pirate make demo-mcp # NoireBox as an MCP tool (agent protocol) .venv/bin/python demo/demo_scan.py # regex guardrail on 2 transcripts .venv/bin/python demo/demo_tamper.py # tampering → the chain explodes .venv/bin/python demo/demo_provenance.py # provenance sealing vs model collapse (ADR 011) Verify an export as a third party (auditor, DPO, client):
curl -s http://127.0.0.1:8768/api/v1/export > export.json .venv/bin/python verifier/verifier.py export.json # exit 0 = intact & witnesses verified · exit 2 = anchoring UNPROVEN (missing openssl/ots?) · --allow-unverified-witnesses to accept The verifier needs the NoireBox package on the auditing machine — pip install noirebox is enough (no model, no framework).
The journal proves integrity, but when was it sealed? A server announcing its own dates is the suspect writing its own report. And the threat model had one open gap: an operator holding the private key could regenerate the whole chain with valid signatures.
Anchoring closes it — with witnesses you choose, in layers (ADR 006/008/009):
One anchor event carries all of them. Only the 32-byte head hash ever leaves (zero data, zero GDPR exposure). And anchoring is retroactive: one external anchor seals the entire prior chain — a regenerated chain shows a head the tokens don't cover, caught at verification time without any prior external publication. Anchor regularly and the falsifiable window shrinks to the tail since the last anchor.
export NOIREBOX_TSA_PROFILES='[ {"name": "freetsa", "url": "https://freetsa.org/tsr"}, {"name": "bitcoin", "kind": "ots"}]' export NOIREBOX_TSA_ALLOWED_HOSTS=freetsa.org curl -X POST localhost:8768/api/v1/anchors # one call, both witnesses, the whole past sealed noirebox audit-pack ./audit # the auditor's folder: export + report + Annexe IV §2(f) A self-hosted OpenSSL TSA still ships for sovereign/offline deployments (make tsa) — same trust boundary as the operator, documented as such. Full regulatory mapping: docs/COMPLIANCE-EU.md.
Architecture decision — ADR 002: we evaluated Meta's Llama Prompt Guard 2 (the industry classifier, ~90 MB) and rejected it knowingly: gated license, torch/transformers as dependencies, and binary output without an audit taxonomy. The ADR also documents the integration path if you ever need it (adapter ≈ 40 lines behind the same engine interface). The tier-2 judge stays a local LLM — ADR 015's real-model evaluation rejected llama-guard3:1b (it ignores custom policies and misses transcript injection); the default is qwen2.5-coder:3b behind the house-taxonomy few-shot prompt. Zero new Python deps.
A real LLM (qwen2.5:0.5b, 397 MB, local via Ollama — never committed, fetched by ollama pull) receives the poisoned transcript:
brew install ollama && ollama serve && ollama pull qwen2.5:0.5b # once make demo-llm # the scene Measured outcome (temperature 0, reproducible):
See also deploy/DEPLOIEMENT.md for €0 deployment (instant cloudflared tunnel, permanent Hugging Face Space) or a €3–6/mo VPS.
make train # FR: gen_dataset.py (5,400 examples) → detector.joblib make train-en # EN: gen_dataset_en.py (5,400 examples) → detector_en.joblib A new language is a dataset, not a rewrite: the trainer, the registry and the API (lang: "fr" | "en") are shared. Adding Spanish = one gen_dataset_es.py + ml/train.py --lang es.
Honest evaluation (the part that earns credit in reviews):
curl -X POST https://noirebox.example.com/api/v1/transcripts/scan \ -H 'Content-Type: application/json' \ -d '{"meeting_id": "MTG-42", "text": " ", "engine": "ml"}' 2. Python SDK (noirebox/client.py):
from noirebox.client import NoireBoxClient nb = NoireBoxClient("https://noirebox.example.com") nb.scan("MTG-42", transcript) # guardrail before the agent nb.log_event("llm_output", {...}) # seal the agent's output nb.verify() # check the chain 3. MCP (the agent protocol — Claude Desktop and every MCP client): 4 tools exposed (noirebox_scan, noirebox_log_event, noirebox_verify, noirebox_attestation). Config (claude_desktop_config.json):
{ "mcpServers": { "noirebox": { "command": "/path/to/noirebox/.venv/bin/python", "args": ["-m", "noirebox.mcp_server"] } } } Stdio JSON-RPC implementation with no external SDK: the protocol stays readable end to end (demo/demo_mcp.py).
The journal is universal (free-typed events). The shipped guardrail corpus specializes in FR meeting transcripts — extending it to another domain = adding examples to the dataset and re-running make train.
noirebox/ ← package (≈ PSR-4 namespace) ├── chain.py THE CORE: SHA-256 hash chain + Ed25519 signatures ├── store.py THE CORE: append-only SQLite, parameterized queries, lock ├── attestation.py THE CORE: signed digest of the chain state ├── anchors.py THE CORE: RFC 3161 anchoring (TSA witness) ├── pdf_export.py THE CORE: DPO-ready attestation PDF ├── main.py FastAPI routes (the HTTP layer) ├── schemas.py Pydantic DTOs (request validation) ├── client.py Python SDK ├── mcp_server.py MCP tools server (stdio JSON-RPC) ├── guardrail.py PLUGIN: 4 FR/EN attack categories caught by regex ├── ml_guardrail.py PLUGIN: trained micro-models (fr + en, ~250 KB each) ├── llm_judge.py PLUGIN: tier-2 judge — local LLM, house taxonomy (ADR 015) ├── tiering.py PLUGIN: tiered scan — regex → ML → judge on doubt (ADR 016) ├── fleet.py HUB v0: fleet-anchor / fleet-verify over merkle.py (ADR 017) └── llm_agent.py PLUGIN DEMO: real Ollama agent behind the guarded pipeline API Route Auth Role POST /api/v1/token — Exchange client_id/client_secret for a 1 h JWT POST /api/v1/events 🔒 Record an event (prompt, output, eval…) GET /api/v1/events 🔒 Paginated event list; since_seq = live tail (cursor) GET /api/v1/verify open Verify the chain in place GET /api/v1/activity open Per-day sealed-event counts (dashboard heatmap) POST /api/v1/transcripts/scan 🔒 Guardrail: detect injections, journal the incident GET /api/v1/attestation open Signed attestation of the current state GET /api/v1/attestation.pdf open Attestation as a DPO-ready A4 PDF POST /api/v1/attestation/verify open Verify a submitted attestation POST /api/v1/anchors 🔒 RFC 3161 anchor: seal the current chain head with a TSA GET /api/v1/export 🔒 Full auditable export 🔒 = requires Authorization: Bearer when NOIREBOX_CLIENTS=id:secret,… is set; verification routes stay open by design — one never locks the verification (ADR 004). Rate limit: 60 req/min per client. The metadata routes (/activity, /attestation*) expose aggregates and digests only (never payload content) and can be moved behind the token with NOIREBOX_METADATA_AUTH=1.
See corpus/attaques.json. Extending = add regex patterns or dataset examples, then make train.
428 tests: cryptography (tampering, reordering, wrong key), regex and ML guardrails on held-out sentences in FR and EN, the guarded pipeline with a stub LLM (no Ollama needed, runs in CI), API agent, MCP server, SDK client against a real uvicorn server (ephemeral port), real LLM agent (skipped if Ollama is absent), OAuth2 JWT auth + rate limiting + DPO-ready PDF attestation + RFC 3161 anchoring against a real local TSA (incl. the insider chain-regeneration attack), and the full third-party verifier contract. Everything replays locally: make test re-trains both language models and runs the full suite.
The SCAR replay suite is a differential, not just a test suite — the four attack fixtures from Randal L. Schwartz's gate-attack catalog (plus the canary-witness race, SCAR-PROC-114) replayed against this reconciliation layer, each asserting what it does: catches the attack, or confesses the gap in writing. Run it against YOUR gate: make differential. Grading, claims format and the Level 0/1/2 enforcement taxonomy: docs/SCAR-BENCH.md.
Static security scanning runs in CI (Bandit, fails on MEDIUM and above); every recurring LOW finding is baselined with its justification in docs/SECURITY-BASELINE.md — no silent noise.
Consuming AI-agent decisions in your own pipeline? Gate your builds on the integrity of the journal — the verifier ships as a GitHub Action (Marketplace):
- uses: noirebox/noirebox-verify@v1 with: export-path: export.json noirebox-ref: v0.16.0 # pin the verifier ref — reproducible audits Roadmap What remains. Everything shipped lives in the CHANGELOG and the ADRs — this section only holds what is still open.
NoireBox is free and MIT — verification included, forever. If it saved you time (or a compliance headache), a coffee is the best way to say it helps:
NoireBox is created and maintained by @slabbdev — built solo, in the Vosges mountains.
ai-act ai-agents audit-trail compliance gdpr guardrail llm rfc3161 tamper-evident
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.




