Update Docs (#3520)

This commit is contained in:
Deshraj Yadav
2025-09-30 08:41:36 -07:00
committed by GitHub
parent 135883935f
commit d68ed11d58
134 changed files with 2193 additions and 2090 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ iconType: "solid"
## Overview
The `add` operation is how you store memory into Mem0. Whether you're working with a chatbot, a voice assistant, or a multi-agent system, this is the entry point to create long-term memory.
The `add` operation stores memory into Mem0. Whether you're working with a chatbot, a voice assistant, or a multi-agent system, this is the entry point to create long-term memory.
Memories typically come from a **user-assistant interaction** and Mem0 handles the extraction, transformation, and storage for you.
@@ -17,7 +17,7 @@ Mem0 offers two implementation flows:
- **Mem0 Platform** (Managed, scalable, with dashboard + API)
- **Mem0 Open Source** (Lightweight, fully local, flexible SDKs)
Each supports the same core memory operations, but with slightly different setup. Below, we walk through examples for both.
Each supports the same core memory operations, but with slightly different setup.
## Architecture
@@ -37,7 +37,7 @@ When you call `add`, Mem0 performs the following steps under the hood:
3. **Memory Storage**
The result is stored in a vector database (for semantic search) and optionally in a graph structure (for relationship mapping).
You don’t need to handle any of this manually, Mem0 takes care of it with a single API call or SDK method.
You don't need to handle any of this manually - Mem0 takes care of it with a single API call or SDK method.
---
@@ -94,7 +94,7 @@ m = Memory()
messages = [
{"role": "user", "content": "I'm planning to watch a movie tonight. Any recommendations?"},
{"role": "assistant", "content": "How about a thriller movies? They can be quite engaging."},
{"role": "assistant", "content": "How about thriller movies? They can be quite engaging."},
{"role": "user", "content": "I'm not a big fan of thriller movies but I love sci-fi movies."},
{"role": "assistant", "content": "Got it! I'll avoid thriller recommendations and suggest sci-fi movies in the future."}
]
@@ -13,7 +13,7 @@ Memories can become outdated, irrelevant, or need to be removed for privacy or c
2. **Batch Delete**: Delete multiple known memory IDs (up to 1000)
3. **Filtered Delete**: Delete memories matching a filter (e.g., `user_id`, `metadata`, `run_id`)
This page walks through code example for each method.
This page walks through code examples for each method.
## Use Cases
@@ -109,6 +109,7 @@ client.deleteAll({ user_id: "alice" })
</CodeGroup>
You can also filter by other parameters such as:
- `agent_id`
- `run_id`
- `metadata` (as JSON string)
@@ -133,8 +134,6 @@ For request/response schema and additional filtering options, see:
You’ve now seen how to add, search, update, and delete memories in Mem0.
---
## Need help?
If you have any questions, please feel free to reach out to us using one of the following methods:
@@ -26,7 +26,7 @@ This applies to both:
<img src="../../images/search_architecture.png" />
</Frame>
The search flow follows these steps:
When you call `search`, Mem0 performs the following steps:
1. **Query Processing**
An LLM refines and optimizes your natural language query.
@@ -105,7 +105,7 @@ const relatedMemories = memory.search("Should I drink coffee or tea?", { userId:
## Tips for Better Search
- Use descriptive natural queries (Mem0 can interpret intent)
- Apply filters for scoped, faster lookup
- Apply filters for scoped, faster lookups
- Use `version: "v2"` for enhanced results
- Consider wildcard filters (e.g., `run_id: "*"`) for broader matches
- Tune with `top_k`, `threshold`, or `rerank` if needed
@@ -116,8 +116,6 @@ const relatedMemories = memory.search("Should I drink coffee or tea?", { userId:
For the full list of filter logic, comparison operators, and optional search parameters, see the
[Search Memory API Reference](/api-reference/memory/v2-search-memories).
---
## Need help?
If you have any questions, please feel free to reach out to us using one of the following methods:
@@ -7,21 +7,21 @@ iconType: "solid"
## Overview
User preferences, interests, and behaviors often evolve over time. The `update` operation lets you revise a stored memory, whether it's updating facts and memories, rephrasing a message, or enriching metadata.
User preferences, interests, and behaviors often evolve over time. The `update` operation lets you revise a stored memory, whether it's updating facts, rephrasing a message, or enriching metadata.
Mem0 supports both:
- **Single Memory Update** for one specific memory using its ID
- **Batch Update** for updating many memories at once (up to 1000)
This guide includes usage for both single update and batch update of memories through **Mem0 Platform**
This guide includes usage for both single update and batch update of memories through **Mem0 Platform**.
## Use Cases
- Refine a vague or incorrect memory after a correction
- Add or edit memory with new metadata (e.g., categories, tags)
- Evolve factual knowledge as the user’s profile changes
- A user profile evolves: “I love spicy food” → later says “Actually, I can’t handle spicy food.”
- Evolve factual knowledge as the user's profile changes
- Handle profile evolution: "I love spicy food" → later says "Actually, I can't handle spicy food"
Updating memory ensures your agents remain accurate, adaptive, and personalized.
@@ -99,18 +99,16 @@ client.batchUpdate(updateMemories)
## Tips
- You can update both `text` and `metadata` in the same call.
- Use `batchUpdate` when you're applying similar corrections at scale.
- If memory is marked `immutable`, it must first be deleted and re-added.
- Combine this with feedback mechanisms (e.g., user thumbs-up/down) to self-improve memory.
- You can update both `text` and `metadata` in the same call
- Use `batchUpdate` when you're applying similar corrections at scale
- If memory is marked `immutable`, it must first be deleted and re-added
- Combine this with feedback mechanisms (e.g., user thumbs-up/down) to self-improve memory
### More Details
Refer to the full [Update Memory API Reference](/api-reference/memory/update-memory) and [Batch Update Reference](/api-reference/memory/batch-update) for schema and advanced fields.
---
## Need help?
If you have any questions, please feel free to reach out to us using one of the following methods: