epi-recorder
Health Pass
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 29 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Tamper-evident AI auditability, explainability & decision records. Seal OpenAI/LangChain/MCP runs into offline-verifiable .epi files.
Decision records for AI agents
Tamper-evident AI auditability, explainability, and verifiable observability — in one file your customer can check offline.
Record what an AI agent saw, decided, and why — inputs, tool calls, model version (OpenAI, Anthropic, LangChain, MCP), and human approvals. Go beyond internal AI observability logs: seal each decision into a signed .epi artifact (SHA-256, Ed25519, optional RFC 3161 timestamp) for independent AI auditability and explainability with no account or server.
pip install epi-recorder
epi demo --no-browser # record → seal → verify, no API key
Release v4.11.2 — what changed
See a real decision record ·
What a .epi is ·
Verify one ·
CLI ·
Docs
What this proves, and what it does not. A sealed
.epiproves the record has not changed
since it was sealed, and that it was signed by the key you pinned. It does not prove the agent
captured everything it did, that the decision was correct, or that you are compliant. It is
evidence input, not a certificate.EPI is not a compliance guarantee and does not provide legal advice. Whether evidence
satisfies a specific regulatory threshold is for your auditor or notified body to decide.
Who this is for
AI vendors selling decision-making agents into insurance, lending and banking, and the
carriers, banks and auditors reviewing them. The question that stalls every review is: "For claim
4471, what did the model see, decide, why, which version answered, and who overrode it?" Logs do
not answer it and a vendor dashboard is what the reviewer trusts least. EPI answers with one file
per decision that leaves your platform and is checkable by the party who does not trust you.
If you would rather not instrument it yourself, we run a readiness assessment: one workflow, 5 working days, €4,500. See https://epilabs.org/plans.
60-second path
No API key, no account:
# demo.py
from epi_recorder import record, get_current_session
with record("demo.epi", goal="show the golden path"):
s = get_current_session()
s.log("tool.call", tool="lookup", id="A-1")
s.log("tool.response", tool="lookup", ok=True, balance=250)
s.log("decision", action="approve", reason="within limit")
python demo.py
epi verify demo.epi
epi view demo.epi
| Step | Command | What you get |
|---|---|---|
| Record + seal | python demo.py |
Signed epi-recordings/demo.epi, secrets redacted by default |
| Verify | epi verify demo.epi |
SHA-256 integrity, Ed25519 signature, step chain — offline |
| View | epi view demo.epi |
Local browser viewer (screenshot below) |
| Explain | epi analyze demo.epi |
Fault and policy summary, without opening the viewer |
First-run identity is LOCAL / UNKNOWN, and that is normal. Seal integrity and identity are
separate facts. A reviewer pins your key, obtained out of band — never from the file being checked:
epi keys trust vendor.pub --name acme
epi keys trust --from-did did:web:vendor.example --name acme
A bare filename goes to ./epi-recordings/. A path with a folder (./demo.epi) is written exactly
there. Re-running never overwrites evidence: it writes demo-2.epi, demo-3.epi, and says so.EPI_OVERWRITE=1 replaces in place.
Forensic view of a sealed run. Sample artifact: docs/assets/readme-demo.epi
What a .epi file is
A sealed .epi is data-only by default: a plain ZIP that verifies offline and opens in the
local viewer with epi view, with no HTML inside.
demo.epi
├── mimetype
├── manifest.json # Ed25519 signature + SHA-256 file hashes
├── steps.jsonl # Timeline (hash-linked steps)
├── environment.json # Runtime snapshot (sensitive env redacted)
├── policy.json # Sealed rulebook copy (when policy ran)
├── policy_evaluation.json # Control results (when policy ran)
├── analysis.json # Fault / policy analysis (when generated at seal)
├── VERIFY.txt # Plain-text auditor instructions
└── artifacts/notarization/ # RFC 3161 tokens (when a TSA answered)
Seal with --with-viewer (record(..., with_viewer=True), epi demo --with-viewer) and the file
also becomes an Envelope v2 polyglot HTML+ZIP: it opens by double-click in any browser and still
extracts as a ZIP. The HTML shell is the only difference; both forms verify identically.
| Guarantee | How |
|---|---|
| Integrity | SHA-256 over every sealed member |
| Authenticity | Ed25519 signature on the manifest |
| Chain | Each step's prev_hash links the timeline |
| Time | Optional RFC 3161 timestamp from a public TSA — only a hash is sent |
| Privacy | Redaction on by default: API keys, tokens, email, phone, card and US SSN patterns |
Redaction is pattern-based. It does not catch names, IBANs or domain-specific identifiers —
allowlist the fields you must preserve, and read
FILE-SAFETY.md
before sending a file outside your organisation.
Verify a file you received
This is the path your customer, auditor or examiner takes. It needs no account, no licence and no
network:
pip install epi-recorder
epi verify claim-4471.epi --policy strict
--policy strictis what you rely on for a pass/fail exit code; a plain WARN exits 0.- Add
--witness-log received.jsonlto prove this is the version that was reported to you, not one
re-signed later with a valid key. - No Python on the reviewer's machine? They can use the
browser verifier or the
standalone verifier.
Three separate questions, three separate answers — do not conflate them:
| Question | Command |
|---|---|
| Is the file intact and signed? | epi verify FILE |
| Do I know who signed it? | pin the key with epi keys trust, then verify |
| Did the run follow our rules? | epi analyze FILE / epi_policy.json |
Install what you need
The base install is small: it records, seals and verifies. Framework support is optional.
| Extra | Adds |
|---|---|
epi-recorder[openai] |
wrap_openai |
epi-recorder[anthropic] |
wrap_anthropic |
epi-recorder[langchain] |
the LangChain callback (EpiCallbackHandler) |
epi-recorder[aws-kms] / [gcp-kms] / [pkcs11] |
HSM/KMS signing |
epi-recorder[all] |
everything except the dev/test toolchains |
The team gateway (epi gateway serve, epi connect) and the framework
adapters for LangGraph, LiteLLM, OpenAI Agents, OpenTelemetry and Guardrails
ship in the paid epi-enterprise package. The LangChain callback stays free and
open source, in epi_recorder.adapters.langchain (installepi-recorder[langchain]). If it cannot record a step, it never breaks your
chain: it warns, and the sealed file lists the missing step under known_gaps.
# pip install "epi-recorder[openai]"
from openai import OpenAI
from epi_recorder import record, wrap_openai
client = wrap_openai(OpenAI()) # needs OPENAI_API_KEY
with record("agent.epi", goal="Answer a user question"):
client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Hello"}],
)
API keys in prompts and headers are redacted before they reach the file.
Integrations
| Stack | How |
|---|---|
| OpenAI | wrap_openai(OpenAI()) |
| Anthropic | wrap_anthropic(Anthropic()) |
| LangChain | EpiCallbackHandler(session) inside with record(...) as session (epi-recorder[langchain]) |
| LiteLLM | EPICallback (EPI Enterprise) |
| pytest | pytest --epi — one .epi per failing test in ./test-evidence/ (--epi-on-pass keeps passes too) |
| Microsoft AGT | epi import agt <path> |
| Any HTTP client | epi gateway serve records traffic without the SDK (EPI Enterprise) |
TRACE export (epi export trace) produces a self-consistent Level 0 record. Signing order:--key → the sealing key → TRACE_PRIVATE_KEY_PEM → ephemeral. policy.enforcement_mode is"declared": no Cedar engine ran, and policy.bundle_hash covers the sealed EPI policy, not a
Cedar bundle. Details: FRAMEWORK-INTEGRATIONS-5-MINUTES.md.
Use it from an MCP client
Three tools: epi_seal_record, epi_verify, epi_export_summary. The SDK is an
extra and the package ships three executables, so name both:
{"mcpServers":{"epi":{"command":"uvx","args":["--from","epi-recorder[mcp]","epi-mcp"]}}}
Remote hosts: epi-mcp-http --port 8000. Contract: EPI-MCP-CONTRACT.md.
Open core: what is free, what is paid
Free and open source (Apache-2.0 from 4.10.0; MIT up to 4.9.0), in this repository: the .epi
format, epi verify, the viewer, the recorder, the customer-side witness (epi witness serve /report), the policy engine, epi approvers, epi review, single-user epi oversight report,epi org bundle, and every offline proof check.
Paid, and not in this repository: EPI Enterprise (epi audit, epi annex, epi notify,epi chat, the team gateway and epi connect, the framework adapters beyond
LangChain, regulatory mappings) and
EPI Cloud (hosted witnessing, trust pages, retention, team review). The Cloud client and witness
protocol stay open so anyone can build a compatible service.
The promise that makes the file worth anything: epi verify will never require an account, a
licence, a server or a network connection. scripts/audit_wheel.py andtests/test_open_core_boundary.py enforce both halves — no paid code in the wheel, no gate in the
verifier. Exact boundary:
LICENSING.md.
Share a run with a customer (optional)
Sealed runs stay offline unless you push them. EPI Cloud gives a reviewer a browser link:
epi cloud login # device code; nothing secret to copy
epi demo # record, seal, upload for that customer
Free workspace: 1 customer relationship, 1 share link (7 days), 10 files a year and 30-day storage. Startup and Growth are self-serve by card in the dashboard; Enterprise is arranged directly.
On paid plans every decision is independently witnessed by EPI Cloud, with no limit; Free records, seals and shares but does not witness.
Recording and verification never depend on Cloud.
Security defaults
- Redaction on (
redact=True);redact=Falsewarns. - Verification local — integrity and signature checks need no network.
- Sealing asks a public TSA only for a hash, never the file. Switch off with
EPI_NOTARIZE=0,
or point at your own withEPI_TSA_URLS. - Seal ≠ identity ≠ policy. Three checks, three answers.
- Windows binaries: how the installer and Store package are signed, and by whom, is in
CODE_SIGNING_POLICY.md.
CLI
| Command | Purpose |
|---|---|
epi demo |
Guided: record → seal → verify |
epi verify <file.epi> |
Offline integrity + signature (--policy strict for exit-code trust) |
epi view <file.epi> |
Local browser viewer |
epi analyze / epi export-summary |
Fault and policy summary, or a one-page HTML/text summary |
epi keys generate / list / trust / revoke |
Signing and pinned keys; fingerprints printed |
epi policy init |
Create epi_policy.json |
epi approvers / epi review |
Pin approver keys; the approver signs |
epi witness serve / report |
Customer-side witness receiver |
epi oversight report / epi org bundle |
Decisions by outcome, model and approval over a period; the customer's own key history |
epi import agt / epi export trace / epi scitt register |
AGT in, TRACE Level 0 out, SCITT receipt (self-issued unless --service <url>) |
Full surface: CLI.md.
Docs
| Topic | Link |
|---|---|
| How to use it (what / where / how) | USER-GUIDE.md |
You received a .epi (one page, no jargon) |
RECIPIENT-CARD.md |
| Verify with no Python installed | STANDALONE-VERIFIER.md |
| What verify means | VERIFICATION_CONTRACT.md |
| Known limitations (read before a security review) | KNOWN_LIMITATIONS.md |
| Is the file safe to open? | FILE-SAFETY.md |
| Architecture, packages, integrity model | ARCHITECTURE.md |
| Bank / auditor briefing | AUDITORS-GUIDE.md |
| EU AI Act Annex IV (templates, not a certificate) | ANNEX-IV.md |
| Docs map | docs/README.md |
Runnable examples — pytest plugin, gateway, witness, AGT and TRACE:examples/.
Break the seal — try to break the guarantees. Credit only, no bounty:
CHALLENGE.md.
Contributing, security, support
- Contributing: CONTRIBUTING.md · CODE_OF_CONDUCT.md
- Security reports: SECURITY.md — please do not open a public issue
- Support and scope: SUPPORT.md
- License: Apache-2.0 from 4.10.0 - LICENSE and NOTICE. Versions up to and including 4.9.0 are MIT and stay MIT.
Built by Mohd Ibrahim Afridi at EPI Labs ·
epilabs.org · Issues
EPI is not affiliated with the NAIC, and nothing here is legal advice. Whether evidence satisfies
a regulatory threshold is for your auditor or notified body to decide.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found