Skip to main content

Mnestiq

A flight recorder for AI agents. Tamper-evident, signed evidence of what an agent saw, decided and did, built for incident response.

Mnestiq records every model call, tool call, approval and outbound connection an agent makes, and tags each piece of model input with its origin: the user, a web page, tool output or another agent. Records are hash-chained and sealed with signed checkpoints. When an incident occurs, investigators can identify the run, the step and the input that drove it, and demonstrate that the record has not been altered since.

Install

pip install "mnestiq[anthropic]"     # or mnestiq[openai], or plain mnestiq

Optional extras:

Extra Adds
azure Signing with keys held in Azure Key Vault or Managed HSM
timestamps RFC 3161 timestamps from public timestamp authorities, and their verification

Quick start

import anthropic
from mnestiq import FileSink, Recorder
from mnestiq.egress import instrument_egress
from mnestiq.integrations.anthropic import instrument_anthropic
from mnestiq.keys import load_private_key

recorder = Recorder(FileSink("evidence.jsonl"), agent_id="support-bot",
                    signing_key=load_private_key("keys/signing.key"))
client = instrument_anthropic(anthropic.Anthropic(), recorder)
instrument_egress()

with recorder.run():
    ...  # your agent, unchanged

recorder.close()
mnestiq keygen --out keys
mnestiq verify evidence.jsonl --trusted-key keys/signing.pub
mnestiq dashboard . --trusted-key keys/signing.pub

Production signing

A key file readable by the agent is suitable for evaluation only. In production, keep the signing key out of the agent's reach, so that a compromised agent cannot copy it or re-sign earlier evidence:

from mnestiq import AzureKeyVaultSigner, FileSink, Recorder, SignerClient, Timestamper

# Azure Key Vault: the key never leaves the vault; only a SHA-256 digest is sent.
signer = AzureKeyVaultSigner("https://<vault>.vault.azure.net/keys/<name>/<version>")

# Or a local signing service running under a separate account (`mnestiq signer serve`).
signer = SignerClient.from_env()

recorder = Recorder(FileSink("evidence.jsonl"), agent_id="support-bot", signer=signer,
                    timestamper=Timestamper(),       # independent RFC 3161 timestamps
                    checkpoint_interval=300)         # signed heartbeat when idle

Keys are rotated with a signed hand-over (recorder.rotate_signer(new_signer)), which the verifier follows. See the signing guide.

Security model

Evidence is tamper-evident after it is written: edits, insertions, reordering and re-signing with another key are detected. Records cut from the end are detected against a head kept elsewhere (a HeadFile or the Evidence Vault), and backdating against RFC 3161 timestamps. It cannot prove that a compromised agent told the truth at the time of writing. The threat model lists each attack considered, how it is detected, and the automated test that demonstrates it. Independent reviewers are invited to try the break-it challenge.

Licensed under Apache-2.0.

Metadata

Release files for mnestiq 0.5.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 mnestiq 0.5.0
File Size Uploaded Provenance Actions
mnestiq-0.5.0.tar.gz 174.5 kB With provenance Details for mnestiq-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 296.1 kB

Release files / mnestiq-0.5.0.tar.gz

Download URL mnestiq-0.5.0.tar.gz
Size 174.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c4a1369ff81af589409ddc762d97319a7c037c3658d786d146758ef5919c9045
BLAKE2b-256 checksum
How to use checksums
82e394b45f68d80cf034700980fdda84c4e549c95bc48bff116c55cec7f6e01e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

Release files / mnestiq-0.5.0-py3-none-any.whl

Download URL mnestiq-0.5.0-py3-none-any.whl
Size 121.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b01c7f49017164b1f9b42b88a1c96f6b9fd618723178477d811ce2a9add7b472
BLAKE2b-256 checksum
How to use checksums
254a329180a0ec42f19bc8a0243f37207d3d52d1daf9134b97ec527962f25f7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 17, 2026.

Transparency log

Security for mnestiq 0.5.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mnestiq-0.5.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 17, 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.

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