How EPI Works
Every AI decision, cryptographically sealed in a single file. Here's the full lifecycle.
1. Install (one command)
pip install epi-recorder
Works on any machine with Python 3.11+. No server. No API keys. No configuration.
Evidence Lifecycle
Every step produces a cryptographically verifiable, self-contained .epi file
2. Record — Wrap your agent
from epi_recorder import record, wrap_openai
from openai import OpenAI
client = wrap_openai(OpenAI())
with record("agent-decision.epi"):
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Assess this insurance claim"}]
)
# Every API call, tool invocation, and decision is captured
Three lines of Python. EPI silently intercepts every LLM API call, tool invocation, guardrail check, and decision point. No code changes to your existing workflow.
What gets captured
- LLM requests & responses — full messages, model, tokens, timestamps
- Tool calls — function name, arguments, return values
- Guardrail evaluations — each check result, which passed/failed
- Human approvals — who approved, when, with what justification
- System context — Python version, packages, environment snapshot
- Custom steps —
epi.log_step()for any arbitrary event
3. Seal — Cryptographic signing
When the with record(): block exits, EPI seals the evidence file:
- Hash chain — every step is SHA-256 hashed, each linking to the previous. Breaking the chain is detectable.
- Manifest — a JSON manifest lists every embedded file with its hash, the workflow identity, and metadata.
- Ed25519 signature — the manifest is signed with your private key. Changing any byte invalidates the signature.
- Polyglot container — the .epi file is simultaneously a valid ZIP archive and a valid HTML page. Open it in any browser.
4. Verify — 5 cryptographic checks
epi verify agent-decision.epi
All checks run locally, offline:
- Structure — is the .epi file a valid polyglot container?
- Manifest — does the manifest parse and include required fields?
- Integrity — do all embedded files match their SHA-256 hashes?
- Hash chain — is the step timeline chain intact (no insertion, deletion, reordering)?
- Signature — does the Ed25519 signature validate against the signer's public key?
All 5 checks pass → HIGH trust. The file is cryptographically identical to when it was sealed.
5. View — Open in any browser
Because .epi files are valid HTML, you can open them in any web browser. The built-in viewer shows:
- Step-by-step replay of every agent action
- Full message exchange between your agent and the LLM
- Decision tree visualization
- Guardrail and policy check results
- Cryptographic verification status
- Signer identity from the trust registry
6. Share — Hosted links and SCITT
epi share agent-decision.epi
Generate a hosted share link that reviewers can open in their browser. Or use SCITT (Supply Chain Integrity, Transparency, and Trust) to register a transparency receipt — cryptographic proof that the evidence existed at a specific point in time.
Framework Integrations
EPI works with all major AI agent frameworks through drop-in wrappers:
- OpenAI —
wrap_openai() - Anthropic —
wrap_anthropic() - Google Gemini —
wrap_gemini() - LangChain — callback handler
- LangGraph — checkpoint integration
- LiteLLM — callback handler
- OpenTelemetry — span exporter
- Guardrails AI — instrumentor
- AGT (Agent Trust & Governance) — exporter
Deployment Options
- Local CLI — everything runs on your machine. No network needed.
- CI/CD — GitHub Actions integration for automated verification gates
- Pytest —
pytest --epi --epi-on-passcaptures test runs as evidence - Hosted Verification — upload .epi files for AIUC-1 compliance scoring (Pro/Enterprise plans)
- Hosted SCITT — remote transparency anchoring with cryptographic receipts (Enterprise plan)
Security Model
- No cloud dependency — recording and verification work entirely offline
- No data leaves your machine — unless you explicitly use hosted services
- Private keys stay local — signing happens on your machine, not in the cloud
- Self-verifying files — .epi files contain everything needed for offline verification
- Redaction built-in — API keys, secrets, and sensitive data are automatically redacted before storage