Skip to main content

wakeprint 👣

Every agent leaves a trail. wakeprint is the black box for AI agents. Tamper-evident recording of everything your agent saw and did — prompts, model responses, tool calls — with causal incident tracing, court-grade evidence export, and a replay UI.

Over half of production AI agents run with no logging. When one leaks data or takes a harmful action, nobody can reconstruct why. wakeprint is the flight recorder: prevention tools assume attacks can be stopped; wakeprint assumes some will land, and makes sure you can prove exactly what happened.

Renamed from echotrail. Versions 0.12–0.13 were published as echotrail. Replace echotrail with wakeprint in imports, CLI commands and MCP configs. The trace format is unchanged, so existing traces, anchors and evidence bundles still verify.

Why it's different

  • Tamper-evident by construction — every event is SHA-256 hash-chained; any edit, deletion, or reordering breaks verification from that point on
  • Externally anchored — chain heads can be timestamped by an RFC 3161 authority, so even a wholesale rewrite of the chain after an incident is detectable
  • Causal, checkable evidence — injection origins are linked to downstream actions via concrete tokens ("attacker@evil.example first appeared in this ticket, then in this send_email call"), never model guesswork
  • Verifiable by anyone — evidence bundles include a stdlib-only verify.py; an auditor, insurer, or opposing counsel verifies offline with zero trust in you or us
  • Zero-code option — the MCP proxy records any MCP-based agent with a one-line config change

Install

pip install -e .                 # core (recording, replay UI, CLI)
pip install -e ".[dev]"          # + tests
pip install -e ".[anchor]"       # + RFC 3161 external timestamping
pip install -e ".[otel]"         # + OpenTelemetry export

Quickstart (60 seconds)

python examples/demo_agent.py    # writes demo traces incl. a simulated injection incident
wakeprint serve                  # replay UI at http://127.0.0.1:8377

The demo shows a clean session and an injection incident: red-flagged events, an incident panel tracing the poisoned ticket to the exfiltration email, and integrity badges that flip to TAMPERED if you edit a trace file by hand.

Record your own agent

SDK (3 lines)

from wakeprint import Recorder

rec = Recorder(root="./traces")
with rec.session("support-agent run", config={
    "system_prompt": "You are a support agent.",   # captured in the chain —
    "model": "claude-sonnet-5",                     # the most often-missing
    "tools": ["read_ticket", "send_email"],         # evidence in incidents
}) as s:
    client = s.wrap_openai(OpenAI())        # sync, async, and streaming all work
    # or: client = s.wrap_anthropic(Anthropic())

    @s.record_tool                          # sync or async tools
    def send_email(to: str, body: str): ...

Streaming responses are relayed chunk-by-chunk to your code while the assembled text is recorded as a single llm_response.

TypeScript / Node (js/)

import { Recorder } from "wakeprint";

const rec = new Recorder("./traces");
await rec.session("my-agent run", { config: { model: "gpt-x" } }, async (s) => {
  const client = s.wrapClient(new OpenAI());          // async + streaming recorded
  const sendEmail = s.recordTool("send_email", async (to: string) => { ... });
});

Traces are byte-compatible across languages: a session written from Node is verified, replayed, exported, and causally traced by the Python CLI.

MCP proxy (0 lines)

Wrap any stdio MCP server in your client's config — Claude Desktop, Claude Code, or any framework:

{ "command": "wakeprint",
  "args": ["mcp-proxy", "--root", "/var/wakeprint/traces", "--name", "github-mcp", "--",
           "npx", "-y", "@modelcontextprotocol/server-github"] }

All JSON-RPC traffic is relayed untouched and recorded; injection scanning and causal tracing apply automatically. Recording errors never break the agent.

CLI

wakeprint list                        sessions with integrity status + risk score
wakeprint verify SESSION_ID | --all   verify hash chain + anchors (exit 1 on tamper — CI friendly)
              [--tsa-ca CA.pem]       also check RFC 3161 token signatures (needs openssl)
wakeprint serve                       replay UI
wakeprint incident SESSION_ID         causal trace: injection origin -> downstream actions
wakeprint export SESSION_ID           self-verifying evidence zip (chain of custody)
wakeprint anchor SESSION_ID           RFC 3161 external timestamp of the chain head
wakeprint otel SESSION_ID             export session as OpenTelemetry spans
wakeprint siem SESSION_ID             ECS (default) or --format ocsf NDJSON for your SIEM

Example: incident trace

INCIDENT TRACE — session 20260718-154617-427bf6f0

origin seq 3 (tool_result) — verdicts: instruction override, concealment request, redirection — risk 29
  injected tokens: attacker@evil.example
  -> seq 5 llm_response            [TAINT: attacker@evil.example]
  -> seq 8 tool_call send_email    [TAINT: attacker@evil.example]
  (2 additional downstream event(s) with temporal link only)

Every link cites the exact token and where it appeared — an investigator can check each claim by hand, which is the standard evidence must meet.

Example: evidence bundle

wakeprint export produces <session>_evidence.zip containing the trace, a manifest (sha256, verification state, flagged events), the session's anchor records, and a dependency-free verify.py:

$ python verify.py --tsa-ca freetsa_cacert.pem
OK: events.jsonl sha256 matches manifest (a3f1c2...)
OK: hash chain intact across 10 events
OK: RFC 3161 anchor matches chain head (TSA time 20260718154702Z, serial 157560240)
OK: TSA signature valid
EVIDENCE VERIFIED

Without --tsa-ca, the verifier still checks that each RFC 3161 token timestamps exactly the anchored hash (stdlib only); --tsa-ca with openssl on PATH also checks the TSA's signature. Get the TSA's CA certificate from the TSA itself, not from the bundle.

SIEM export

wakeprint siem SESSION_ID writes one NDJSON record per event in Elastic Common Schema 8.11; --format ocsf writes OCSF 1.1 API Activity records plus a Detection Finding for every flagged event. Each record carries the event's seq, hash, prev_hash, the session's chain-verification result, and taint links back to the injection origin.

Cross-language hashing

Event hashes use canonical JSON with ECMAScript number formatting (2.0 → 2, 1e-05 → 0.00001), so a trace written from Node verifies in Python and vice versa, including payloads with floats. Traces written before v0.13 still verify in Python.

Threat model

Attack Defense
Edit/delete/reorder past events Hash chain breaks at the exact seq — verify exit 1
Rebuild the entire chain after an incident External RFC 3161 anchor no longer matches
Rebuild the chain and edit the anchor record Token's signed imprint no longer matches the anchored hash
Fabricate a timestamp token Signature check against the TSA's CA fails (--tsa-ca)
Concurrent writers (e.g. MCP proxy threads) Per-session write lock keeps one linear chain
Dispute what config/model was live Config snapshot is the first chained event
"The injection didn't cause that action" Taint links cite the exact introduced token
Tamper with exported evidence Standalone verifier fails; manifest sha256 mismatch

Injection flags are advisory heuristics (severity-weighted: high/medium/low). The evidence trail is the product; detection is a lens over it.

Architecture

agent code ── SDK wrappers ─┐
                            ├─► TraceStore (hash-chained JSONL) ──► anchors (RFC 3161)
MCP client ── mcp-proxy ────┘        │
                              scan.py (severity-weighted flags)
                              causal.py (taint analysis)
                                     │
                    ┌────────────────┼──────────────────┐
              server.py (UI)   export.py (evidence)   otel.py (spans)

Tests

pytest tests/   # 19 tests: chain integrity, tamper/forgery detection, causal
                # tracing, MCP proxy end-to-end, async/streaming, OTel export

Roadmap

  • S3/WORM object storage backends and retention policies
  • Chain-of-custody PDF reports for regulators and insurers
  • UI auth (SSO/RBAC), multi-agent responsibility graphs
  • Anomaly detection over the trace corpus — recording first, detection second

Metadata

Release files for wakeprint 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wakeprint 0.14.0
File Size Uploaded Provenance
wakeprint-0.14.0.tar.gz 46.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wakeprint 0.14.0
File Interpreter ABI Platform
wakeprint-0.14.0-py3-none-any.whl Python 3 none any Details

Total release size: 85.1 kB

Release files / wakeprint-0.14.0.tar.gz

Download URL wakeprint-0.14.0.tar.gz
Size 46.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f6cd0b18544902b69a018abcbdfa009ccdca563b6ddc105a2ebd422979a606c5
BLAKE2b-256 checksum
How to use checksums
a5c72184cef6fe705079f07d27e4e4998ed0806687506205614c3bad565a852d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / wakeprint-0.14.0-py3-none-any.whl

Download URL wakeprint-0.14.0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b686d3798363d1ebbb95290e1e54201313907fab51dceb8ca8ff83b7b95ce63c
BLAKE2b-256 checksum
How to use checksums
d512c9fbfee51bf20f5b50844346d5be5d78c872fc26fc61f0de12d3039582e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for wakeprint 0.14.0

Provenance

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wakeprint-0.14.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.14.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page