Skip to main content

langgraph-checkpoint-grafomem

A drop-in LangGraph checkpointer that wraps the saver you already use and adds two things:

  • every checkpoint is Ed25519-signed (tamper-evident — a modified checkpoint fails verification on load), and
  • delete_thread emits a signed erasure receipt, appended to an append-only, hash-chained log.

It's Fair Source — free to self-host and modify, your own signing keys, no cloud dependency.

pip install langgraph-checkpoint-grafomem

Usage

It wraps your existing saver; nothing else about how you build changes.

import sqlite3
from langgraph.checkpoint.sqlite import SqliteSaver
from grafomem_checkpoint import GrafomemSerializer, GrafomemCheckpointSaver

conn = sqlite3.connect("memory.db", check_same_thread=False)
inner = SqliteSaver(conn, serde=GrafomemSerializer(private_key, key_id=key_id, trusted_keys=trusted_keys))
saver = GrafomemCheckpointSaver(inner)
graph = builder.compile(checkpointer=saver)

# right to be forgotten, with proof:
saver.delete_thread("user-123")
receipt = saver.last_receipt("user-123")
assert receipt.verify(public_key)   # signed proof of the erasure transition
print(receipt.to_json())

The erasure receipt

On delete_thread, the receipt's signed before field is a SHA-256 digest of the thread's entire checkpoint history as it stood immediately before deletion — so it commits to the specific data that was erased, not merely to the fact that an erase happened. Anyone with the public key can verify it, no database access required.

The append-only erasure log

Every erasure is appended to a hash-chained ReceiptLog. Each entry links to the previous one by hash, so reordering or silently dropping an entry is detectable, and the signature inside each entry catches forgery. A thread that was never deleted simply has no entry — so an auditor can distinguish a real deletion from a delete_thread that was never called.

from grafomem_checkpoint import FileReceiptLog, verify_log

saver = GrafomemCheckpointSaver(inner, receipt_log=FileReceiptLog("receipts.jsonl"))
# ... delete some threads ...

entries = saver.audit_log()                 # all erasures, in append order, survives restart
ok, problems = verify_log(entries, {key_id: public_key})
assert ok, problems

The default log is a FileReceiptLog at grafomem_receipts.jsonl (override with the GRAFOMEM_RECEIPT_LOG env var, or pass your own ReceiptLog). The file is created on the first erasure. Pass InMemoryReceiptLog() to opt out of disk entirely.

What it proves — and what it doesn't

The receipt is tamper-evidence and non-repudiation for the erase transition, bound to a key and a timestamp, with the thread's pre-deletion content bound in. The honest statement is "we can prove this thread was erased on this date, bound to what was there, signed and independently verifiable."

It is not a claim of media-level unrecoverability. The inner store's WAL, freelist pages, dead tuples before VACUUM, replicas, snapshots and backups are outside this wrapper's control. Per-thread crypto-erasure — a per-thread encryption key destroyed on delete, with the receipt committing to that destruction so residual ciphertext becomes undecryptable — is the planned next step to cover those residual copies.

License

Apache-2.0. © Ulissy s.r.l. · grafomem.com

Metadata

Release files for langgraph-checkpoint-grafomem 1.1.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 langgraph-checkpoint-grafomem 1.1.0
File Size Uploaded Provenance Actions
langgraph_checkpoint_grafomem-1.1.0.tar.gz 12.1 kB Without provenance Details for langgraph_checkpoint_grafomem-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langgraph-checkpoint-grafomem 1.1.0
File Interpreter ABI Platform Actions
langgraph_checkpoint_grafomem-1.1.0-py3-none-any.whl Python 3 none any Details for langgraph_checkpoint_grafomem-1.1.0-py3-none-any.whl

Total release size: 21.6 kB

Release files / langgraph_checkpoint_grafomem-1.1.0.tar.gz

Download URL langgraph_checkpoint_grafomem-1.1.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0876bc228c373e8cae0e1198b9f236335081abcaa2c747cef7bf1570dfc8e0a6
BLAKE2b-256 checksum
How to use checksums
edd3fb114b07c633c63b61b9d13fc2f21d4d5558d40b9d7f1ec733f728c9e09b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / langgraph_checkpoint_grafomem-1.1.0-py3-none-any.whl

Download URL langgraph_checkpoint_grafomem-1.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffe9000222ec00ca12e96fff93cc29d45de2056198028f6f0631fc6ce43c5d82
BLAKE2b-256 checksum
How to use checksums
af5275e456d5b723c29b6511ccab5d705c1375172267b6918ea845c10663277b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for langgraph-checkpoint-grafomem 1.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

1.1.0 This release

2 release files No 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