Metadata-Version: 2.4
Name: langgraph-checkpoint-grafomem
Version: 1.0.1
Summary: Grafomem (Fair Source) adapter for LangGraph Checkpointers
Author-email: "Ulissy s.r.l." <hello@grafomem.com>
License: Apache-2.0
Project-URL: Homepage, https://grafomem.com
Project-URL: Repository, https://github.com/cayerbe/grafomem
Keywords: agent-memory,langgraph,checkpointer,governance,erasure,fair-source
Description-Content-Type: text/markdown
Requires-Dist: langgraph-checkpoint
Requires-Dist: grafomem[runtime]>=0.4.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: langgraph; extra == "dev"

# langgraph-checkpoint-grafomem

**Signed checkpoints and provable thread erasure for LangGraph.**

A drop-in [LangGraph](https://github.com/langchain-ai/langgraph) checkpointer that wraps the saver you
already use and adds two things standard checkpointers can't give you:

- **Signed checkpoints** — every persisted checkpoint is Ed25519-signed and tamper-evident.
- **Verifiable erasure** — `delete_thread()` produces a **signed state-transition receipt**: cryptographic
  proof that a user's thread was erased, bound to a key and a timestamp. The receipt for
  right-to-be-forgotten you can hand an auditor.

## Install

```bash
pip install langgraph-checkpoint-grafomem
```

## Quickstart

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

# your own signing identity — self-hosted keys, no cloud
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)   # persist as usual

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

The receipt cryptographically binds the **hash of the entire thread's checkpoint history before deletion**
to the empty state after it — so it commits to the specific data that was erased, not a placeholder.

## What the receipt proves (and what it doesn't)

A **signed state-transition receipt** attests that the erasure *operation* occurred — the thread's state
was overwritten and the transition is bound to a key and a timestamp. It is **not** a claim of media
sanitization or information-theoretic unrecoverability. That precision is the point: an honest,
independently verifiable record of deletion, not an unprovable guarantee.

## Full example

A runnable reference agent (persist memory, `/recall`, `/forget` → verified receipt) lives at
**[grafomem-langgraph-example](https://github.com/GNS-Foundation/grafomem-langgraph-example)**.

## Licensing

This adapter is **Apache-2.0**. It depends on the **GRAFOMEM** runtime, which is **Fair Source
(FSL-1.1-Apache-2.0)** — self-host and modify freely; not "open source." See
[grafomem.com](https://grafomem.com).

---

*A project of Ulissy s.r.l. · the standard is stewarded by the GNS Foundation.*
