The documentation website for the Open Memory Specification (OMS) — an open standard for portable, auditable, and interoperable agent memory across autonomous systems.
Live site: memorygrain.org
The Open Memory Specification defines the Memory Grain (.mg) container — a binary wire format for immutable, content-addressed knowledge units produced and consumed by autonomous systems (AI agents, robots, autonomous vehicles, IoT networks).
Each memory grain is:
- Content-addressed — the SHA-256 hash of the complete blob bytes is the grain's unique identifier
- Immutable — any change produces a different hash
- Canonically serialized — MessagePack (default) or CBOR (RFC 8949)
- Optionally signed — COSE Sign1 (RFC 9052) with W3C DID identity
- Optionally encrypted — AES-256-GCM with per-user key derivation (HKDF-SHA256)
Every grain begins with a 9-byte fixed header:
Byte 0: Version (0x01)
Byte 1: Flags (signed|encrypted|compressed|has_content_refs|has_embedding_refs|cbor_encoding|sensitivity[2 bits])
Byte 2: Type (0x01–0x0A)
Bytes 3–4: Namespace hash (first 2 bytes of SHA-256(namespace), uint16 big-endian)
Bytes 5–8: Created-at (uint32 epoch seconds, big-endian)
Byte 9+: MessagePack or CBOR payload
| Type ID | Name | Description |
|---|---|---|
0x01 |
Belief | Structured knowledge claim — subject-relation-object with confidence |
0x02 |
Event | Timestamped interaction record (message, log entry, utterance) |
0x03 |
State | Agent state snapshot for save/restore |
0x04 |
Workflow | Procedural memory — learned action sequences with trigger |
0x05 |
Action | Tool invocation, code execution, or computer-use record |
0x06 |
Observation | Observer reading — physical sensors, AI agents, or humans |
0x07 |
Goal | Explicit objective with lifecycle semantics |
0x08 |
Reasoning | Inference chain and thought audit trail |
0x09 |
Consensus | Multi-agent agreement record |
0x0A |
Consent | Permission grant or withdrawal — DID-scoped, purpose-bounded |
| Level | Name | Key Requirements |
|---|---|---|
| 1 | Minimal Reader | Deserialize, hash verify, field compaction, ignore unknowns |
| 2 | Full Implementation | Level 1 + serialization, canonical enforcement, schema validation, test vector compliance |
| 3 | Production Store | Level 2 + persistent backend, AES-256-GCM encryption, per-user key derivation, hexastore indexes, full-text search |
| Profile | Max Blob Size | Target |
|---|---|---|
| Extended | 1 MB | Servers, edge |
| Standard | 32 KB | Mobile, IoT, SBC |
| Lightweight | 512 bytes | Microcontrollers |
This is a Next.js 15 static export site (output: 'export'). No API routes, no server-side runtime — everything is pre-rendered at build time.
| Route | Description |
|---|---|
/ |
Homepage — overview, use cases, memory types, conformance levels |
/spec/ |
Full OMS v1.3 specification with sidebar TOC |
/blog/ |
Technical blog with MDX posts |
/about/ |
About OMS, design principles, license, contributing |
- Blog posts — MDX files in
content/blog/, parsed withgray-matterand rendered withnext-mdx-remote/rsc+rehype-pretty-code - Specification — Markdown processed through
unified(remark → rehype → rehype-pretty-code → rehype-slug → stringify)
All styling uses inline styles + CSS custom properties (not Tailwind utility classes). Design tokens are defined in app/globals.css under :root / .dark. Dark mode is applied via the .dark class on <html>, managed by next-themes.
- Node.js (compatible with Next.js 15)
- npm
npm installnpm run devStarts the dev server with Turbopack. Auto-selects an available port if 3000 is busy.
npm run buildProduces a static export in /out and generates public/feed.xml (RSS 2.0).
To preview the build locally:
npx serve out
npm run startis not usable with static export.
npm run lintThe blog posts and homepage contain specific binary values (SHA-256 namespace hash bytes, timestamps, flags). To verify them:
pip install msgpack
python3 verify_hashes.py- Framework: Next.js 15 (static export)
- Language: TypeScript
- React: 19
- MDX:
next-mdx-remote+rehype-pretty-code+shiki - Markdown:
unified/remark/rehypepipeline - Fonts: Inter (sans-serif), JetBrains Mono (monospace) via Google Fonts
- Theme:
next-themes(light/dark) - Analytics: Google Analytics (optional, via
NEXT_PUBLIC_GA_ID)
| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_SITE_URL |
Canonical site URL | https://memorygrain.org |
NEXT_PUBLIC_GA_ID |
Google Analytics tracking ID | (none) |
- Specification: openmemoryspec/oms — the OMS v1.3 specification
- Website: AreevAI/memorygrain.org — this repository
- Specification: CC0 1.0 Universal (Public Domain Dedication)
- Website: CC0 1.0 Universal