mem0ai/mem0 · error · ValueError
The decay parameter is not supported by the OSS Memory SDK.
Error message
The decay parameter is not supported by the OSS Memory SDK.
What it means
Raised by the sync _OSSProject.update stub: the OSS (self-hosted) Memory SDK does not implement platform project settings, and while any call to update() is unsupported, passing decay=True gets this dedicated ValueError first (via get_decay_feature_error_message) so developers copying platform-client code get a pointed message instead of the generic one. 'decay' (automatic memory decay) is a hosted-platform feature only.
Source
Thrown at mem0/memory/main.py:470
setup_config()
logger = logging.getLogger(__name__)
_UNSET = object()
_PROJECT_UPDATE_UNSUPPORTED_ERROR = "Project updates are not supported by the OSS Memory SDK."
class _OSSProject:
def update(
self,
custom_instructions: Optional[str] = None,
custom_categories: Optional[list] = None,
multilingual: Optional[bool] = None,
decay: Optional[bool] = None,
):
if decay is True:
raise ValueError(get_decay_feature_error_message("sync", "project.update", "decay"))
raise ValueError(_PROJECT_UPDATE_UNSUPPORTED_ERROR)
class _AsyncOSSProject:
async def update(
self,
custom_instructions: Optional[str] = None,
custom_categories: Optional[list] = None,
multilingual: Optional[bool] = None,
decay: Optional[bool] = None,
):
if decay is True:
raise ValueError(await get_decay_feature_error_message_async("async", "project.update", "decay"))
raise ValueError(_PROJECT_UPDATE_UNSUPPORTED_ERROR)
class Memory(MemoryBase):
def __init__(self, config: MemoryConfig = MemoryConfig()):View on GitHub (pinned to 001c235229)
Solutions
- Remove the decay argument; it is a hosted-platform-only feature.
- If you need decay-like behavior in OSS, schedule your own cleanup that deletes old memories using expiration_date at add() time and filtering expired items on read.
- Switch to the hosted platform client (from mem0 import MemoryClient) if project-level decay is a hard requirement.
- Do not call project.update() at all in OSS — every variant raises.
Example fix
# before m.project.update(custom_instructions="...", decay=True) # after m.project.update(custom_instructions="...") # any OSS call still unsupported; drop project.update entirely and configure via MemoryConfig
Defensive patterns
Strategy: type-guard
Validate before calling
if "decay" in project_kwargs:
raise ValueError("decay is platform-only; not available in the OSS SDK") Type guard
def is_oss_supported_project_kwarg(k: str) -> bool:
return k not in {"decay"} Prevention
- Do not call project.update() in OSS code at all — every path raises.
- Keep a set of platform-only kwargs and strip them before calling OSS methods.
- Pin your docs to the OSS package version you actually use.
When it happens
Trigger: Calling m.project.update(decay=True) on a Memory instance created with from mem0 import Memory; copy-pasting MemoryClient (hosted) example code into an OSS deployment; enabling decay via project config programmatically.
Common situations: Migrating from the hosted mem0 platform to the self-hosted SDK and reusing platform snippets; following docs for the wrong product tier; AI assistants generating platform-flavored code against the OSS package.
Related errors
- organizationId and projectId must be set to access instructi
- organizationId and projectId must be set to update instructi
- The decay parameter is not supported by the OSS Memory SDK.
- The timestamp parameter is not supported by the OSS Memory S
- The reference_date parameter is not supported by the OSS Mem
AI-assisted analysis of mem0ai/mem0@001c235229 (2026-08-15).
Data as JSON: /api/errors/faf87ea582d180eb.
Report an issue: GitHub.