Skip to main content
EPI Logo

EPI — Evidence for AI agents

Record. Seal. Verify offline. The answer is a file.

PyPI Python 3.11+ Version v4.3.0 License: MIT Tests

pip install epi-recorder
epi demo --no-browser    # record → seal → verify (no API key)

60-second path · With OpenAI · Integrations · CLI · Standards


When someone asks what your agent did six months ago,
the answer should be a .epi file — not a dashboard login and a shrug.

epi-recorder captures agent decisions into a portable, signed, offline-verifiable artifact.
No phone-home required to open or verify.


60-second path

Works without any LLM API key:

# 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", 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 demo.epi (secrets redacted by default)
Verify epi verify demo.epi Integrity + signature checks offline
View epi view demo.epi Self-contained browser viewer (no server)

Typical first-run verify:

Check Result
Integrity (SHA-256) ✅ Valid
Signature (Ed25519) ✅ Valid
Identity ⚠ UNKNOWN until you epi keys trust your key
Secrets ✅ Redacted by default (redact=True)

DECISION: WARN on first verify is normal — integrity and signature still pass.
Trust identity with: epi keys trust <name> after epi keys list.

That’s the product. Everything below is optional depth.


With 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"}],
    )
python agent.py
epi verify agent.epi
epi view agent.epi

API keys in prompts/headers are redacted automatically before they land in the file.


What a .epi file is

Every .epi uses the Envelope v2 container format — a polyglot HTML+ZIP binary that opens natively in any browser and can be extracted programmatically.

demo.epi
├── manifest.json     # Ed25519 signature + SHA-256 file hashes
├── steps.jsonl       # Timeline (hash-linked steps)
├── environment.json  # Runtime snapshot (sensitive env redacted)
├── viewer.html       # Offline forensic UI
└── VERIFY.txt        # Plain-text auditor instructions
Guarantee How
Integrity SHA-256 over every sealed member
Authenticity Ed25519 signature on the manifest
Chain Each step’s prev_hash links the timeline
Privacy Default secret redaction (API keys, tokens, PII)

Integrations

Stack How
OpenAI wrap_openai(OpenAI())
Anthropic wrap_anthropic(Anthropic())
LangChain EPICallbackHandler
LiteLLM EPICallback
pytest pytest --epi
Microsoft AGT epi import agt <file>
# LangChain
from epi_recorder.integrations.langchain import EPICallbackHandler
llm = ChatOpenAI(model="gpt-4o-mini", callbacks=[EPICallbackHandler()])
# pytest — attach evidence to failing tests
pytest --epi

More: docs/FRAMEWORK-INTEGRATIONS-5-MINUTES.md


CLI

Command Purpose
epi verify <file.epi> Offline integrity + signature check
epi view <file.epi> Open offline viewer
epi run <script.py> Run a script under recording
epi keys generate Create a local signing key
epi keys list / trust / revoke Key management
epi demo Guided demo (alias of epi dev)
epi scitt register <file.epi> Optional transparency anchor
epi import agt <path> Import Microsoft AGT evidence

Security defaults

  • Redaction is on (redact=True). Keys/tokens/PII become ***REDACTED***:… placeholders.
  • Prefer not using redact=False in production (it warns).
  • Verification is local — no network required for integrity/signature.
  • First-run identity WARN is expected until you trust your key.

Standards & compliance

EPI produces evidence files that help with audit trails. It is not a compliance guarantee and does not provide legal advice. Whether evidence satisfies a specific regulatory threshold is for the auditor or notified body to determine.

Topic Docs
EU AI Act Annex IV docs/ANNEX-IV.md
AIUC-1 domains docs/standards/aiuc-1-evidence.md
SCITT docs/standards/scitt-predicate.md
CLI deep dive docs/CLI.md
Auditors guide docs/AUDITORS-GUIDE.md
epi verify agent.epi --aiuc1   # optional domain scoring

Troubleshooting

Symptom Fix
epi: command not found Activate the same venv where you pip installed, or use python -m epi_cli
DECISION: WARN first verify Normal — integrity/signature OK. Run epi keys trust … for KNOWN identity
Integrity: FAILED File was modified after seal — re-record
Share / portal fails Hosted features need a live backend; local record/verify never depends on them

Project layout (contributors)

Path Role
epi_recorder/ Python SDK (record, wrappers)
epi_core/ Container, crypto, redaction, verify
epi_cli/ epi command
website/ Public site source of truth (epilabs.org)
verify_portal/ Hosted verify/auth API (optional)
tests/test_core_loop_golden.py Golden path regression

Website edits: only under website/, then python scripts/sync_website.py.


License

MIT — see LICENSE.

Site: epilabs.org · Issues: GitHub Issues

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epi_recorder-4.3.0.tar.gz (3.8 MB view details)

Uploaded Source

Built Distribution

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

epi_recorder-4.3.0-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file epi_recorder-4.3.0.tar.gz.

File metadata

  • Download URL: epi_recorder-4.3.0.tar.gz
  • Upload date:
  • Size: 3.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for epi_recorder-4.3.0.tar.gz
Algorithm Hash digest
SHA256 e85234fbe1d81c351be6e438f50efd0bd2456a0b1b5ba00df4ed193b5ed62a91
MD5 736e8112d43fa1d128e1688db9931edc
BLAKE2b-256 4583f23db5fd388b218993c6bc7ccb726ae1e0c052740f2d9e8515ee86c5d192

See more details on using hashes here.

File details

Details for the file epi_recorder-4.3.0-py3-none-any.whl.

File metadata

  • Download URL: epi_recorder-4.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for epi_recorder-4.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4babaa9d464f012ce42f3ae76dbdaddf4a7f9b38a3de73c538cb2cfbe3ae6e9d
MD5 8df9033ea1508fb9eb07be5684d48e1a
BLAKE2b-256 3e32ae617c3fb7cf12e28989558ed968ef20a703bafb4baa96acce05a0e10440

See more details on using hashes here.

Release history Release notifications | RSS feed

4.4.0

2 files

This release

4.3.0 This release

2 files

4.2.0

2 files

4.1.0

2 files

4.0.3

2 files

4.0.2

2 files

4.0.1

2 files

4.0.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.8.10

2 files

2.8.9

2 files

2.8.8

2 files

2.8.7

2 files

2.8.6

2 files

2.8.5

2 files

2.8.4

2 files

2.8.3

2 files

2.8.2

2 files

2.8.1

2 files

2.8.0

2 files

2.7.2

2 files

2.7.1

2 files

2.7.0

2 files

2.6.0

2 files

2.5.0

2 files

2.4.0

2 files

2.3.0

2 files

2.2.0

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page