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.3.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.3.0
File Size Uploaded Provenance Actions
mnestiq-0.3.0.tar.gz 141.8 kB With provenance Details for mnestiq-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 239.4 kB

Release files / mnestiq-0.3.0.tar.gz

Download URL mnestiq-0.3.0.tar.gz
Size 141.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c920955e2a3a0744b9537d32b06f6b34e9757f60104ae1c6e07fceb9559e9a27
BLAKE2b-256 checksum
How to use checksums
69cb87adc673fae383b4524780a2da956313fefb98794ce31cece40730cced45
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 9, 2026.

Transparency log

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

Download URL mnestiq-0.3.0-py3-none-any.whl
Size 97.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa549f957b60630c09ef8c5b6089a5fe37a9b359b3a2e056b89980477b26b0e4
BLAKE2b-256 checksum
How to use checksums
2a55a542cae64e52d63b13b63d86e04942873b233c941d02ad344bf85e377205
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 9, 2026.

Transparency log

Security for mnestiq 0.3.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.3.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 9, 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