Keep Memories Accurate with Update
Mem0’s update operation lets you fix or enrich an existing memory without deleting it. When a user changes their preference or clarifies a fact, use update to keep the knowledge base fresh.Key terms
- memory_id: Unique identifier returned by
addorsearchresults. - text: New content that replaces the stored memory value. In the Python OSS SDK,
datais a deprecated alias fortext. - metadata: Optional key-value pairs you update alongside the text.
- timestamp: Unix epoch (int/float) or ISO 8601 string to override the memory’s timestamp.
- batch_update: Platform API that edits multiple memories in a single request.
- immutable: Flagged memories that must be deleted and re-added instead of updated.
How the update flow works
Submit the update
Call
update (or batch_update) with new text and optional metadata. Mem0 overwrites the stored value and adjusts indexes.Single memory update (Platform)
Expect a confirmation message and the updated memory to appear in the dashboard almost instantly.
Batch update (Platform)
Update up to 1000 memories in one call.Update with Mem0 OSS
In both OSS SDKs the content is optional: pass only
metadata and/or an expiration date to update those while keeping the existing content. At least one of the three must be provided, otherwise the call raises.data is a deprecated alias for text in both OSS SDKs (data= in Python, { data: ... } in JavaScript). It still works but logs a warning; prefer text. In JavaScript, passing a bare string is shorthand for { text }, so update(memoryId, "new text") also still works.Tips
- Update both
textandmetadatatogether to keep filters accurate. - Batch updates are ideal after large imports or when syncing CRM corrections.
- Immutable memories must be deleted and re-added instead of updated.
- Pair updates with feedback signals (thumbs up/down) to self-heal memories automatically.
MCP Alternative: With Mem0 MCP, AI agents can update their own memories when users correct information.
Managed vs OSS differences
| Capability | Mem0 Platform | Mem0 OSS |
|---|---|---|
| Update call | client.update(memory_id, {...}) | memory.update(memory_id, text=...) |
| Batch updates | client.batch_update (up to 1000 memories) | Script your own loop or bulk job |
| Dashboard visibility | Inspect updates in the UI | Inspect via logs or custom tooling |
| Immutable handling | Returns descriptive error | Raises exception: delete and re-add |
Put it into practice
- Review the Update Memory API reference for request/response details.
- Combine updates with Feedback Mechanism to automate corrections.
See it live
- Support Inbox with Mem0 uses updates to refine customer profiles.
- AI Tutor with Mem0 demonstrates user preference corrections mid-course.