Skip to main content
Memory GrainMemory Grain
GitHub

About

What is the Open Memory Specification?

The Open Memory Specification (OMS) is a standards-track open standard for interoperable, auditable, and portable agent memory. OMS defines the Memory Grain (.mg) container — the binary wire format for immutable, content-addressed knowledge units.

OMS at a Glance

OMS is structured as a family of three specifications: the Memory Grain (.mg) container definition (OMS), the Context Assembly Language (CAL) for querying grain stores, and the Semantic Markup Language (SML) for LLM-consumable context rendering. All parts share the same design principles and licensing.

The Problem

Autonomous systems — AI agents, robots, self-driving cars, IoT networks — need persistent memory. Today, each system invents its own ad-hoc storage: JSON blobs, SQLite tables, vector database records. None of these are portable, verifiable, or compliance-ready by design.

If a robot learns that a dock is temporarily closed, how does it prove that fact wasn't tampered with? If a fleet needs to share knowledge between 50 robots, how does it deduplicate identical observations? If a healthcare AI processes patient data, how does it guarantee HIPAA-compliant erasure?

There was no universal answer — until .mg.

The Solution

OMS applies the same insight that made Git revolutionary: content addressing. The SHA-256 hash of a memory grain is its unique identifier. Any change produces a different hash. Identical content across any system produces the same hash.

This gives you integrity, deduplication, and portability for free — without any central registry or authority.

Design Principles

  1. References, not blobs — Multi-modal content is referenced by URI, never embedded
  2. Additive evolution — New fields never break old implementations
  3. Compliance by design — GDPR, HIPAA, and CCPA primitives are in the wire format
  4. Sign without PKI — W3C DIDs enable verification without certificate authorities
  5. One file, full memory — A .mg container is the portable unit for full knowledge export

The .mg Container Definition

OMS v1.5 spans 28 sections and 7 appendices covering blob layout, canonical serialization, content addressing, field compaction, twelve grain types, cryptographic signing (COSE Sign1), selective disclosure, the .mg file format, identity (W3C DIDs), sensitivity classification, provenance, temporal modeling, conformance levels, device profiles, grain protection, observer type registry, query conventions, domain profile extensions (healthcare, legal, finance, robotics, science, consumer, integration), and security considerations.

Read the OMS specification →

Companion Specifications

CAL (Context Assembly Language) v1.2 is a non-destructive, deterministic query language for assembling agent context from OMS memory stores. CAL cannot delete data — this is enforced at the grammar level, which is also what makes every Recommendation proposal invertible. It covers safety model, type system, multi-format output, streaming, compliance, and 6 appendices across 27 sections.

Read the CAL specification →

SML (Semantic Markup Language) v1.1 is a flat, tag-based markup format optimized for LLM context consumption. Tag names map directly to OMS grain types, so LLMs understand the epistemic status of each piece of context without parsing schemas. SML is the default output format for CAL ASSEMBLE statements.

Read the SML specification →

License

The specification is published under CC0 1.0 Universal (Public Domain Dedication) — waiving all copyright and related rights worldwide. Anyone can copy, modify, distribute, and build on the specification for any purpose, without permission or attribution.

Version History

VersionDateChanges
1.02026-02-19Initial publication — 9-byte fixed header, canonical serialization, content addressing, seven memory types (Fact, Episode, Checkpoint, Workflow, ToolCall, Observation, Goal), COSE signing, selective disclosure, .mg container files, W3C DIDs, sensitivity bits, provenance, temporal modeling, conformance levels, device profiles
1.12026-02-20Generalized Observer model — renamed sensor_id→observer_id (oid), sensor_type→observer_type (otype); four new Observation fields; Observer Type Registry (§24); Observation Mode (§25) and Scope (§26) registries
1.22026-02-23Ten grain types — type renames (Fact→Belief, Episode→Event, Checkpoint→State, ToolCall→Action); three new types (Reasoning 0x08, Consensus 0x09, Consent 0x0A); Immutability Boundary; mg: relation vocabulary (21 relations); Domain Profile Extensions (Appendix A–G); Action phase model; Query Conventions (§28); HIPAA PHI tag normalization; Goal delegation scope fields; retention_policy; recall_priority; hold and consent_cascade invalidation modes
1.32026-03-03Integration Domain Profile (int: namespace, Appendix A.7) with 25 action/trigger fields; Action output_schema field (JSON Schema draft-07); Trigger Definitions via Observation Grains (§27.6); Consensus Grain for Action Definition Validation (§27.7); 25 new compact keys; 5 compact key collision fixes; CAL v1.0 and SML v1.0 bundled as companion specifications
1.42026-06-13Eleven grain types — breaking type renames (Belief→Fact 0x01, Action→Tool 0x05; byte values and content addresses unchanged); new Skill type (0x0B, §8.11) promoting the former Skill Convention to a first-class type with definition and learned-competence fields; Workflow redesigned as a directed graph (nodes, edges, bindings, retries) replacing the flat steps array; mg:requires_steps renamed mg:has_graph; embedding_text common field for retrieval; §6.12 Skill compaction table; CAL 1.1 (multi-format output, workflow graph syntax, BECAUSE alias, pipeline operators removed)
1.52026-08-03Twelve grain types — new Recommendation type (0x0C, §8.12): a governed, auditable proposal to change memory or agent configuration, with a normative dedup_key construction, exactly one proposal form (proposal_cal / proposal_edit / proposal_data), and a propose → review → apply → roll-back lifecycle recorded as immutable audit Observation grains; rec_status added as a rebuildable index-layer field; applier obligations bind execution to the approving principal's capability; §6.13 Recommendation compaction table; CAL 1.2 (recommendation queries, ELEMENT template shorthand, two 1.1 errata); SML 1.1 (<recommendation> element)

Contributing

The specification is open source. We're actively looking for contributors — whether you want to build implementations, write test vectors, review the spec, or bring compliance expertise.

  • Implementations — Python (reference), Go, Rust, JavaScript, Java, C#
  • Test vectors — Edge case coverage, new memory types
  • Standards review — IETF/W3C experience welcome
  • Compliance expertise — GDPR, HIPAA, CCPA, SOX

github.com/openmemoryspec/oms →

Backed by Areev

memorygrain.org and the Open Memory Specification are backed by areev.ai — the reference implementation of OMS. Areev is built by MindGryd Software Private Limited.

AI Discoverability

This site is designed to be discoverable by AI search engines. We provide:

  • llms.txt — Site index for LLM crawlers
  • llms-full.txt — Full specification in plain text
  • sitemap.xml — All pages and blog posts
  • JSON-LD structured data on every page