In short.
Memory Expiration in Mem0 is a developer guide for keeping temporary facts out of AI memory searches, but expired records remain stored and retrievable. It documents expiration dates that remain valid through the specified UTC day, optional retrieval of expired records and removal of expiration dates. Client validation and response fields differ, and the page establishes neither minimum SDK versions nor costs. Runtime correctness and performance are not assessed.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage is the complete supplied documentation page at [https://docs.mem0.ai/platform/features/memory-expiration], including its examples, client tables and notices about retained storage, malformed dates, result counts and the OSS TypeScript response exception. Linked pages and repository code are excluded. No code was executed; runtime correctness, performance and compatibility with particular SDK releases remain unassessed.
The overview
Identity
This Mem0 feature guide documents memory expiration on Mem0 Platform and Open Source. Its scope is assigning a date to an individual memory and explaining how that date affects reads. The original page is [https://docs.mem0.ai/platform/features/memory-expiration].
Assessment
The guide is useful when a fact has a known final day of relevance and should then disappear from default retrieval while remaining recoverable. It provides concrete examples and explains consequential edge cases. Expiration alone is unsuitable when the requirement is automatic deletion or a cutoff at a particular hour.
Users
The examples suit developers building assistants that remember trial status, seasonal preferences or support-ticket context. Beginners get an explanation of why temporary facts become misleading; experienced developers get parameter names, validation rules, filtering behavior and response-field differences.
Capabilities
Developers can set expiration during add(), attach or change it through update(), and clear it to restore normal visibility. search() and get_all(), called getAll() in TypeScript, exclude expired memories by default. Setting show_expired to true, or showExpired in TypeScript, includes expired memories alongside unexpired ones. Fetching a memory by ID still returns it without this option.
Python and REST responses expose expiration_date as a top-level field. Platform TypeScript uses expirationDate. OSS TypeScript instead returns result.metadata.expiration_date on get() and getAll(), an important difference for shared application code.
Using it
Requirements
Platform examples initialize MemoryClient with an API key. Python imports MemoryClient or the OSS Memory class from mem0; JavaScript imports them from mem0ai and mem0ai/oss respectively. Minimum SDK versions, runtime versions, account-tier requirements and complete OSS infrastructure requirements are not specified.
Python accepts a YYYY-MM-DD string or a date or datetime object and normalizes it to a date string. TypeScript accepts only a valid YYYY-MM-DD string and rejects timestamps, alternate formats and impossible calendar dates. The self-hosted REST server accepts date strings and uses OSS Python normalization.
Mechanism
Expiration uses a calendar date without a time component or timezone offset. Mem0 evaluates it in UTC and includes the entire named day. A memory dated 2030-01-31 remains visible throughout that UTC day and becomes excluded on 2030-02-01. Memories without an expiration date do not expire by default.
Expiration filters read results while leaving the stored record intact. The page says expired candidates are removed before applying top_k, the requested result count, and the internal candidate pool is widened first. Searches can nevertheless return fewer results than requested when many memories have expired.
Setup
Pass expiration_date when calling add() or update() in Python, or expirationDate in JavaScript and TypeScript. To remove an existing cutoff, explicitly pass None in Python or null in TypeScript. The documented SDK behavior preserves that explicit clearing value rather than treating it as an omitted argument.
An update must supply at least one of text, metadata or the expiration field. Clearing expiration alone satisfies this requirement without changing content or metadata. The Platform-only CLI offers mem0 add --expires, but requires a date strictly later than the local system date; the SDKs have no equivalent future-date restriction.
Example
The guide adds a trial-related message for user alice with expiration_date="2030-01-31" in Python or expirationDate: "2030-01-31" in JavaScript. Under the documented rules, ordinary searches exclude the resulting memory from 2030-02-01 UTC, while retrieval by ID remains available.
For an existing memory, the Python example client.update("mem_123", expiration_date=None) clears the cutoff. The JavaScript equivalent is await client.update("mem_123", { expirationDate: null }). These are documentation examples; they were not executed.
Assessment & evidence
Limitations
Expiration provides neither data erasure nor an access restriction: records remain retrievable by ID and can be included in searches explicitly. A malformed value already in storage is treated as unexpired, so invalid stored dates can leave memories visible even though TypeScript validates new inputs.
Date-only precision cannot express an hourly cutoff. CLI validation uses the local system date while expiration uses UTC, so those boundaries require attention. The page provides no measured latency, retrieval-quality results or exhaustive backend compatibility evidence.
Reasoning
The practical benefit follows from the documented filtering rules: an application can stop retrieving dated facts by default without scheduling a job solely to hide them. Developers still choose the appropriate date, and any later permanent removal needs a separate delete operation. Applications that request expired records must account for their potentially stale content.
Alternatives
The page distinguishes expiration from Mem0 Memory Decay and deletion. Decay is an optional Platform project setting that changes ranking according to usage recency while keeping memories searchable. Expiration applies per memory and hides it after a chosen date. The documented delete operation permanently removes memories on Platform and OSS. These distinctions support choosing an operation; the linked feature pages are not assessed.
Evidence
The evidence is Mem0's own documentation at [https://docs.mem0.ai/platform/features/memory-expiration]. It supports the described interface, examples and stated caveats. It does not provide execution results or independent benchmarks. Linked API references, repository implementation, pricing and setup pages are outside the assessed scope.
Access & freshness
Costs
The page supplies no prices, quotas, feature-tier entitlements or hosting charges. Platform fees and OSS operating costs are unknown. Because expired records remain stored, the documentation does not establish any storage-cost saving.
Rights
The page describes an Open Source implementation but includes no license text or explicit redistribution grant for the documentation or examples. Commercial-use, modification and redistribution terms cannot be established from this page.
Freshness
The page metadata reports a last modification of 23 July 2026, and the supplied copy was captured on 24 November 2026. These dates identify the documentation snapshot; they do not establish which SDK releases implement the described behavior or whether later changes exist.
Actions
Before integrating, confirm support in the intended SDK release and check the UTC day boundary, explicit date clearing, expired-record inclusion and malformed stored-date behavior. TypeScript users should verify the response field for their deployment. If records must eventually be erased, arrange a separate deletion step. Confirm pricing and applicable license terms separately.
