All types returned by the OMP Python SDK are Pydantic v2 models. You can import them directly from the top-levelDocumentation Index
Fetch the complete documentation index at: https://docs.openmem.blog/llms.txt
Use this file to discover all available pages before exploring further.
openmem package for use in type hints, serialization, or validation. The models mirror the schemas defined in the OMP OpenAPI spec and are the single source of truth for all field names and types.
All models extend a shared base that sets
extra="allow". Unknown fields from future spec versions and provider-specific x-<provider> extension fields are preserved on the model instance without raising a validation error.MemoryRecord
MemoryRecord is the alias for openmem.types.Memory. It is returned by add(), get(), update(), and in paginated lists from list().
Provider-assigned unique identifier for this memory, e.g.
"mem_abc123".The text content of the memory.
The user this memory belongs to.
ISO 8601 timestamp of when the memory was created.
Slash-delimited namespace, e.g.
"coding/preferences". None if not set.Free-form labels associated with this memory.
Origin information. See MemorySource.
Confidence score between
0 and 1. Higher values indicate greater certainty.Datetime at which this memory becomes valid.
None means immediately.Datetime at which this memory expires.
None means no expiry.IDs of memories that this memory replaces.
The model used to generate the memory’s embedding, e.g.
"text-embedding-3-small". Set by the provider.ISO 8601 timestamp of the last update to this memory.
Ingestion status. Relevant for async-ingestion providers (mem0, supermemory) where memories may be queued before being searchable.
None on providers with synchronous ingestion.MemorySource
Describes the origin of a memory. All fields are optional.Name of the application that created the memory, e.g.
"cursor" or "chatbot".How the memory was created:
"extracted"— inferred from a conversation or document"explicit"— provided directly by the user"imported"— migrated from another system
An opaque pointer back to the source artifact, such as a session ID or document ID.
SearchResult
Returned as an element in the list fromsearch().
The matched memory record.
Cosine similarity score between
0 and 1. Higher values indicate greater similarity to the query.MemoryPage
Returned bylist(). Carries a page of records and a cursor for continuation.
The memories in this page.
An opaque pagination cursor. Pass this as
cursor= to the next list() call to retrieve the following page. None means you have reached the last page.ContextBlock
Returned bycontext(). Contains a ranked text string ready to inject directly into an LLM prompt.
Pre-ranked text assembled from the most relevant memories, formatted for direct inclusion in a system or user prompt.
A list of citation objects, each with:
memory_id(string) — the ID of the source memoryscore(float) — its relevance score
The approximate token count of
text, if the provider reports it. None when not available.Capabilities
Returned bycapabilities(). Describes what the provider supports so your application can degrade gracefully.
The OMP specification version this provider implements, e.g.
"0.1".The provider’s own identifier string, e.g.
"postgres" or "mem0".List of supported verb names:
add, search, get, update, delete, list, context, audit.Feature flags. See CapabilityFeatures.
Rate and size limits. See CapabilityLimits.
CapabilityFeatures
Nested insideCapabilities.features.
Whether the provider supports semantic (vector) search.
Whether the provider supports keyword (BM25 / full-text) search.
Whether the provider supports graph-based queries.
Whether the provider supports time-range filtering.
How the provider implements scopes:
"native"— first-class scope support"tags"— scopes emulated via tags"none"— no scope support
Maximum number of characters allowed in
content. None means no declared limit.Whether the provider supports end-to-end encryption.
Whether the provider supports the
audit() verb.Whether the provider supports the
supersedes field on memories.CapabilityLimits
Nested insideCapabilities.limits. None when the provider does not declare limits.
Maximum number of API calls allowed per minute.
None means not declared.Maximum value accepted for the
limit parameter on search(). None means not declared.AuditEntry
Each element in the list returned byaudit().
When the operation occurred.
The app that performed the operation.
The OMP verb that was invoked.
The ID of the memory involved, if applicable.
The scope active at the time of the operation.
The provider-assigned request ID for tracing.
Extension fields
Every model usesextra="allow", which means provider-specific x-<provider> fields are silently preserved when the SDK receives them from the provider. For example, a memory returned by the mem0 adapter may include an x-mem0 key with graph metadata; that field round-trips transparently on the MemoryRecord instance without breaking validation.