Tutorial · 5 min

Certify your backend in 5 minutes.

One install. One command. A signed, Ed25519-verified conformance report that proves what your agent-memory backend actually does.

GNS-Foundation 5 min tutorial

GMP (GRAFOMEM Memory Protocol) defines 10 capabilities for agent memory. The conformance suite tests each one with deterministic traces — not self-reported claims, but measured behavior. Here's how to run it on your backend.

Prerequisites: Python 3.9+ and pip. That's it.
1

Install GRAFOMEM

pip install grafomem

This installs the grafomem CLI, the GMP conformance suite, and the reference backends (in-memory + SQLite).

2

Verify with the reference backend

Before testing your own backend, confirm the suite works by running it against the reference implementation:

python -m aml.backends.gmp_reference

This stands up the in-memory reference backend and runs the full conformance suite against it. You should see:

✓ AUDIT ...................... PASS
✓ SUPERSESSION_CHAIN ......... PASS
✓ BI_TEMPORAL ................ PASS
✓ HARD_DELETE ................ PASS
✓ MULTI_TENANT ............... PASS
✓ PROVENANCE ................. PASS
✓ CRYPTOGRAPHIC_PROVENANCE ... PASS
✓ CONFLICT_DETECTION ......... PASS
✓ CROSS_SESSION_PROPAGATION .. PASS
✓ CONCURRENCY_CONTROL ........ PASS

M8 conformance rate: 1.000 (10/10 declared → 10/10 passed)
✓ If you see M8 = 1.000, the suite is working correctly. You're ready to test your own backend.
3

Implement the MemoryBackend protocol

Your backend needs to implement the MemoryBackend protocol. Here's the minimum interface:

from aml.interface import MemoryBackend, Capability

class YourStore(MemoryBackend):
    def declared_capabilities(self) -> set[Capability]:
        return {
            Capability.AUDIT,
            Capability.HARD_DELETE,
            Capability.MULTI_TENANT,
            # ... declare only what you actually implement
        }

    def write(self, content, options=None):
        # Store a memory
        ...

    def retrieve(self, query, options=None):
        # Retrieve relevant memories
        ...

    def delete(self, fact_id):
        # Hard-delete a memory (if declaring HARD_DELETE)
        ...
Key rule: Only declare capabilities you actually implement. The suite tests declared capabilities — if you declare HARD_DELETE but soft-delete, it will catch it (Finding F10).
4

Run the conformance suite

Point the suite at your backend with a single command:

grafomem conformance \
  -b your_module:YourStore \
  -o report.json

The suite will:

  1. Read your declared_capabilities()
  2. Run the trace-based tests for each declared capability
  3. Measure behavior from both sides (leakage + over-restriction)
  4. Generate a signed conformance report
Expect failures. The suite is designed to catch real issues — deletion leakage, tenant cross-contamination, isolation level mismatches. If you fail, the report tells you exactly which test and why.
5

Read your report

The output report.json contains:

{
  "backend": "your_module:YourStore",
  "gmp_version": "0.2.0",
  "m8_rate": 1.000,
  "declared": ["AUDIT", "HARD_DELETE", "MULTI_TENANT"],
  "passed": ["AUDIT", "HARD_DELETE", "MULTI_TENANT"],
  "failed": [],
  "signature": "ed25519:...",
  "corpus_hash": "f049820b...b077ca6"
}

M8 = 1.000 means every declared capability actually passed. The Ed25519 signature makes the report tamper-evident — anyone can verify it was produced by the official suite.


What's next?

# Markdown
[![GMP Certified](https://img.shields.io/badge/GMP-Certified-00c853?style=flat-square)](https://grafomem.com/registry.html)
[![M8 1.000](https://img.shields.io/badge/M8-1.000-00c853?style=flat-square)](https://grafomem.com/registry.html)
  • Or skip the ops — use GRAFOMEM Cloud and get M8 = 1.000 out of the box

Full API reference and backend implementation guide at docs.grafomem.com. The spec is at grafomem.com/spec.

Want the signed, listed certification?

Already ran the suite? Submit your report and we'll verify it, sign it, and list your backend in the public registry. Free for open source.

Request sent!

We'll reply within 24 hours.
In the meantime, pip install grafomem and run a self-certification today.

The suite is open source — you can self-certify right now without us. This is for the signed, listed certification.