Skip to main content
Memory GrainMemory Grain
GitHub

In Practice

Any AI agent. One memory. Portable everywhere.

Imagine grains written by different AI systems — and read by others across industries, without any prior arrangement.

Slide 1 of 10: Belief grain by FitCoach
Written by
FitCoach
KineticAI

Learned from three months of workout data. Nutrition and scheduling agents use this grain to personalize recovery plans.

Belief · 0x01v1 · COSE Signed
{
  "type": "belief",
  "subject": "user:john-smith",
  "relation": "preferred_activity",
  "object": "morning_run_5k",
  "confidence": 0.94,
  "source_type": "pattern",
  "created_at": 1739980800000,
  "namespace": "fitness:preferences"
}
Read by
FoodBot
meal planning
CalendarBot
schedule optimization
FitCoach
training progression

Built for Enterprise

Trust at every layer.

Immutable by Design

Every grain is SHA-256 content-addressed. Once written, it cannot be altered — only superseded. Tamper evidence is built into the format.

Portable Everywhere

A .mg file is a self-contained container. Store it in S3, stream it through Kafka, carry it on a drive, or push it to Git. No vendor lock-in.

Audit-Ready

COSE Sign1 signatures, DID-scoped consent, and jurisdiction-aware retention. Built for GDPR, HIPAA, and SOX compliance from day one.

Conformance

Implement what you need

Declare your conformance level. Start minimal, add layers as requirements grow.

Level 1

Minimal Reader

Libraries, tools, verification scripts

  • Deserialize and verify grain blobs
  • Compute & verify SHA-256 content addresses
  • Field compaction (short keys ↔ full names)
  • All ten grain types (0x01–0x0A)
  • Ignore unknown fields
  • Constant-time hash comparison
Level 2

Full Implementation

Agent frameworks, edge gateways

  • All Level 1 requirements
  • Serialize (canonical MessagePack)
  • Validate required fields per schema
  • Pass all test vectors
  • Multi-modal content references
  • Store protocol (get/put/delete/list)
  • Enforce invalidation_policy on supersession & contradiction
  • Atomic supersede operation (distinct from raw put)
  • Validate observer_type non-empty; emit oid/otype (v1.1)
Level 3

Production Store

Enterprise deployments, cloud platforms

  • All Level 2 requirements
  • Persistent backend (filesystem, S3, DB)
  • AES-256-GCM per-grain encryption
  • HKDF per-user key derivation
  • Blind-index tokens for encrypted search
  • SPO/POS/OSP index (hexastore) or equivalent
  • Full-text search (FTS5 or equivalent)
  • Hash-chained audit trail
  • Crash recovery and reconciliation
  • Policy engine with compliance presets
  • Partition Observation storage by observer domain (v1.1)

Implement OMS today.

The specification is open and licensed under OWF Final. Read the spec, run the test vectors, and build interoperable agent memory in any language.

Read the SpecificationView on GitHub

OMS v1.3 · .mg Container Definition · Standards Track · OWF Final