Every piece of information that OMP stores is called a memory — a single, self-contained record representing one fact, preference, event, or document chunk about a user. Understanding the memory schema is the foundation for working effectively with any OMP provider.Documentation Index
Fetch the complete documentation index at: https://docs.openmem.blog/llms.txt
Use this file to discover all available pages before exploring further.
What is a memory?
A memory is the atomic unit of remembered information in OMP. It is always scoped to a specific user (user_id), optionally grouped into a hierarchical namespace (scope), and identified by a provider-assigned id. Because OMP is provider-agnostic, the same schema works whether the backing store is Postgres, Mem0, Supermemory, or any other OMP-compatible backend.
Memory schema
The full JSON representation of a memory looks like this:Field reference
| Field | Type | Description |
|---|---|---|
id | string | Provider-assigned unique identifier. Never set this yourself — the provider returns it after add(). |
content | string | The actual remembered information. Free-form text. Required. |
user_id | string | Identifies which user this memory belongs to. Required. |
scope | string | Slash-delimited namespace, e.g. coding/preferences. Groups related memories. |
tags | string[] | Free-form labels for additional filtering, e.g. ["tooling", "nodejs"]. |
source.app | string | The application that created this memory. |
source.type | string | How the memory was created: extracted (inferred from conversation), explicit (user stated it directly), or imported (migrated from another system). |
source.ref | string | An opaque back-pointer to the originating session, document, or event. |
confidence | float | Provider’s estimated accuracy, expressed as a value from 0.0 to 1.0. |
valid_from | ISO 8601 | The earliest timestamp at which this memory is considered current. |
valid_to | ISO 8601 | The expiry timestamp. null means the memory has no expiry. |
supersedes | string[] | IDs of older memories that this record replaces. Used to chain updates without hard-deleting history. |
embedding_model | string | The embedding model used to index the content for vector search. |
created_at | datetime | When the record was first stored. Required. |
updated_at | datetime | When the record was last modified. |
status | string | For providers that ingest asynchronously: queued, indexing, done, or failed. Synchronous providers return done immediately or omit this field. |
Required fields:
id, content, user_id, and created_at are the only fields a provider must return. All other fields are optional but normalized when present.Extension fields
OMP supports provider-specific data viax-<provider>-prefixed extension fields. Providers use these to expose proprietary metadata — such as graph node IDs or internal embedding versions — without breaking OMP compliance.
- Extension fields must use the
x-<provider>prefix (e.g.x-mem0,x-supermemory). - They must not override or conflict with standard field semantics.
- Any application that does not recognize an extension field must ignore it — forward-compatibility is required.
- Extensions must not be required for an OMP-compliant client to read or use the memory.
Memory lifecycle
A memory follows a straightforward lifecycle from creation to eventual removal:Add
Call
mem.add() with at minimum content and user_id. The provider assigns an id and returns the stored record. Async providers may return status: "queued" while indexing is pending.Search or list
Retrieve memories with
mem.search() for semantic queries or mem.list() for filtered enumeration. Both support scope filtering to narrow results to a specific namespace.Update or supersede
Call
mem.update() to modify a memory in place. Pass supersedes=[old_id] on a new mem.add() call to create a replacement record while preserving the history chain.Code example
Here is a completeadd() call using multiple optional fields:
source as a plain dictionary — the SDK converts it automatically: