GRAFOMEM CGR Capture

السجل الرسمي الذكاء الاصطناعي والوكلاء

Record agent judgments and their real outcomes on GRAFOMEM Cloud. Capture now, score later.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package grafomem-cgr
Claude Code
claude mcp add grafomem-cgr-capture -e 'GRAFOMEM_CGR_TENANT_KEY=<your grafomem_cgr_tenant_key>' -e 'GRAFOMEM_CGR_TENANT=<GRAFOMEM_CGR_TENANT>' -e 'GRAFOMEM_CGR_ROLE_KEYS_JSON=<GRAFOMEM_CGR_ROLE_KEYS_JSON>' -e 'GRAFOMEM_CGR_ROLE_KEYS=<GRAFOMEM_CGR_ROLE_KEYS>' -e 'GRAFOMEM_CGR_FORBIDDEN_TENANTS=<GRAFOMEM_CGR_FORBIDDEN_TENANTS>' -e 'GRAFOMEM_API=https://api.grafomem.com' -- uvx grafomem-cgr==0.1.0
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "grafomem-cgr-capture": {
            "command": "uvx",
            "args": [
                "grafomem-cgr==0.1.0"
            ],
            "env": {
                "GRAFOMEM_CGR_TENANT_KEY": "<your grafomem_cgr_tenant_key>",
                "GRAFOMEM_CGR_TENANT": "<GRAFOMEM_CGR_TENANT>",
                "GRAFOMEM_CGR_ROLE_KEYS_JSON": "<GRAFOMEM_CGR_ROLE_KEYS_JSON>",
                "GRAFOMEM_CGR_ROLE_KEYS": "<GRAFOMEM_CGR_ROLE_KEYS>",
                "GRAFOMEM_CGR_FORBIDDEN_TENANTS": "<GRAFOMEM_CGR_FORBIDDEN_TENANTS>",
                "GRAFOMEM_API": "https://api.grafomem.com"
            }
        }
    }
}

متغيرات البيئة

  • GRAFOMEM_CGR_TENANT_KEY إلزامي سري Your GRAFOMEM Cloud tenant API key (X-API-Key). Needs decisions:read for the durability guard.
  • GRAFOMEM_CGR_TENANT إلزامي The tenant id you expect that key to resolve to. If the key resolves to any other tenant, every write is refused.
  • GRAFOMEM_CGR_ROLE_KEYS_JSON Role handles to public agent_key (64-hex Ed25519), inline as JSON. Example: {"cc-builder@acme":"<64-hex>"}. Use this or GRAFOMEM_CGR_ROLE_KEYS.
  • GRAFOMEM_CGR_ROLE_KEYS Path to a JSON file with the same role-handle to public agent_key mapping. Use this or GRAFOMEM_CGR_ROLE_KEYS_JSON.
  • GRAFOMEM_CGR_FORBIDDEN_TENANTS Comma-separated tenant ids to always refuse, even if pinned by mistake. Put your production tenant here.
  • GRAFOMEM_API GRAFOMEM Cloud base URL. Defaults to https://api.grafomem.com.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. GRAFOMEM
  2. Why
  3. Two tiers, one system
  4. Integrations
  5. The bigger picture: verify the agent, not just the answer
  6. License

GRAFOMEM

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

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.

الأسئلة الشائعة

ما هو GRAFOMEM CGR Capture؟

Record agent judgments and their real outcomes on GRAFOMEM Cloud. Capture now, score later.

كيف أثبّت GRAFOMEM CGR Capture؟

يعمل على جهازك. في Claude Code: claude mcp add grafomem-cgr-capture -e 'GRAFOMEM_CGR_TENANT_KEY=<your grafomem_cgr_tenant_key>' -e 'GRAFOMEM_CGR_TENANT=<GRAFOMEM_CGR_TENANT>' -e 'GRAFOMEM_CGR_ROLE_KEYS_JSON=<GRAFOMEM_CGR_ROLE_KEYS_JSON>' -e 'GRAFOMEM_CGR_ROLE_KEYS=<GRAFOMEM_CGR_ROLE_KEYS>' -e 'GRAFOMEM_CGR_FORBIDDEN_TENANTS=<GRAFOMEM_CGR_FORBIDDEN_TENANTS>' -e 'GRAFOMEM_API=https://api.grafomem.com' -- uvx grafomem-cgr==0.1.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج GRAFOMEM CGR Capture إلى مفتاح API؟

نعم. يتطلب GRAFOMEM_CGR_TENANT_KEY, GRAFOMEM_CGR_TENANT، وتضبطها في إعداداته.

هل GRAFOMEM CGR Capture مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون GRAFOMEM CGR Capture؟

ينشره GNS-Foundation. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.