Open spec · v0.1 draft

Open Memory Protocol

The open wire-level contract for AI memory. Five verbs, one mesh. Switch editors, keep your memory.

Why a protocol

Memory is the wrong thing to ship per-vendor.

Every AI tool ships its own memory. CLAUDE.md for Claude Code. .cursorrules for Cursor. A separate scratchpad in Windsurf. Three editors open, three memories, zero shared context. Switch tools and your project starts over.

That's a wire-protocol problem, not a feature problem. The fix is the same one HTTP, SMTP, and IMAP applied to their domains decades ago: separate the data from the client. One open spec everyone implements; many tools, one memory.

OMP is that spec. Five verbs, a provenance schema, latency targets, a federation contract, and an error envelope — enough for any client to read and write any conforming store. Small enough to implement in a few hundred lines of any language. Local-first by default, federated by design.

The contract

Five verbs. That's the whole surface.

Every conforming implementation must expose exactly these. The same way HTTP must expose GET/POST/PUT/DELETE — the discipline of a small surface is what makes interop work.

recall

§4.1
recall(query, budget_tokens) → subgraph

Return a budget-bounded subgraph of concepts relevant to a query. Hybrid: BM25 + vector + graph expansion + cross-encoder rerank.

remember

§4.2
remember(name, kind, source) → Concept

Idempotent on (name, kind, source). Re-calling refreshes confirmation timestamp + merges metadata. Never duplicates.

link

§4.3
link(from, to, kind) → Edge

Typed relationship between concepts. 15 edge kinds (supersedes, depends_on, calls, part_of, same_as, …) for structural and code-graph semantics.

observe

§4.4
observe(kind, payload) → Event

Append-only perception stream. Fire-and-forget. Feeds consolidation, calibration, and the learning loop.

validate

§4.5
validate(intent) → {allow | step_up | deny}

The load-bearing safety verb. Memory becomes runtime enforcement — high-confidence constraints can block tool calls before they fire.

+ MAY do more

§4

Implementations MAY add their own surface (consolidation, code-bundles, task management, skill validation). They MUST do these five. Conformance is non-negotiable for those.

The principles

Six things OMP refuses to compromise on.

Vendor-neutral

CC BY 4.0 spec, Apache 2.0 reference implementation. Anyone can build a conforming server — switch tools, keep your memory.

Local-first

No phone-home, no cloud dependency. Implementations MUST persist on the user's machine by default; cloud-only operation is a separate product, not the spec.

Provenance everywhere

Every node carries source, confidence, created_at, last_confirmed_at, verification. Memory you can audit, decay you can measure, claims you can re-check.

Latency targets in the spec

recall p99 < 50ms · validate p99 < 20ms · observe p99 < 5ms. Memory is on every hot path — the spec sets ceilings so it doesn't get in the way.

Federation built in

Intra-implementation federation (one node, many sources) ships in v0.1. Inter-implementation federation (one personal memory node querying a teammate's) lands in v0.2.

Five verbs, one contract

recall, remember, link, observe, validate. Implementations MAY do more — they MUST do these five. The size of the surface is a feature.

Who implements OMP

Anyone building memory into AI.

OMP is for builders. Once your tool speaks OMP, every other OMP-compliant tool plays nicely with it.

AI coding tools

Claude Code, Cursor, Windsurf, Cline, Aider. Wire memex (the reference impl) once via MCP, then your users have persistent memory across editors.

Agent frameworks

LangChain, LlamaIndex, AutoGen, CrewAI. Replace ad-hoc memory layers with an OMP-compliant store; agents share memory with the user's coding tools.

IDE plugins

VS Code, JetBrains. Talk to an OMP server over HTTP; surface decisions, constraints, and prior context inline in the editor.

Custom AI products

Building your own agent? Adopt OMP from day one. Switch backends (Kuzu → DuckDB → Postgres) without rewriting the agent.

How OMP relates to

The neighborhood.

OMP sits underneath MCP, replaces ad-hoc RAG, and gives vector DBs a contract above the raw embedding store.

MCP (Model Context Protocol)

Same goal: Open spec for AI tool integration

Different scope: MCP standardizes tool invocation. OMP standardizes the memory layer beneath tools. Designed to compose — an OMP server can expose itself as an MCP server, and OMP's reference impl re-exports upstream MCP tools.

RAG libraries (LangChain, LlamaIndex)

Same goal: Retrieval-augmented context for LLMs

Different scope: RAG libs are implementation patterns inside an app. OMP is a wire-level contract between apps. Your RAG store implements OMP; every editor and agent reads from it.

Vector DBs (Pinecone, Qdrant, Weaviate)

Same goal: Store + retrieve embeddings

Different scope: A vector DB is one tier of an OMP implementation. OMP additionally specifies typed concepts, edges, provenance, lifecycle, validation, and a five-verb wire format — the things missing from a bare vector store.

CLAUDE.md / .cursorrules

Same goal: Project context for AI tools

Different scope: CLAUDE.md is per-tool, per-repo, manual to maintain, loads every turn regardless of relevance. OMP is one store, all tools, auto-loaded contextually via recall — pays for itself in tokens.

Reference implementation

memex implements OMP v0.1 end-to-end.

Apache 2.0. Local-first. DuckDB single-file storage, hybrid BM25 + vector retrieval, opt-in LLM hook, MCP gateway, cross-platform desktop app. Run it today.

bash

Concept kinds

21

Edge kinds

15

Verbs (MUST)

5

Build your own

Implementations are welcome.

The spec is small enough to implement in any language in a few hundred lines. Run the omp-conformance test suite against your server; pass all sections, claim conformance. List your implementation on this page.

PythonGoRustTypeScriptRubyany language

Get started

Five verbs. One mesh. Your memory.

Read the spec, run the reference implementation, or build your own. The protocol is the product.

The OMP specification is CC BY 4.0 — you may reproduce, translate, embed, and republish it, provided you attribute Quefly Enterprises LLP (LLPIN ACX-1059) and preserve the license notice. The reference implementation, memex, is Apache 2.0 with an explicit patent grant.

Edited by Quefly Enterprises LLP · LLPIN ACX-1059 · OMP draft v0.1 · 2026