Skip to main content

GRAFOMEM

The governed memory runtime for agents. Signed checkpoints, provable erasure, portable memory — a drop-in wrapper for your LangGraph checkpointer.

PyPI License: MIT CI Python

pip install grafomem langgraph-checkpoint-grafomem langgraph
from typing import TypedDict
from cryptography.hazmat.primitives.asymmetric import ed25519
from langgraph.graph import StateGraph, START, END
from langgraph.checkpoint.memory import MemorySaver
from grafomem_checkpoint import GrafomemSerializer, GrafomemCheckpointSaver

# ── the entire GRAFOMEM integration: an Ed25519 signing key, then wrap ANY
#    LangGraph checkpointer. Pass it to compile() as you already do. ──
priv = ed25519.Ed25519PrivateKey.generate()
saver = GrafomemCheckpointSaver(MemorySaver(serde=GrafomemSerializer(private_key=priv)))

# ── your ordinary LangGraph agent ──
class State(TypedDict):
    messages: list

def agent(state: State) -> State:
    return {"messages": state["messages"] + ["hello from the agent"]}

b = StateGraph(State); b.add_node("agent", agent)
b.add_edge(START, "agent"); b.add_edge("agent", END)
app = b.compile(checkpointer=saver)

cfg = {"configurable": {"thread_id": "user-42"}}
app.invoke({"messages": []}, cfg)

# signed, content-addressed checkpoint
tup = saver.get_tuple(cfg)
print("signed checkpoint hash:", tup.metadata["grafomem_content_hash"])

# cryptographic erasure receipt — proof the erasure transition occurred
saver.delete_thread("user-42")
print("erasure receipt:", saver.last_receipt("user-42"))
signed checkpoint hash: ecd0e28938738cc55b3c888f7449503fd586723a699e1d326d74cc0f154874f7
erasure receipt: LangGraphErasureReceipt(pre_state_hash='d9a16ef8…', post_state_hash='0e5751c0…',
                 scope='user-42', key_id='grafomem_checkpoint', timestamp='2026-…', signature=b'…')

(hashes and signature vary per run — each run generates a fresh key)

What just happened: every state transition your agent made was captured as a signed, content-addressed checkpoint — and when you deleted, you got a cryptographic receipt proving the erasure transition occurred. Memory your agents can move, merge, and prove they erased.

Why

Agent memory today is a JSON blob you have to trust. GRAFOMEM makes it evidence: every write signed, every fact content-addressed, every deletion receipted. When someone asks "what did your agent know, and when?" — you answer with proofs, not logs.

Two tiers, one system

  • Working memory — fast, bounded context state for the agent loop.
  • Durable facts (GMP) — governed, bi-temporal, signed facts with provenance. The GRAFOMEM Memory Protocol is an open spec with an executable conformance suite: a backend's capability counts as supported when it passes the test, not when the vendor says so.

→ Architecture overview

Integrations

  • LangGraph — the quickstart above. → docs
  • Claude / MCP — expose governed memory as MCP tools. → docs
  • Reference server — a REST + MCP server (grafomem[server] extra); a hosted instance runs live at api.grafomem.com. → self-hosting docs

The bigger picture: verify the agent, not just the answer

Governed memory is the evidence substrate for something larger: Capability-Grounded Reputation (CGR) — reputation an agent earns per domain from judgments that later resolve against real outcomes, with peer reviews weighted by the reviewer's own demonstrated calibration. Score and evidence mass travel together; fresh identities don't arrive with influence. The scoring model is documented and independently reproducible — cgr-bench reproduces its properties from source: cold-start and Sybil-resistance behavior asserted in CI, an early-warning signal of −0.997 against real credit-default outcomes at 25% resolution, and reviewer calibration that beats a naive equal-weight crowd by ~14% out-of-sample on ~1,900 real human forecasters (held-out reliability recovery r ≈ 0.5–0.65 across split designs). Reputation as evidence, not assertion. → CGR overview

License

Runtime: MIT. The GMP spec is open. → LICENSE


Docs: docs.grafomem.com · Hosted: cloud.grafomem.com (free tier: 10,000 governed decisions / mo) · Issues & discussions welcome.

Metadata

Release files for grafomem 0.4.2

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

Source distribution (sdist)

Source distribution for grafomem 0.4.2
File Size Uploaded Provenance Actions
grafomem-0.4.2.tar.gz 838.5 kB Without provenance Details for grafomem-0.4.2.tar.gz

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / grafomem-0.4.2.tar.gz

Download URL grafomem-0.4.2.tar.gz
Size 838.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a7228f6f4fa73bbbe8e81e152e8fe46d4718f9301dcacb2b6d150192299b970a
BLAKE2b-256 checksum
How to use checksums
a8b264eb610c1419f18e0d86f9bba19306376d4f63870d8ce361a32bb67a9067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / grafomem-0.4.2-py3-none-any.whl

Download URL grafomem-0.4.2-py3-none-any.whl
Size 709.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e7428f030aa3fb70c3e6467be0fae3be98ebd78128dc5a358cd8c1b53c897e2
BLAKE2b-256 checksum
How to use checksums
4b1fb65006cd42d8ad306e2d9771b347967984725c5a47d14acf58e0fcc4317e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for grafomem 0.4.2

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.

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