diff --git a/docs/api-reference.mdx b/docs/api-reference.mdx
index a175d2aec..73a9bc059 100644
--- a/docs/api-reference.mdx
+++ b/docs/api-reference.mdx
@@ -31,10 +31,10 @@ All API requests require authentication using HTTP Basic Auth. Ensure you includ
Organizations and projects provide the following capabilities:
-- **Multi-org/project Support**: Specify organization and project when initializing the Mem0 client to attribute API usage appropriately
-- **Member Management**: Control access to data through organization and project membership
-- **Access Control**: Only members can access memories and data within their organization/project scope
-- **Team Isolation**: Maintain data separation between different teams and projects for secure collaboration
+- **Multi-org/project Support**: Specify organization and project when initializing the Mem0 client to attribute API usage appropriately.
+- **Member Management**: Control access to data through organization and project membership.
+- **Access Control**: Only members can access memories and data within their organization/project scope.
+- **Team Isolation**: Maintain data separation between different teams and projects for secure collaboration.
Example with the mem0 Python package:
@@ -157,8 +157,8 @@ client.project.remove_member(email="colleague@company.com")
#### Member Roles
-- **READER**: Can view and search memories, but cannot modify project settings or manage members
-- **OWNER**: Full access including project modification, member management, and all reader permissions
+- **READER**: Can view and search memories, but cannot modify project settings or manage members.
+- **OWNER**: Full access including project modification, member management, and all reader permissions.
#### Async Support
diff --git a/docs/api-reference/memory/create-memory-export.mdx b/docs/api-reference/memory/create-memory-export.mdx
index 9468d188e..b849a305e 100644
--- a/docs/api-reference/memory/create-memory-export.mdx
+++ b/docs/api-reference/memory/create-memory-export.mdx
@@ -3,4 +3,4 @@ title: 'Create Memory Export'
openapi: post /v1/exports/
---
-Submit a job to create a structured export of memories using a customizable Pydantic schema. This process may take some time to complete, especially if you’re exporting a large number of memories. You can tailor the export by applying various filters (e.g., user_id, agent_id, run_id, or session_id) and by modifying the Pydantic schema to ensure the final data matches your exact needs.
+Submit a job to create a structured export of memories using a customizable Pydantic schema. This process may take some time to complete, especially if you're exporting a large number of memories. You can tailor the export by applying various filters (e.g., `user_id`, `agent_id`, `run_id`, or `session_id`) and by modifying the Pydantic schema to ensure the final data matches your exact needs.
diff --git a/docs/api-reference/memory/v2-search-memories.mdx b/docs/api-reference/memory/v2-search-memories.mdx
index a81b898a2..49ed89e9c 100644
--- a/docs/api-reference/memory/v2-search-memories.mdx
+++ b/docs/api-reference/memory/v2-search-memories.mdx
@@ -13,96 +13,96 @@ The v2 search API is powerful and flexible, allowing for more precise memory ret
- `icontains`: Case-insensitive containment check
- `*`: Wildcard character that matches everything
-
- ```python Code
- related_memories = m.search(
- query="What are Alice's hobbies?",
- version="v2",
- filters={
- "OR": [
- {
+
+```python Code
+related_memories = m.search(
+ query="What are Alice's hobbies?",
+ version="v2",
+ filters={
+ "OR": [
+ {
+ "user_id": "alice"
+ },
+ {
+ "agent_id": {"in": ["travel-agent", "sports-agent"]}
+ }
+ ]
+ },
+)
+```
+
+```json Output
+{
+ "memories": [
+ {
+ "id": "ea925981-272f-40dd-b576-be64e4871429",
+ "memory": "Likes to play cricket and plays cricket on weekends.",
+ "metadata": {
+ "category": "hobbies"
+ },
+ "score": 0.32116443111457704,
+ "created_at": "2024-07-26T10:29:36.630547-07:00",
+ "updated_at": null,
+ "user_id": "alice",
+ "agent_id": "sports-agent"
+ }
+ ],
+}
+```
+
+
+
+```python Wildcard Example
+# Using wildcard to match all run_ids for a specific user
+all_memories = m.search(
+ query="What are Alice's hobbies?",
+ version="v2",
+ filters={
+ "AND": [
+ {
"user_id": "alice"
- },
- {
- "agent_id": {"in": ["travel-agent", "sports-agent"]}
- }
- ]
- },
- )
- ```
+ },
+ {
+ "run_id": "*"
+ }
+ ]
+ },
+)
+```
+
- ```json Output
- {
- "memories": [
- {
- "id": "ea925981-272f-40dd-b576-be64e4871429",
- "memory": "Likes to play cricket and plays cricket on weekends.",
- "metadata": {
- "category": "hobbies"
- },
- "score": 0.32116443111457704,
- "created_at": "2024-07-26T10:29:36.630547-07:00",
- "updated_at": null,
- "user_id": "alice",
- "agent_id": "sports-agent"
- }
- ],
- }
- ```
-
+
+```python Categories Filter Examples
+# Example 1: Using 'contains' for partial matching
+finance_memories = m.search(
+ query="What are my financial goals?",
+ version="v2",
+ filters={
+ "AND": [
+ { "user_id": "alice" },
+ {
+ "categories": {
+ "contains": "finance"
+ }
+ }
+ ]
+ },
+)
-
- ```python Wildcard Example
- # Using wildcard to match all run_ids for a specific user
- all_memories = m.search(
- query="What are Alice's hobbies?",
- version="v2",
- filters={
- "AND": [
- {
- "user_id": "alice"
- },
- {
- "run_id": "*"
- }
- ]
- },
- )
- ```
-
-
-
- ```python Categories Filter Examples
- # Example 1: Using 'contains' for partial matching
- finance_memories = m.search(
- query="What are my financial goals?",
- version="v2",
- filters={
- "AND": [
- { "user_id": "alice" },
- {
- "categories": {
- "contains": "finance"
- }
- }
- ]
- },
- )
-
- # Example 2: Using 'in' for exact matching
- personal_memories = m.search(
- query="What personal information do you have?",
- version="v2",
- filters={
- "AND": [
- { "user_id": "alice" },
- {
- "categories": {
- "in": ["personal_information"]
- }
- }
- ]
- },
- )
- ```
-
+# Example 2: Using 'in' for exact matching
+personal_memories = m.search(
+ query="What personal information do you have?",
+ version="v2",
+ filters={
+ "AND": [
+ { "user_id": "alice" },
+ {
+ "categories": {
+ "in": ["personal_information"]
+ }
+ }
+ ]
+ },
+)
+```
+
diff --git a/docs/api-reference/webhook/create-webhook.mdx b/docs/api-reference/webhook/create-webhook.mdx
index ee20953c9..4e8cabeac 100644
--- a/docs/api-reference/webhook/create-webhook.mdx
+++ b/docs/api-reference/webhook/create-webhook.mdx
@@ -3,7 +3,3 @@ title: 'Create Webhook'
openapi: post /api/v1/webhooks/projects/{project_id}/
---
-## Create Webhook
-
-Create a webhook by providing the project ID and the webhook details.
-
diff --git a/docs/api-reference/webhook/delete-webhook.mdx b/docs/api-reference/webhook/delete-webhook.mdx
index 079b76784..501a4b0a7 100644
--- a/docs/api-reference/webhook/delete-webhook.mdx
+++ b/docs/api-reference/webhook/delete-webhook.mdx
@@ -2,7 +2,3 @@
title: 'Delete Webhook'
openapi: delete /api/v1/webhooks/{webhook_id}/
---
-
-## Delete Webhook
-
-Delete a webhook by providing the webhook ID.
diff --git a/docs/api-reference/webhook/get-webhook.mdx b/docs/api-reference/webhook/get-webhook.mdx
index a7c63c737..c1a12d080 100644
--- a/docs/api-reference/webhook/get-webhook.mdx
+++ b/docs/api-reference/webhook/get-webhook.mdx
@@ -3,7 +3,3 @@ title: 'Get Webhook'
openapi: get /api/v1/webhooks/projects/{project_id}/
---
-## Get Webhook
-
-Get a webhook by providing the project ID.
-
diff --git a/docs/api-reference/webhook/update-webhook.mdx b/docs/api-reference/webhook/update-webhook.mdx
index 1ffef0438..5e6e29680 100644
--- a/docs/api-reference/webhook/update-webhook.mdx
+++ b/docs/api-reference/webhook/update-webhook.mdx
@@ -3,7 +3,3 @@ title: 'Update Webhook'
openapi: put /api/v1/webhooks/{webhook_id}/
---
-## Update Webhook
-
-Update a webhook by providing the webhook ID and the fields to update.
-
diff --git a/docs/changelog.mdx b/docs/changelog.mdx
index 5ac02f4e0..fd2faabde 100644
--- a/docs/changelog.mdx
+++ b/docs/changelog.mdx
@@ -673,17 +673,17 @@ mode: "wide"
-**Improvement :**
+**Improvement:**
- **Client:** Added `immutable` param to `add` method.
-**Improvement :**
+**Improvement:**
- **Client:** Made `api_version` V2 as default.
-**Improvement :**
+**Improvement:**
- **Client:** Added param `filter_memories`.
diff --git a/docs/components/embedders/models/aws_bedrock.mdx b/docs/components/embedders/models/aws_bedrock.mdx
index 389fa6559..c0b646b9e 100644
--- a/docs/components/embedders/models/aws_bedrock.mdx
+++ b/docs/components/embedders/models/aws_bedrock.mdx
@@ -41,7 +41,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/embedders/models/azure_openai.mdx b/docs/components/embedders/models/azure_openai.mdx
index a095288fa..1cd06a32c 100644
--- a/docs/components/embedders/models/azure_openai.mdx
+++ b/docs/components/embedders/models/azure_openai.mdx
@@ -23,7 +23,7 @@ config = {
"embedder": {
"provider": "azure_openai",
"config": {
- "model": "text-embedding-3-large"
+ "model": "text-embedding-3-large",
"azure_kwargs": {
"api_version": "",
"azure_deployment": "",
@@ -40,7 +40,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -68,7 +68,7 @@ const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/embedders/models/google_AI.mdx b/docs/components/embedders/models/google_AI.mdx
index 9efd41b2e..7bdb46be5 100644
--- a/docs/components/embedders/models/google_AI.mdx
+++ b/docs/components/embedders/models/google_AI.mdx
@@ -26,7 +26,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -50,7 +50,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/embedders/models/huggingface.mdx b/docs/components/embedders/models/huggingface.mdx
index 1e9f53049..33b71982c 100644
--- a/docs/components/embedders/models/huggingface.mdx
+++ b/docs/components/embedders/models/huggingface.mdx
@@ -24,7 +24,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/embedders/models/langchain.mdx b/docs/components/embedders/models/langchain.mdx
index 74ad18573..35d68cecd 100644
--- a/docs/components/embedders/models/langchain.mdx
+++ b/docs/components/embedders/models/langchain.mdx
@@ -36,7 +36,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -66,7 +66,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/embedders/models/lmstudio.mdx b/docs/components/embedders/models/lmstudio.mdx
index bc767b076..c54fff71c 100644
--- a/docs/components/embedders/models/lmstudio.mdx
+++ b/docs/components/embedders/models/lmstudio.mdx
@@ -20,7 +20,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -29,10 +29,10 @@ m.add(messages, user_id="john")
### Config
-Here are the parameters available for configuring Ollama embedder:
+Here are the parameters available for configuring LM Studio embedder:
| Parameter | Description | Default Value |
| --- | --- | --- |
-| `model` | The name of the OpenAI model to use | `nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.f16.gguf` |
+| `model` | The name of the LM Studio model to use | `nomic-embed-text-v1.5-GGUF/nomic-embed-text-v1.5.f16.gguf` |
| `embedding_dims` | Dimensions of the embedding model | `1536` |
| `lmstudio_base_url` | Base URL for LM Studio connection | `http://localhost:1234/v1` |
\ No newline at end of file
diff --git a/docs/components/embedders/models/ollama.mdx b/docs/components/embedders/models/ollama.mdx
index 4e1a4d331..5b3752a81 100644
--- a/docs/components/embedders/models/ollama.mdx
+++ b/docs/components/embedders/models/ollama.mdx
@@ -21,7 +21,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -44,7 +44,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/embedders/models/openai.mdx b/docs/components/embedders/models/openai.mdx
index 68be78a97..62858a1a1 100644
--- a/docs/components/embedders/models/openai.mdx
+++ b/docs/components/embedders/models/openai.mdx
@@ -25,7 +25,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/embedders/models/together.mdx b/docs/components/embedders/models/together.mdx
index 9f1695c3c..067f28375 100644
--- a/docs/components/embedders/models/together.mdx
+++ b/docs/components/embedders/models/together.mdx
@@ -27,7 +27,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/embedders/models/vertexai.mdx b/docs/components/embedders/models/vertexai.mdx
index 88cc08a3e..78ff115d6 100644
--- a/docs/components/embedders/models/vertexai.mdx
+++ b/docs/components/embedders/models/vertexai.mdx
@@ -27,7 +27,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/embedders/overview.mdx b/docs/components/embedders/overview.mdx
index 4a5990b61..9d030b93a 100644
--- a/docs/components/embedders/overview.mdx
+++ b/docs/components/embedders/overview.mdx
@@ -29,6 +29,6 @@ See the list of supported embedders below.
## Usage
-To utilize a embedder, you must provide a configuration to customize its usage. If no configuration is supplied, a default configuration will be applied, and `OpenAI` will be used as the embedder.
+To utilize an embedding model, you must provide a configuration to customize its usage. If no configuration is supplied, a default configuration will be applied, and `OpenAI` will be used as the embedding model.
-For a comprehensive list of available parameters for embedder configuration, please refer to [Config](./config).
+For a comprehensive list of available parameters for embedding model configuration, please refer to [Config](./config).
diff --git a/docs/components/llms/models/anthropic.mdx b/docs/components/llms/models/anthropic.mdx
index 688d85050..a1cc2ab14 100644
--- a/docs/components/llms/models/anthropic.mdx
+++ b/docs/components/llms/models/anthropic.mdx
@@ -29,7 +29,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -54,7 +54,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/aws_bedrock.mdx b/docs/components/llms/models/aws_bedrock.mdx
index ae1287b83..4bbcd3524 100644
--- a/docs/components/llms/models/aws_bedrock.mdx
+++ b/docs/components/llms/models/aws_bedrock.mdx
@@ -31,7 +31,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/llms/models/azure_openai.mdx b/docs/components/llms/models/azure_openai.mdx
index 02a0d351e..e32e6caf5 100644
--- a/docs/components/llms/models/azure_openai.mdx
+++ b/docs/components/llms/models/azure_openai.mdx
@@ -48,7 +48,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -77,7 +77,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/deepseek.mdx b/docs/components/llms/models/deepseek.mdx
index af1783a1c..07edbbdb1 100644
--- a/docs/components/llms/models/deepseek.mdx
+++ b/docs/components/llms/models/deepseek.mdx
@@ -28,7 +28,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/llms/models/groq.mdx b/docs/components/llms/models/groq.mdx
index d8f0727ce..c0fc0b80e 100644
--- a/docs/components/llms/models/groq.mdx
+++ b/docs/components/llms/models/groq.mdx
@@ -30,7 +30,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -55,7 +55,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/langchain.mdx b/docs/components/llms/models/langchain.mdx
index 624d86425..4de3ba58e 100644
--- a/docs/components/llms/models/langchain.mdx
+++ b/docs/components/llms/models/langchain.mdx
@@ -38,7 +38,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -69,7 +69,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/litellm.mdx b/docs/components/llms/models/litellm.mdx
index d66669f86..cd3061a3d 100644
--- a/docs/components/llms/models/litellm.mdx
+++ b/docs/components/llms/models/litellm.mdx
@@ -22,7 +22,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/llms/models/lmstudio.mdx b/docs/components/llms/models/lmstudio.mdx
index cb4281235..318487c15 100644
--- a/docs/components/llms/models/lmstudio.mdx
+++ b/docs/components/llms/models/lmstudio.mdx
@@ -29,7 +29,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -57,7 +57,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/llms/models/mistral_AI.mdx b/docs/components/llms/models/mistral_AI.mdx
index 632d48772..2a5234195 100644
--- a/docs/components/llms/models/mistral_AI.mdx
+++ b/docs/components/llms/models/mistral_AI.mdx
@@ -28,7 +28,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -53,7 +53,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/ollama.mdx b/docs/components/llms/models/ollama.mdx
index 9c0cd73cf..d405069df 100644
--- a/docs/components/llms/models/ollama.mdx
+++ b/docs/components/llms/models/ollama.mdx
@@ -1,4 +1,8 @@
-You can use LLMs from Ollama to run Mem0 locally. These [models](https://ollama.com/search?c=tools) support tool support.
+---
+title: Ollama
+---
+
+You can use LLMs from Ollama to run Mem0 locally. These [models](https://ollama.com/search?c=tools) support tool calling.
## Usage
@@ -23,7 +27,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -47,7 +51,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/openai.mdx b/docs/components/llms/models/openai.mdx
index d31723838..50fa707f4 100644
--- a/docs/components/llms/models/openai.mdx
+++ b/docs/components/llms/models/openai.mdx
@@ -40,7 +40,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -65,7 +65,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/llms/models/sarvam.mdx b/docs/components/llms/models/sarvam.mdx
index 0bf1e52df..8cdedcd71 100644
--- a/docs/components/llms/models/sarvam.mdx
+++ b/docs/components/llms/models/sarvam.mdx
@@ -28,7 +28,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/llms/models/together.mdx b/docs/components/llms/models/together.mdx
index 63182918e..4e2d5ba15 100644
--- a/docs/components/llms/models/together.mdx
+++ b/docs/components/llms/models/together.mdx
@@ -1,4 +1,8 @@
-To use TogetherAI LLM models, you have to set the `TOGETHER_API_KEY` environment variable. You can obtain the TogetherAI API key from their [Account settings page](https://api.together.xyz/settings/api-keys).
+---
+title: Together
+---
+
+To use Together LLM models, you have to set the `TOGETHER_API_KEY` environment variable. You can obtain the Together API key from their [Account settings page](https://api.together.xyz/settings/api-keys).
## Usage
@@ -23,7 +27,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -32,4 +36,4 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
## Config
-All available parameters for the `togetherai` config are present in [Master List of All Params in Config](../config).
\ No newline at end of file
+All available parameters for the `together` config are present in [Master List of All Params in Config](../config).
\ No newline at end of file
diff --git a/docs/components/llms/models/xAI.mdx b/docs/components/llms/models/xAI.mdx
index 39b159ca4..9f6e66951 100644
--- a/docs/components/llms/models/xAI.mdx
+++ b/docs/components/llms/models/xAI.mdx
@@ -29,7 +29,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/vectordbs/dbs/azure.mdx b/docs/components/vectordbs/dbs/azure.mdx
index 824b8e056..c0990f3e3 100644
--- a/docs/components/vectordbs/dbs/azure.mdx
+++ b/docs/components/vectordbs/dbs/azure.mdx
@@ -27,7 +27,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -107,13 +107,13 @@ To enable Role-Based Access Control (RBAC) for Azure AI Search, follow these ste
- Click **Add** > **Add role assignment**.
6. **Choose Role:**
- Mem0 requires the **Search Index Data Contributor** and **Search Service Contributor** role.
-7. **Choose Member**
- - To assign to a User, Group, Service Principle or Managed Identity:
+7. **Choose Member**
+ - To assign to a User, Group, Service Principal or Managed Identity:
- For production it is recommended to use a service principal or managed identity.
- For a service principal: select **User, group, or service principal** and search for the service principal.
- For a managed identity: select **Managed identity** and choose the managed identity.
- For development, you can assign the role to a user account.
- - For development: select ***User, group, or service principal** and pick a Azure Entra ID account (the same used with `az login`).
+ - For development: select **User, group, or service principal** and pick an Azure Entra ID account (the same used with `az login`).
8. **Complete the Assignment:**
- Click **Review + Assign**.
@@ -133,7 +133,7 @@ config = {
}
```
-### Environment Variables to set to use Azure Identity Credential:
+### Environment Variables to Use Azure Identity Credential
* For an Environment Credential, you will need to setup a Service Principal and set the following environment variables:
- `AZURE_TENANT_ID`: Your Azure Active Directory tenant ID.
- `AZURE_CLIENT_ID`: The client ID of your service principal or managed identity.
@@ -142,7 +142,7 @@ config = {
- `AZURE_CLIENT_ID`: The client ID of the user-assigned managed identity.
* For a System-Assigned Managed Identity, no additional environment variables are needed.
-### Developer logins to use for a Azure Identity Credential:
+### Developer Logins for Azure Identity Credential
* For an Azure CLI Credential, you need to have the Azure CLI installed and logged in with `az login`.
* For an Azure PowerShell Credential, you need to have the Azure PowerShell module installed and logged in with `Connect-AzAccount`.
* For an Azure Developer CLI Credential, you need to have the Azure Developer CLI installed and logged in with `azd auth login`.
diff --git a/docs/components/vectordbs/dbs/baidu.mdx b/docs/components/vectordbs/dbs/baidu.mdx
index 457fff2ba..352e95519 100644
--- a/docs/components/vectordbs/dbs/baidu.mdx
+++ b/docs/components/vectordbs/dbs/baidu.mdx
@@ -37,7 +37,7 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
### Config
-Here are the available parameters for the `mochow` config:
+Here are the parameters available for configuring Baidu VectorDB:
| Parameter | Description | Default Value |
| --- | --- | --- |
diff --git a/docs/components/vectordbs/dbs/chroma.mdx b/docs/components/vectordbs/dbs/chroma.mdx
index 2e546b883..d50e4061f 100644
--- a/docs/components/vectordbs/dbs/chroma.mdx
+++ b/docs/components/vectordbs/dbs/chroma.mdx
@@ -26,7 +26,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/vectordbs/dbs/elasticsearch.mdx b/docs/components/vectordbs/dbs/elasticsearch.mdx
index 5e735d232..a07842869 100644
--- a/docs/components/vectordbs/dbs/elasticsearch.mdx
+++ b/docs/components/vectordbs/dbs/elasticsearch.mdx
@@ -31,7 +31,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -40,7 +40,7 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
### Config
-Let's see the available parameters for the `elasticsearch` config:
+Here are the parameters available for configuring Elasticsearch:
| Parameter | Description | Default Value |
| ---------------------- | -------------------------------------------------- | ------------- |
diff --git a/docs/components/vectordbs/dbs/faiss.mdx b/docs/components/vectordbs/dbs/faiss.mdx
index 19daddabf..4b1d039ed 100644
--- a/docs/components/vectordbs/dbs/faiss.mdx
+++ b/docs/components/vectordbs/dbs/faiss.mdx
@@ -22,7 +22,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/vectordbs/dbs/langchain.mdx b/docs/components/vectordbs/dbs/langchain.mdx
index d87ff583a..71c22a483 100644
--- a/docs/components/vectordbs/dbs/langchain.mdx
+++ b/docs/components/vectordbs/dbs/langchain.mdx
@@ -38,7 +38,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -64,12 +64,12 @@ const memory = new Memory(config);
const 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." }
]
-memory.add(messages, user_id="alice", metadata={"category": "movies"})
+await memory.add(messages, { userId: "alice", metadata: { category: "movies" } });
```
diff --git a/docs/components/vectordbs/dbs/milvus.mdx b/docs/components/vectordbs/dbs/milvus.mdx
index 0e33f2766..13e08296d 100644
--- a/docs/components/vectordbs/dbs/milvus.mdx
+++ b/docs/components/vectordbs/dbs/milvus.mdx
@@ -1,4 +1,4 @@
-[Milvus](https://milvus.io/) Milvus is an open-source vector database that suits AI applications of every size from running a demo chatbot in Jupyter notebook to building web-scale search that serves billions of users.
+[Milvus](https://milvus.io/) is an open-source vector database that suits AI applications of every size, from running a demo chatbot in a Jupyter notebook to building web-scale search that serves billions of users.
### Usage
@@ -22,7 +22,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -31,7 +31,7 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
### Config
-Here's the parameters available for configuring Milvus Database:
+Here are the parameters available for configuring Milvus:
| Parameter | Description | Default Value |
| --- | --- | --- |
diff --git a/docs/components/vectordbs/dbs/mongodb.mdx b/docs/components/vectordbs/dbs/mongodb.mdx
index 3fea21c3a..dbb419343 100644
--- a/docs/components/vectordbs/dbs/mongodb.mdx
+++ b/docs/components/vectordbs/dbs/mongodb.mdx
@@ -24,7 +24,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -40,6 +40,6 @@ Here are the parameters available for configuring MongoDB:
| db_name | Name of the MongoDB database | `"mem0_db"` |
| collection_name | Name of the MongoDB collection | `"mem0_collection"` |
| embedding_model_dims | Dimensions of the embedding vectors | `1536` |
-| mongo_uri | The mongo URI connection string | mongodb://username:password@localhost:27017 |
+| mongo_uri | The MongoDB URI connection string | `mongodb://username:password@localhost:27017` |
-> **Note**: If Mongo_uri is not provided it will default to mongodb://username:password@localhost:27017.
+> **Note**: If `mongo_uri` is not provided, it will default to `mongodb://username:password@localhost:27017`.
diff --git a/docs/components/vectordbs/dbs/opensearch.mdx b/docs/components/vectordbs/dbs/opensearch.mdx
index 4c0a72902..8004a7615 100644
--- a/docs/components/vectordbs/dbs/opensearch.mdx
+++ b/docs/components/vectordbs/dbs/opensearch.mdx
@@ -58,7 +58,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -74,8 +74,8 @@ results = m.search("What kind of movies does Alice like?", user_id="alice")
### Features
- Fast and Efficient Vector Search
-- Can be deployed on-premises, in containers, or on cloud platforms like AWS OpenSearch Service.
-- Multiple Authentication and Security Methods (Basic Authentication, API Keys, LDAP, SAML, and OpenID Connect)
+- Can be deployed on-premises, in containers, or on cloud platforms like AWS OpenSearch Service
+- Multiple authentication and security methods (Basic Authentication, API Keys, LDAP, SAML, and OpenID Connect)
- Automatic index creation with optimized mappings for vector search
-- Memory Optimization through Disk-Based Vector Search and Quantization
-- Real-Time Analytics and Observability
+- Memory optimization through disk-based vector search and quantization
+- Real-time analytics and observability
diff --git a/docs/components/vectordbs/dbs/pgvector.mdx b/docs/components/vectordbs/dbs/pgvector.mdx
index 03836c2db..057f08c45 100644
--- a/docs/components/vectordbs/dbs/pgvector.mdx
+++ b/docs/components/vectordbs/dbs/pgvector.mdx
@@ -1,4 +1,4 @@
-[pgvector](https://github.com/pgvector/pgvector) is open-source vector similarity search for Postgres. After connecting with postgres run `CREATE EXTENSION IF NOT EXISTS vector;` to create the vector extension.
+[pgvector](https://github.com/pgvector/pgvector) is an open-source vector similarity search extension for Postgres. After connecting to Postgres, run `CREATE EXTENSION IF NOT EXISTS vector;` to create the vector extension.
### Usage
@@ -24,7 +24,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -54,7 +54,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
@@ -64,7 +64,7 @@ await memory.add(messages, { userId: "alice", metadata: { category: "movies" } }
### Config
-Here's the parameters available for configuring pgvector:
+Here are the parameters available for configuring pgvector:
| Parameter | Description | Default Value |
| --- | --- | --- |
diff --git a/docs/components/vectordbs/dbs/pinecone.mdx b/docs/components/vectordbs/dbs/pinecone.mdx
index 8633ab256..274149a5e 100644
--- a/docs/components/vectordbs/dbs/pinecone.mdx
+++ b/docs/components/vectordbs/dbs/pinecone.mdx
@@ -33,7 +33,7 @@ config = {
m = Memory.from_config(config)
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."}
]
diff --git a/docs/components/vectordbs/dbs/qdrant.mdx b/docs/components/vectordbs/dbs/qdrant.mdx
index 1fe21c678..01fe7601f 100644
--- a/docs/components/vectordbs/dbs/qdrant.mdx
+++ b/docs/components/vectordbs/dbs/qdrant.mdx
@@ -23,7 +23,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -48,7 +48,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/vectordbs/dbs/redis.mdx b/docs/components/vectordbs/dbs/redis.mdx
index 3e1b7cc96..eb19aa42d 100644
--- a/docs/components/vectordbs/dbs/redis.mdx
+++ b/docs/components/vectordbs/dbs/redis.mdx
@@ -34,7 +34,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -60,7 +60,7 @@ const config = {
const memory = new Memory(config);
const 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."}
]
diff --git a/docs/components/vectordbs/dbs/s3_vectors.mdx b/docs/components/vectordbs/dbs/s3_vectors.mdx
index 47be4fb83..5998bf522 100644
--- a/docs/components/vectordbs/dbs/s3_vectors.mdx
+++ b/docs/components/vectordbs/dbs/s3_vectors.mdx
@@ -48,7 +48,7 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
### Config
-Here are the available parameters for the `s3_vectors` config:
+Here are the parameters available for configuring Amazon S3 Vectors:
| Parameter | Description | Default Value |
| ---------------------- | -------------------------------------------------------------------------------- | ------------------------------------- |
diff --git a/docs/components/vectordbs/dbs/supabase.mdx b/docs/components/vectordbs/dbs/supabase.mdx
index d6dd38727..9741569bf 100644
--- a/docs/components/vectordbs/dbs/supabase.mdx
+++ b/docs/components/vectordbs/dbs/supabase.mdx
@@ -26,7 +26,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -53,7 +53,7 @@ const memory = new Memory(config);
const 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."}
]
@@ -109,7 +109,7 @@ end;
$$;
```
-Goto [Supabase](https://supabase.com/dashboard/projects) and run the above SQL migrations inside the SQL Editor.
+Go to [Supabase](https://supabase.com/dashboard/projects) and run the above SQL migrations in the SQL Editor.
### Config
diff --git a/docs/components/vectordbs/dbs/valkey.mdx b/docs/components/vectordbs/dbs/valkey.mdx
index 3c6d72e84..aa686cd0f 100644
--- a/docs/components/vectordbs/dbs/valkey.mdx
+++ b/docs/components/vectordbs/dbs/valkey.mdx
@@ -26,7 +26,7 @@ config = {
m = Memory.from_config(config)
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."}
]
@@ -35,7 +35,7 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
## Parameters
-Let's see the available parameters for the `valkey` config:
+Here are the parameters available for configuring Valkey:
| Parameter | Description | Default Value |
| --- | --- | --- |
diff --git a/docs/components/vectordbs/dbs/vectorize.mdx b/docs/components/vectordbs/dbs/vectorize.mdx
index de5205291..baf1294bf 100644
--- a/docs/components/vectordbs/dbs/vectorize.mdx
+++ b/docs/components/vectordbs/dbs/vectorize.mdx
@@ -31,7 +31,7 @@ await memory.add(messages, { userId: "bob", metadata: { interest: "books" } });
### Config
-Let's see the available parameters for the `vectorize` config:
+Here are the parameters available for configuring Vectorize:
diff --git a/docs/components/vectordbs/dbs/weaviate.mdx b/docs/components/vectordbs/dbs/weaviate.mdx
index f5c36f4f4..632e03cd3 100644
--- a/docs/components/vectordbs/dbs/weaviate.mdx
+++ b/docs/components/vectordbs/dbs/weaviate.mdx
@@ -37,7 +37,7 @@ m.add(messages, user_id="alice", metadata={"category": "movies"})
### Config
-Let's see the available parameters for the `weaviate` config:
+Here are the parameters available for configuring Weaviate:
| Parameter | Description | Default Value |
| --- | --- | --- |
diff --git a/docs/components/vectordbs/overview.mdx b/docs/components/vectordbs/overview.mdx
index ba504541c..15494e612 100644
--- a/docs/components/vectordbs/overview.mdx
+++ b/docs/components/vectordbs/overview.mdx
@@ -17,7 +17,7 @@ See the list of supported vector databases below.
-
+
@@ -44,12 +44,11 @@ For a comprehensive list of available parameters for vector database configurati
## Common issues
-### Using model with different dimensions
+### Using Model with Different Dimensions
-If you are using customized model, which is having different dimensions other than 1536
-for example 768, you may encounter below error:
+If you are using a customized model with different dimensions other than 1536 (for example, 768), you may encounter the following error:
`ValueError: shapes (0,1536) and (768,) not aligned: 1536 (dim 1) != 768 (dim 0)`
-you could add `"embedding_model_dims": 768,` to the config of the vector_store to overcome this issue.
+You can add `"embedding_model_dims": 768,` to the config of the vector_store to resolve this issue.
diff --git a/docs/contributing/development.mdx b/docs/contributing/development.mdx
index 3292c33aa..ae043bd77 100644
--- a/docs/contributing/development.mdx
+++ b/docs/contributing/development.mdx
@@ -19,25 +19,25 @@ To contribute, follow these steps:
4. **Code Quality Checks**:
- Run **linting** to catch style issues
- Ensure **all tests pass**
-5. **Submit a Pull Request** 🚀
+5. **Submit a Pull Request**
For detailed guidance on pull requests, refer to [GitHub's documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
---
-## 📦 Dependency Management
+## Dependency Management
We use `hatch` as our package manager. Install it by following the [official instructions](https://hatch.pypa.io/latest/install/).
-⚠️ **Do NOT use `pip` or `conda` for dependency management.** Instead, follow these steps in order:
+**Do NOT use `pip` or `conda` for dependency management.** Instead, follow these steps in order:
```bash
# 1. Install base dependencies
make install
-# 2. Activate virtual environment (this will install deps.)
-hatch shell (for default env)
-hatch -e dev_py_3_11 shell (for dev_py_3_11) (differences are mentioned in pyproject.toml)
+# 2. Activate virtual environment (this will install dependencies)
+hatch shell # For default environment
+hatch -e dev_py_3_11 shell # For dev_py_3_11 (differences are mentioned in pyproject.toml)
# 3. Install all optional dependencies
make install_all
@@ -45,9 +45,9 @@ make install_all
---
-## 🛠️ Development Standards
+## Development Standards
-### ✅ Pre-commit Hooks
+### Pre-commit Hooks
Ensure `pre-commit` is installed before contributing:
@@ -55,7 +55,7 @@ Ensure `pre-commit` is installed before contributing:
pre-commit install
```
-### 🔍 Linting with `ruff`
+### Linting with `ruff`
Run the linter and fix any reported issues before submitting your PR:
@@ -63,7 +63,7 @@ Run the linter and fix any reported issues before submitting your PR:
make lint
```
-### 🎨 Code Formatting
+### Code Formatting
To maintain a consistent code style, format your code:
@@ -71,7 +71,7 @@ To maintain a consistent code style, format your code:
make format
```
-### 🧪 Testing with `pytest`
+### Testing with `pytest`
Run tests to verify functionality before submitting your PR:
@@ -79,14 +79,14 @@ Run tests to verify functionality before submitting your PR:
make test
```
-💡 **Note:** Some dependencies have been removed from the main dependencies to reduce package size. Run `make install_all` to install necessary dependencies before running tests.
+**Note:** Some dependencies have been removed from the main dependencies to reduce package size. Run `make install_all` to install necessary dependencies before running tests.
---
-## 🚀 Release Process
+## Release Process
Currently, releases are handled manually. We aim for frequent releases, typically when new features or bug fixes are introduced.
---
-Thank you for contributing to Mem0! 🎉
\ No newline at end of file
+Thank you for contributing to Mem0!
\ No newline at end of file
diff --git a/docs/contributing/documentation.mdx b/docs/contributing/documentation.mdx
index 33b445deb..f31b047d3 100644
--- a/docs/contributing/documentation.mdx
+++ b/docs/contributing/documentation.mdx
@@ -5,13 +5,13 @@ icon: "book"
# Documentation Contributions
-## 📌 Prerequisites
+## Prerequisites
Before getting started, ensure you have **Node.js (version 23.6.0 or higher)** installed on your system.
---
-## 🚀 Setting Up Mintlify
+## Setting Up Mintlify
### Step 1: Install Mintlify
@@ -41,7 +41,7 @@ The documentation website will be available at: [http://localhost:3000](http://l
---
-## 🔧 Custom Ports
+## Custom Ports
By default, Mintlify runs on **port 3000**. To use a different port, add the `--port` flag:
@@ -51,5 +51,5 @@ mintlify dev --port 3333
---
-By following these steps, you can efficiently contribute to **Mem0's documentation**. Happy documenting! ✍️
+By following these steps, you can efficiently contribute to Mem0's documentation.
diff --git a/docs/core-concepts/memory-operations/add.mdx b/docs/core-concepts/memory-operations/add.mdx
index 37305b39d..91141a4ae 100644
--- a/docs/core-concepts/memory-operations/add.mdx
+++ b/docs/core-concepts/memory-operations/add.mdx
@@ -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."}
]
diff --git a/docs/core-concepts/memory-operations/delete.mdx b/docs/core-concepts/memory-operations/delete.mdx
index bdfd35637..818d9b84c 100644
--- a/docs/core-concepts/memory-operations/delete.mdx
+++ b/docs/core-concepts/memory-operations/delete.mdx
@@ -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" })
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:
diff --git a/docs/core-concepts/memory-operations/search.mdx b/docs/core-concepts/memory-operations/search.mdx
index 496c1eb00..66f0325cc 100644
--- a/docs/core-concepts/memory-operations/search.mdx
+++ b/docs/core-concepts/memory-operations/search.mdx
@@ -26,7 +26,7 @@ This applies to both:
-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:
diff --git a/docs/core-concepts/memory-operations/update.mdx b/docs/core-concepts/memory-operations/update.mdx
index 94d22c3aa..1e3e982d1 100644
--- a/docs/core-concepts/memory-operations/update.mdx
+++ b/docs/core-concepts/memory-operations/update.mdx
@@ -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:
diff --git a/docs/core-concepts/memory-types.mdx b/docs/core-concepts/memory-types.mdx
index 18d10a530..5ce31c195 100644
--- a/docs/core-concepts/memory-types.mdx
+++ b/docs/core-concepts/memory-types.mdx
@@ -42,6 +42,7 @@ Each memory type has distinct characteristics:
| Long-Term | Persistent | Fast | User preferences and history |
## How Mem0 Implements Long-Term Memory
+
Mem0's long-term memory system builds on these foundations by:
1. Using vector embeddings to store and retrieve semantic information
diff --git a/docs/examples.mdx b/docs/examples.mdx
index 4d97d0782..1b95f8e45 100644
--- a/docs/examples.mdx
+++ b/docs/examples.mdx
@@ -51,7 +51,7 @@ Explore how **Mem0** can power real-world applications and bring personalized, i
- Integrate **Mem0** into **YouTube's** native UI, providing personalized responses with video context.
+ Integrate **Mem0** into **YouTube's** native UI, providing personalized responses with video context.
diff --git a/docs/examples/ai_companion_js.mdx b/docs/examples/ai_companion_js.mdx
index d170d12bd..ca820df7d 100644
--- a/docs/examples/ai_companion_js.mdx
+++ b/docs/examples/ai_companion_js.mdx
@@ -2,7 +2,7 @@
title: AI Companion in Node.js
---
-You can create a personalised AI Companion using Mem0. This guide will walk you through the necessary steps and provide the complete code to get you started.
+You can create a personalized AI Companion using Mem0. This guide will walk you through the necessary steps and provide the complete code to get you started.
## Overview
diff --git a/docs/examples/aws_example.mdx b/docs/examples/aws_example.mdx
index 7924bf675..0766937fd 100644
--- a/docs/examples/aws_example.mdx
+++ b/docs/examples/aws_example.mdx
@@ -36,7 +36,7 @@ This sets up Mem0 with:
- [AWS Bedrock for LLM](https://docs.mem0.ai/components/llms/models/aws_bedrock)
- [AWS Bedrock for embeddings](https://docs.mem0.ai/components/embedders/models/aws_bedrock#aws-bedrock)
- [OpenSearch as the vector store](https://docs.mem0.ai/components/vectordbs/dbs/opensearch)
-- [Neptune Analytics as your graph store](https://docs.mem0.ai/open-source/graph_memory/overview#initialize-neptune-analytics).
+- [Neptune Analytics as your graph store](https://docs.mem0.ai/open-source/graph_memory/overview#initialize-neptune-analytics)
```python
import boto3
@@ -93,12 +93,12 @@ m = Memory.from_config(config)
Reference [Notebook example](https://github.com/mem0ai/mem0/blob/main/examples/graph-db-demo/neptune-example.ipynb)
-#### Add a memory:
+### Add a memory
```python
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."}
]
@@ -107,24 +107,24 @@ messages = [
result = m.add(messages, user_id="alice", metadata={"category": "movie_recommendations"})
```
-#### Search a memory:
+### Search a memory
+
```python
relevant_memories = m.search(query, user_id="alice")
```
-#### Get all memories:
+### Get all memories
+
```python
all_memories = m.get_all(user_id="alice")
```
-#### Get a specific memory:
+### Get a specific memory
+
```python
memory = m.get(memory_id)
```
-
----
-
## Conclusion
With Mem0 and AWS services like Bedrock, OpenSearch, and Neptune Analytics, you can build intelligent AI companions that remember, adapt, and personalize their responses over time. This makes them ideal for long-term assistants, tutors, or support bots with persistent memory and natural conversation abilities.
diff --git a/docs/examples/chrome-extension.mdx b/docs/examples/chrome-extension.mdx
index a9ed8e3d1..422affe0a 100644
--- a/docs/examples/chrome-extension.mdx
+++ b/docs/examples/chrome-extension.mdx
@@ -1,9 +1,9 @@
# Mem0 Chrome Extension
-Enhance your AI interactions with **Mem0**, a Chrome extension that introduces a universal memory layer across platforms like `ChatGPT`, `Claude`, and `Perplexity`. Mem0 ensures seamless context sharing, making your AI experiences more personalized and efficient.
+Enhance your AI interactions with Mem0, a Chrome extension that introduces a universal memory layer across platforms like ChatGPT, Claude, and Perplexity. Mem0 ensures seamless context sharing, making your AI experiences more personalized and efficient.
- 🎉 We now support Grok! The Mem0 Chrome Extension has been updated to work with Grok, bringing the same powerful memory capabilities to your Grok conversations.
+ We now support Grok! The Mem0 Chrome Extension has been updated to work with Grok, bringing the same powerful memory capabilities to your Grok conversations.
@@ -44,7 +44,7 @@ You can install the Mem0 Chrome Extension using one of the following methods:
## Configuration
- **API Key**: Obtain your API key from the Mem0 Dashboard to connect the extension to the Mem0 API.
-- **User ID**: This is your unique identifier in the Mem0 system. If not provided, it defaults to 'chrome-extension-user'.
+- **User ID**: This is your unique identifier in the Mem0 system. If not provided, it defaults to `chrome-extension-user`.
## Demo Video
diff --git a/docs/examples/eliza_os.mdx b/docs/examples/eliza_os.mdx
index 8d0178008..498ea9ad7 100644
--- a/docs/examples/eliza_os.mdx
+++ b/docs/examples/eliza_os.mdx
@@ -2,13 +2,14 @@
title: Eliza OS Character
---
-You can create a personalised Eliza OS Character using Mem0. This guide will walk you through the necessary steps and provide the complete code to get you started.
+You can create a personalized Eliza OS Character using Mem0. This guide will walk you through the necessary steps and provide the complete code to get you started.
## Overview
-ElizaOS is a powerful AI agent framework for autonomy & personality. It is a collection of tools that help you create a personalised AI agent.
+ElizaOS is a powerful AI agent framework for autonomy and personality. It is a collection of tools that help you create a personalized AI agent.
## Setup
+
You can start by cloning the eliza-os repository:
```bash
@@ -35,14 +36,14 @@ pnpm build
## Setup ENVs
-Create a `.env` file in the root of the project and add the following ( You can use the `.env.example` file as a reference):
+Create a `.env` file in the root of the project and add the following (you can use the `.env.example` file as a reference):
```bash
# Mem0 Configuration
-MEM0_API_KEY= # Mem0 API Key ( Get from https://app.mem0.ai/dashboard/api-keys )
+MEM0_API_KEY= # Mem0 API Key (get from https://app.mem0.ai/dashboard/api-keys)
MEM0_USER_ID= # Default: eliza-os-user
MEM0_PROVIDER= # Default: openai
-MEM0_PROVIDER_API_KEY= # API Key for the provider (openai, anthropic, etc.)
+MEM0_PROVIDER_API_KEY= # API Key for the provider (OpenAI, Anthropic, etc.)
SMALL_MEM0_MODEL= # Default: gpt-4o-mini
MEDIUM_MEM0_MODEL= # Default: gpt-4o
LARGE_MEM0_MODEL= # Default: gpt-4o
@@ -50,7 +51,7 @@ LARGE_MEM0_MODEL= # Default: gpt-4o
## Make the default character use Mem0
-By default, there is a character called `eliza` that uses the `ollama` model. You can make this character use Mem0 by changing the config in the `agent/src/defaultCharacter.ts` file.
+By default, there is a character called `eliza` that uses the Ollama model. You can make this character use Mem0 by changing the config in the `agent/src/defaultCharacter.ts` file.
```ts
modelProvider: ModelProviderName.MEM0,
@@ -66,8 +67,6 @@ pnpm start
## Conclusion
-You have now created a personalised Eliza OS Character using Mem0. You can now start interacting with the character by running the project and talking to the character.
-
-This is a simple example of how to use Mem0 to create a personalised AI agent. You can use this as a starting point to create your own AI agent.
-
+You have now created a personalized Eliza OS Character using Mem0. You can now start interacting with the character by running the project and talking to the character.
+This is a simple example of how to use Mem0 to create a personalized AI agent. You can use this as a starting point to create your own AI agent.
diff --git a/docs/examples/email_processing.mdx b/docs/examples/email_processing.mdx
index 640aa32af..cf38c7133 100644
--- a/docs/examples/email_processing.mdx
+++ b/docs/examples/email_processing.mdx
@@ -180,5 +180,5 @@ print(f"Found {len(meeting_emails['results'])} relevant emails")
## Conclusion
-By combining Mem0's memory capabilities with email processing, you can create intelligent email management systems that help users organize, prioritize, and act on their inbox effectively. The advanced capabilities like automatic categorization, action item extraction, and priority management can significantly reduce the time spent on email management, allowing users to focus on more important tasks.
+By combining Mem0's memory capabilities with email processing, you can create intelligent email management systems that help users organize, prioritize, and act on their inbox effectively. Advanced capabilities like automatic categorization, action item extraction, and priority management can significantly reduce the time spent on email management, allowing users to focus on more important tasks.
diff --git a/docs/examples/llama-index-mem0.mdx b/docs/examples/llama-index-mem0.mdx
index d7d57715b..fcdc078a0 100644
--- a/docs/examples/llama-index-mem0.mdx
+++ b/docs/examples/llama-index-mem0.mdx
@@ -4,10 +4,12 @@ title: LlamaIndex ReAct Agent
Create a ReAct Agent with LlamaIndex which uses Mem0 as the memory store.
-### Overview
+## Overview
+
A ReAct agent combines reasoning and action capabilities, making it versatile for tasks requiring both thought processes (reasoning) and interaction with tools or APIs (acting). Mem0 as memory enhances these capabilities by allowing the agent to store and retrieve contextual information from past interactions.
-### Setup
+## Setup
+
```bash
pip install llama-index-core llama-index-memory-mem0
```
@@ -67,6 +69,7 @@ order_food_tool = FunctionTool.from_defaults(fn=order_food)
```
Initialize the agent with tools and memory.
+
```python
from llama_index.core.agent import FunctionCallingAgent
@@ -79,14 +82,16 @@ agent = FunctionCallingAgent.from_tools(
```
Start the chat.
- The agent will use the Mem0 to store the relevant memories from the chat.
-Input
+The agent will use Mem0 to store the relevant memories from the chat.
+
+**Input**
```python
response = agent.chat("Hi, My name is David")
print(response)
```
-Output
+
+**Output**
```text
> Running step bf44a75a-a920-4cf3-944e-b6e6b5695043. Step input: Hi, My name is David
Added user message to memory: Hi, My name is David
@@ -94,24 +99,27 @@ Added user message to memory: Hi, My name is David
Hello, David! How can I assist you today?
```
-Input
+**Input**
```python
response = agent.chat("I love to eat pizza on weekends")
print(response)
```
-Output
+
+**Output**
```text
> Running step 845783b0-b85b-487c-baee-8460ebe8b38d. Step input: I love to eat pizza on weekends
Added user message to memory: I love to eat pizza on weekends
=== LLM Response ===
Pizza is a great choice for the weekend! If you'd like, I can help you order some. Just let me know what kind of pizza you prefer!
```
-Input
+
+**Input**
```python
response = agent.chat("My preferred way of communication is email")
print(response)
```
-Output
+
+**Output**
```text
> Running step 345842f0-f8a0-42ea-a1b7-612265d72a92. Step input: My preferred way of communication is email
Added user message to memory: My preferred way of communication is email
@@ -119,8 +127,9 @@ Added user message to memory: My preferred way of communication is email
Got it! If you need any assistance or have any requests, feel free to let me know, and I can communicate with you via email.
```
-### Using the agent WITHOUT memory
-Input
+## Using the Agent Without Memory
+
+**Input**
```python
agent = FunctionCallingAgent.from_tools(
[call_tool, email_tool, order_food_tool],
@@ -131,17 +140,20 @@ agent = FunctionCallingAgent.from_tools(
response = agent.chat("I am feeling hungry, order me something and send me the bill")
print(response)
```
-Output
+
+**Output**
```text
> Running step e89eb75d-75e1-4dea-a8c8-5c3d4b77882d. Step input: I am feeling hungry, order me something and send me the bill
Added user message to memory: I am feeling hungry, order me something and send me the bill
=== LLM Response ===
Please let me know your name and the dish you'd like to order, and I'll take care of it for you!
```
- The agent is not able to remember the past preferences that user shared in previous chats.
-### Using the agent WITH memory
-Input
+The agent is not able to remember the past preferences the user shared in previous chats.
+
+## Using the Agent With Memory
+
+**Input**
```python
agent = FunctionCallingAgent.from_tools(
[call_tool, email_tool, order_food_tool],
@@ -170,4 +182,5 @@ Emailing... David
=== LLM Response ===
I've ordered a pizza for you, and the bill has been sent to your email. Enjoy your meal! If there's anything else you need, feel free to let me know.
```
- The agent is able to remember the past preferences that user shared and use them to perform actions.
+
+The agent is able to remember the past preferences the user shared and use them to perform actions.
diff --git a/docs/examples/llamaindex-multiagent-learning-system.mdx b/docs/examples/llamaindex-multiagent-learning-system.mdx
index 149a503a6..146fddd98 100644
--- a/docs/examples/llamaindex-multiagent-learning-system.mdx
+++ b/docs/examples/llamaindex-multiagent-learning-system.mdx
@@ -11,7 +11,7 @@ Build an intelligent multi-agent learning system that uses Mem0 to maintain pers
This example showcases a **Multi-Agent Personal Learning System** that combines:
- **LlamaIndex AgentWorkflow** for multi-agent orchestration
- **Mem0** for persistent, shared memory across agents
-- **Multi-agents** that collaborate on teaching tasks
+- **Multiple agents** that collaborate on teaching tasks
The system consists of two agents:
- **TutorAgent**: Primary instructor for explanations and concept teaching
@@ -350,7 +350,7 @@ Based on our previous session, I remember we covered Vision Language Models and
1. **Clear Agent Roles**: Define specific responsibilities for each agent
2. **Memory Context**: Use descriptive context for memory isolation
3. **Handoff Strategy**: Design clear handoff criteria between agents
-5. **Memory Hygiene**: Regularly review and clean memory for optimal performance
+4. **Memory Hygiene**: Regularly review and clean memory for optimal performance
## Help & Resources
diff --git a/docs/examples/mem0-agentic-tool.mdx b/docs/examples/mem0-agentic-tool.mdx
index 135716585..b6a9fd9ad 100644
--- a/docs/examples/mem0-agentic-tool.mdx
+++ b/docs/examples/mem0-agentic-tool.mdx
@@ -3,8 +3,7 @@ title: Mem0 as an Agentic Tool
---
-Integrate Mem0's memory capabilities with OpenAI's Agents SDK to create AI agents with persistent memory.
-You can create agents that remember past conversations and use that context to provide better responses.
+Integrate Mem0's memory capabilities with OpenAI's Agents SDK to create AI agents with persistent memory. You can create agents that remember past conversations and use that context to provide better responses.
## Installation
diff --git a/docs/examples/mem0-demo.mdx b/docs/examples/mem0-demo.mdx
index 5b129f6f4..5286de421 100644
--- a/docs/examples/mem0-demo.mdx
+++ b/docs/examples/mem0-demo.mdx
@@ -53,9 +53,9 @@ Before you begin, follow these steps to set up the demo application:
## Enhancing the Next.js Application
Once the demo is running, you can customize and enhance the Next.js application by modifying the components in the `mem0-demo` folder. Consider:
-- Adding new memory features to improve contextual retention.
-- Customizing the UI to better suit your application needs.
-- Integrating additional APIs or third-party services to extend functionality.
+- Adding new memory features to improve contextual retention
+- Customizing the UI to better suit your application needs
+- Integrating additional APIs or third-party services to extend functionality
## Full Code
diff --git a/docs/examples/mem0-google-adk-healthcare-assistant.mdx b/docs/examples/mem0-google-adk-healthcare-assistant.mdx
index c9f40d7ee..1703d6d89 100644
--- a/docs/examples/mem0-google-adk-healthcare-assistant.mdx
+++ b/docs/examples/mem0-google-adk-healthcare-assistant.mdx
@@ -4,7 +4,7 @@ description: 'Build a personalized healthcare agent that remembers patient infor
---
-# Healthcare Assistant with Memory
+## Healthcare Assistant with Memory
This example demonstrates how to build a healthcare assistant that remembers patient information across conversations using Google ADK and Mem0.
@@ -257,7 +257,7 @@ This healthcare assistant demonstrates several key capabilities:
## Key Implementation Details
-### User ID Management
+## User ID Management
Instead of passing the user ID as a parameter to the memory tools (which would require modifying the ADK's tool calling system), we attach it directly to the function object:
@@ -276,7 +276,7 @@ user_id = getattr(save_patient_info, 'user_id', 'default_user')
This approach allows our tools to maintain user context without complicating their parameter signatures.
-### Mem0 Integration
+## Mem0 Integration
The integration with Mem0 happens through two primary functions:
diff --git a/docs/examples/mem0-mastra.mdx b/docs/examples/mem0-mastra.mdx
index 8c8f58650..181a414ed 100644
--- a/docs/examples/mem0-mastra.mdx
+++ b/docs/examples/mem0-mastra.mdx
@@ -2,8 +2,7 @@
title: Mem0 with Mastra
---
-In this example you'll learn how to use the Mem0 to add long-term memory capabilities to [Mastra's agent](https://mastra.ai/) via tool-use.
-This memory integration can work alongside Mastra's [agent memory features](https://mastra.ai/docs/agents/01-agent-memory).
+In this example you'll learn how to use Mem0 to add long-term memory capabilities to [Mastra's agent](https://mastra.ai/) via tool-use. This memory integration can work alongside Mastra's [agent memory features](https://mastra.ai/docs/agents/01-agent-memory).
You can find the complete example code in the [Mastra repository](https://github.com/mastra-ai/mastra/tree/main/examples/memory-with-mem0).
@@ -11,9 +10,9 @@ You can find the complete example code in the [Mastra repository](https://github
This guide will show you how to integrate Mem0 with Mastra to add long-term memory capabilities to your agents. We'll create tools that allow agents to save and retrieve memories using Mem0's API.
-### Installation
+## Installation
-1. **Install the Integration Package**
+**Install the Integration Package**
To install the Mem0 integration, run:
@@ -21,7 +20,7 @@ To install the Mem0 integration, run:
npm install @mastra/mem0
```
-2. **Add the Integration to Your Project**
+**Add the Integration to Your Project**
Create a new file for your integrations and import the integration:
@@ -36,7 +35,7 @@ export const mem0 = new Mem0Integration({
});
```
-3. **Use the Integration in Tools or Workflows**
+**Use the Integration in Tools or Workflows**
You can now use the integration when defining tools for your agents or in workflows.
@@ -86,7 +85,7 @@ export const mem0MemorizeTool = createTool({
});
```
-4. **Create a new agent**
+**Create a New Agent**
```typescript agents/index.ts
import { openai } from '@ai-sdk/openai';
@@ -103,7 +102,7 @@ export const mem0Agent = new Agent({
});
```
-5. **Run the agent**
+**Run the Agent**
```typescript index.ts
import { Mastra } from '@mastra/core/mastra';
@@ -121,6 +120,6 @@ export const mastra = new Mastra({
```
In the example above:
-- We import the `@mastra/mem0` integration.
-- We define two tools that uses the Mem0 API client to create new memories and recall previously saved memories.
-- The tool accepts `question` as an input and returns the memory as a string.
\ No newline at end of file
+- We import the `@mastra/mem0` integration
+- We define two tools that use the Mem0 API client to create new memories and recall previously saved memories
+- The tool accepts `question` as an input and returns the memory as a string
\ No newline at end of file
diff --git a/docs/examples/mem0-openai-voice-demo.mdx b/docs/examples/mem0-openai-voice-demo.mdx
index 42013d45a..1a9e97771 100644
--- a/docs/examples/mem0-openai-voice-demo.mdx
+++ b/docs/examples/mem0-openai-voice-demo.mdx
@@ -3,7 +3,7 @@ title: 'Mem0 with OpenAI Agents SDK for Voice'
description: 'Integrate memory capabilities into your voice agents using Mem0 and OpenAI Agents SDK'
---
-# Building Voice Agents with Memory using Mem0 and OpenAI Agents SDK
+## Building Voice Agents with Memory using Mem0 and OpenAI Agents SDK
This guide demonstrates how to combine OpenAI's Agents SDK for voice applications with Mem0's memory capabilities to create a voice assistant that remembers user preferences and past interactions.
diff --git a/docs/examples/mem0-with-ollama.mdx b/docs/examples/mem0-with-ollama.mdx
index de57feb33..7f17effdd 100644
--- a/docs/examples/mem0-with-ollama.mdx
+++ b/docs/examples/mem0-with-ollama.mdx
@@ -6,15 +6,15 @@ title: Mem0 with Ollama
Mem0 can be utilized entirely locally by leveraging Ollama for both the embedding model and the language model (LLM). This guide will walk you through the necessary steps and provide the complete code to get you started.
-### Overview
+## Overview
By using Ollama, you can run Mem0 locally, which allows for greater control over your data and models. This setup uses Ollama for both the embedding model and the language model, providing a fully local solution.
-### Setup
+## Setup
Before you begin, ensure you have Mem0 and Ollama installed and properly configured on your local machine.
-### Full Code Example
+## Full Code Example
Below is the complete code to set up and use Mem0 locally with Ollama:
@@ -60,13 +60,13 @@ m.add("I'm visiting Paris", user_id="john")
memories = m.get_all(user_id="john")
```
-### Key Points
+## Key Points
-- **Configuration**: The setup involves configuring the vector store, language model, and embedding model to use local resources.
-- **Vector Store**: Qdrant is used as the vector store, running on localhost.
-- **Language Model**: Ollama is used as the LLM provider, with the "llama3.1:latest" model.
-- **Embedding Model**: Ollama is also used for embeddings, with the "nomic-embed-text:latest" model.
+- **Configuration**: The setup involves configuring the vector store, language model, and embedding model to use local resources
+- **Vector Store**: Qdrant is used as the vector store, running on localhost
+- **Language Model**: Ollama is used as the LLM provider, with the `llama3.1:latest` model
+- **Embedding Model**: Ollama is also used for embeddings, with the `nomic-embed-text:latest` model
-### Conclusion
+## Conclusion
This local setup of Mem0 using Ollama provides a fully self-contained solution for memory management and AI interactions. It allows for greater control over your data and models while still leveraging the powerful capabilities of Mem0.
\ No newline at end of file
diff --git a/docs/examples/memory-guided-content-writing.mdx b/docs/examples/memory-guided-content-writing.mdx
index 1f8b4f195..2986cb37c 100644
--- a/docs/examples/memory-guided-content-writing.mdx
+++ b/docs/examples/memory-guided-content-writing.mdx
@@ -31,7 +31,7 @@ USER_ID = "content_writer"
RUN_ID = "smart_editing_session"
```
-## **Storing Your Writing Preferences in Mem0**
+## Storing Your Writing Preferences in Mem0
```python
def store_writing_preferences():
@@ -60,7 +60,7 @@ def store_writing_preferences():
return response
```
-## **Editing Content Using Stored Preferences**
+## Editing Content Using Stored Preferences
```python
def apply_writing_style(original_content):
@@ -111,7 +111,7 @@ Preferences:
return clean_response
```
-## **Complete Workflow: Content Editing**
+## Complete Workflow: Content Editing
```python
def content_writing_workflow(content):
@@ -136,7 +136,7 @@ def content_writing_workflow(content):
return edited_content
```
-## **Example Usage**
+## Example Usage
```python
# Define your document
@@ -156,11 +156,11 @@ We plan to launch the campaign in July and continue through September.
result = content_writing_workflow(original_content)
```
-## **Expected Output**
+## Expected Output
Your document will be transformed into a structured, well-formatted version based on your preferences.
-### **Original Document**
+### Original Document
```
Project Proposal
@@ -174,37 +174,38 @@ Expand our social media following
We plan to launch the campaign in July and continue through September.
```
-### **Edited Document**
-```
-# **Project Proposal**
+### Edited Document
-## **Q3 Marketing Campaign Strategy**
+```
+# Project Proposal
+
+## Q3 Marketing Campaign Strategy
This proposal outlines our strategy for the Q3 marketing campaign. We aim to significantly increase our market share with this approach.
-### **Objectives**
+### Objectives
- **Increase Brand Awareness**: Implement targeted advertising and community engagement to enhance visibility.
- **Boost Sales by 15%**: Increase sales by 15% compared to Q2 figures.
- **Expand Social Media Following**: Grow our social media audience by 20%.
-### **Timeline**
+### Timeline
- **Launch Date**: July
- **Duration**: July – September
-### **Key Actions**
+### Key Actions
- **Targeted Advertising**: Utilize platforms like Google Ads and Facebook to reach specific demographics.
- **Community Engagement**: Host webinars and live Q&A sessions.
- **Content Creation**: Produce engaging videos and infographics.
-### **Supporting Data**
+### Supporting Data
- **Previous Campaign Success**: Our Q2 campaign increased sales by 12%. We will refine similar strategies for Q3.
- **Social Media Growth**: Last year, our Instagram followers grew by 25% during a similar campaign.
-### **Conclusion**
+### Conclusion
We believe this strategy will effectively increase our market share. To achieve these goals, we need your support and collaboration. Let’s work together to make this campaign a success. Please review the proposal and provide your feedback by the end of the week.
```
diff --git a/docs/examples/multimodal-demo.mdx b/docs/examples/multimodal-demo.mdx
index ad5bbf776..cbafbd843 100644
--- a/docs/examples/multimodal-demo.mdx
+++ b/docs/examples/multimodal-demo.mdx
@@ -2,24 +2,24 @@
title: Multimodal Demo with Mem0
---
-Enhance your AI interactions with **Mem0**'s multimodal capabilities. Mem0 now supports image understanding, allowing for richer context and more natural interactions across supported AI platforms.
+Enhance your AI interactions with Mem0's multimodal capabilities. Mem0 now supports image understanding, allowing for richer context and more natural interactions across supported AI platforms.
> Experience the power of multimodal AI! Test out Mem0's image understanding capabilities at [multimodal-demo.mem0.ai](https://multimodal-demo.mem0.ai)
## Features
-- **Image Understanding**: Share and discuss images with AI assistants while maintaining context.
-- **Smart Visual Context**: Automatically capture and reference visual elements in conversations.
-- **Cross-Modal Memory**: Link visual and textual information seamlessly in your memory layer.
-- **Cross-Session Recall**: Reference previously discussed visual content across different conversations.
-- **Seamless Integration**: Works naturally with existing chat interfaces for a smooth experience.
+- **Image Understanding**: Share and discuss images with AI assistants while maintaining context
+- **Smart Visual Context**: Automatically capture and reference visual elements in conversations
+- **Cross-Modal Memory**: Link visual and textual information seamlessly in your memory layer
+- **Cross-Session Recall**: Reference previously discussed visual content across different conversations
+- **Seamless Integration**: Works naturally with existing chat interfaces for a smooth experience
## How It Works
-1. **Upload Visual Content**: Simply drag and drop or paste images into your conversations.
-2. **Natural Interaction**: Discuss the visual content naturally with AI assistants.
-3. **Memory Integration**: Visual context is automatically stored and linked with your conversation history.
-4. **Persistent Recall**: Retrieve and reference past visual content effortlessly.
+1. **Upload Visual Content**: Simply drag and drop or paste images into your conversations
+2. **Natural Interaction**: Discuss the visual content naturally with AI assistants
+3. **Memory Integration**: Visual context is automatically stored and linked with your conversation history
+4. **Persistent Recall**: Retrieve and reference past visual content effortlessly
## Demo Video
diff --git a/docs/examples/openai-inbuilt-tools.mdx b/docs/examples/openai-inbuilt-tools.mdx
index e1afa6b90..edecca381 100644
--- a/docs/examples/openai-inbuilt-tools.mdx
+++ b/docs/examples/openai-inbuilt-tools.mdx
@@ -35,7 +35,7 @@ const openAIClient = new OpenAI();
const mem0Client = new MemoryClient(mem0Config);
```
-### Adding Memories
+## Adding Memories
Store user preferences, past interactions, or any relevant information:
@@ -84,7 +84,7 @@ await addUserPreferences();
]
```
-### Retrieving Memories
+## Retrieving Memories
Search for relevant memories based on the current user input:
@@ -92,7 +92,7 @@ Search for relevant memories based on the current user input:
const relevantMemories = await mem0Client.search(userInput, mem0Config);
```
-### Structured Responses with Zod
+## Structured Responses with Zod
Define structured response schemas to get consistent output formats:
@@ -125,7 +125,7 @@ const response = await openAIClient.responses.create({
});
```
-### Using Web Search
+## Using Web Search
Combine memory with web search for up-to-date recommendations:
@@ -139,7 +139,7 @@ const response = await openAIClient.responses.create({
## Examples
-### Complete Car Recommendation System
+## Complete Car Recommendation System
```javascript
import MemoryClient from "mem0ai";
@@ -230,7 +230,7 @@ const getMemoryString = (memories) => {
run().catch(console.error);
```
-### Responses
+## Responses
```json Without Memories
diff --git a/docs/examples/personal-ai-tutor.mdx b/docs/examples/personal-ai-tutor.mdx
index 220577aa7..f432137fb 100644
--- a/docs/examples/personal-ai-tutor.mdx
+++ b/docs/examples/personal-ai-tutor.mdx
@@ -9,6 +9,7 @@ You can create a personalized AI Tutor using Mem0. This guide will walk you thro
The Personalized AI Tutor leverages Mem0 to retain information across interactions, enabling a tailored learning experience. By integrating with OpenAI's GPT-4 model, the tutor can provide detailed and context-aware responses to user queries.
## Setup
+
Before you begin, ensure you have the required dependencies installed. You can install the necessary packages using pip:
```bash
@@ -100,12 +101,12 @@ for m in memories['results']:
print(m['memory'])
```
-### Key Points
+## Key Points
-- **Initialization**: The PersonalAITutor class is initialized with the necessary memory configuration and OpenAI client setup.
-- **Asking Questions**: The ask method sends a question to the AI and stores the relevant information in memory.
-- **Retrieving Memories**: The get_memories method fetches all stored memories associated with a user.
+- **Initialization**: The PersonalAITutor class is initialized with the necessary memory configuration and OpenAI client setup
+- **Asking Questions**: The ask method sends a question to the AI and stores the relevant information in memory
+- **Retrieving Memories**: The get_memories method fetches all stored memories associated with a user
-### Conclusion
+## Conclusion
As the conversation progresses, Mem0's memory automatically updates based on the interactions, providing a continuously improving personalized learning experience. This setup ensures that the AI Tutor can offer contextually relevant and accurate responses, enhancing the overall educational process.
diff --git a/docs/examples/personalized-deep-research.mdx b/docs/examples/personalized-deep-research.mdx
index 66ac2f718..28b5aa1b9 100644
--- a/docs/examples/personalized-deep-research.mdx
+++ b/docs/examples/personalized-deep-research.mdx
@@ -4,7 +4,7 @@ title: Personalized Deep Research
Deep Research is an intelligent agent that synthesizes large amounts of online data and completes complex research tasks, customized to your unique preferences and insights. Built on Mem0's technology, it enhances AI-driven online exploration with personalized memories.
-You can checkout GitHub repositry here: [Personalized Deep Research](https://github.com/mem0ai/personalized-deep-research/tree/mem0)
+You can check out the GitHub repository here: [Personalized Deep Research](https://github.com/mem0ai/personalized-deep-research/tree/mem0)
## Overview
@@ -59,7 +59,6 @@ Watch Deep Research in action:
- **Technical Research**: Technology evaluation, solution comparison
- **Business Research**: Strategic planning, opportunity analysis
-
## Try It Out
> To try it yourself, clone the repository and follow the instructions in the README to run it locally or deploy it.
diff --git a/docs/examples/personalized-search-tavily-mem0.mdx b/docs/examples/personalized-search-tavily-mem0.mdx
index c8d955335..895f4d446 100644
--- a/docs/examples/personalized-search-tavily-mem0.mdx
+++ b/docs/examples/personalized-search-tavily-mem0.mdx
@@ -4,19 +4,19 @@ title: 'Personalized Search with Mem0 and Tavily'
-Imagine asking a search assistant for "coffee shops nearby" and instead of generic results, it shows remote-work-friendly cafes with great wifi in your city because it remembers you mentioned working remotely before. Or when you search for "lunchbox ideas for kids" it knows you have a **7-year-old daughter** and recommends **peanut-free options** that align with her allergy.
+Imagine asking a search assistant for "coffee shops nearby" and instead of generic results, it shows remote-work-friendly cafes with great WiFi in your city because it remembers you mentioned working remotely before. Or when you search for "lunchbox ideas for kids" it knows you have a 7-year-old daughter and recommends peanut-free options that align with her allergy.
-That's what we are going to build today, a **Personalized Search Assistant** powered by **Mem0** for memory and [Tavily](https://tavily.com) for real-time search.
+That's what we are going to build today, a Personalized Search Assistant powered by Mem0 for memory and [Tavily](https://tavily.com) for real-time search.
## Why Personalized Search
-Most assistants treat every query like they’ve never seen you before. That means repeating yourself about your location, diet, or preferences, and getting results that feel generic.
+Most assistants treat every query like they've never seen you before. That means repeating yourself about your location, diet, or preferences, and getting results that feel generic.
-- With **Mem0**, your assistant builds a memory of the user’s world.
-- With **Tavily**, it fetches fresh and accurate results in real time.
+- With Mem0, your assistant builds a memory of the user's world.
+- With Tavily, it fetches fresh and accurate results in real time.
-Together, they make every interaction **smarter, faster, and more personal**.
+Together, they make every interaction smarter, faster, and more personal.
## Prerequisites
@@ -55,7 +55,7 @@ and extract facts and memories accordingly.
'''
)
```
-Now, if a user casually mentions "I need to pick up my daughter", or "What's the weather at Los Angeles", Mem0 remembers they have a daughter or user is somewhat interested/connected with Los Angeles in terms of location, those will be referred for future searches.
+Now, if a user casually mentions "I need to pick up my daughter" or "What's the weather at Los Angeles", Mem0 remembers they have a daughter or the user is interested in or connected with Los Angeles in terms of location. These details will be referenced for future searches.
### 2. Simulating User History
To test personalization, we preload some sample conversation history for a user:
@@ -173,17 +173,19 @@ if __name__ == "__main__":
```
## How It Works in Practice
-Here’s how personalization plays out:
-- Context Gathering: User previously mentioned living in Los Angeles, being vegan, and having a 7-year-old daughter allergic to peanuts.
-- Enhanced Search Query:
-Query -> "good coffee shops nearby for working"
-Enhanced Query -> "good coffee shops in Los Angeles with strong wifi, remote-work-friendly"
-- Personalized Results: The assistant only returns wifi-friendly, work-friendly cafes near Los Angeles.
-- Memory Update: Interaction is saved for better future recommendations.
+Here's how personalization plays out:
+
+- **Context Gathering**: User previously mentioned living in Los Angeles, being vegan, and having a 7-year-old daughter allergic to peanuts.
+- **Enhanced Search Query**:
+ - Query: "good coffee shops nearby for working"
+ - Enhanced Query: "good coffee shops in Los Angeles with strong WiFi, remote-work-friendly"
+- **Personalized Results**: The assistant only returns WiFi-friendly, work-friendly cafes near Los Angeles.
+- **Memory Update**: Interaction is saved for better future recommendations.
## Conclusion
-With Mem0 + Tavily, you can build a search assistant that doesn’t just fetch results but it understands the person behind the query.
+
+With Mem0 and Tavily, you can build a search assistant that doesn't just fetch results but understands the person behind the query.
Whether for shopping, travel, or daily life, this approach turns a generic search into a truly personalized experience.
diff --git a/docs/examples/youtube-assistant.mdx b/docs/examples/youtube-assistant.mdx
index ffea6fd68..0c6d37f2e 100644
--- a/docs/examples/youtube-assistant.mdx
+++ b/docs/examples/youtube-assistant.mdx
@@ -2,7 +2,7 @@
title: YouTube Assistant Extension
---
-Enhance your YouTube experience with Mem0's **YouTube Assistant**, a Chrome extension that brings AI-powered chat directly to your YouTube videos. Get instant, personalized answers about video content while leveraging your own knowledge and memories - all without leaving the page.
+Enhance your YouTube experience with Mem0's YouTube Assistant, a Chrome extension that brings AI-powered chat directly to your YouTube videos. Get instant, personalized answers about video content while leveraging your own knowledge and memories, all without leaving the page.
## Features
@@ -29,12 +29,12 @@ This extension is not available on the Chrome Web Store yet. You can install it
### Manual Installation (Developer Mode)
-1. **Download the Extension**: Clone or download the extension files from the [Mem0 GitHub repository](https://github.com/mem0ai/mem0/tree/main/examples).
-2. **Build**: Run `npm install` followed by `npm run build` to install the dependencies and build the extension.
-3. **Access Chrome Extensions**: Open Google Chrome and navigate to `chrome://extensions`.
-4. **Enable Developer Mode**: Toggle the "Developer mode" switch in the top right corner.
-5. **Load Unpacked Extension**: Click "Load unpacked" and select the directory containing the extension files.
-6. **Confirm Installation**: The Mem0 YouTube Assistant Extension should now appear in your Chrome toolbar.
+1. **Download the Extension**: Clone or download the extension files from the [Mem0 GitHub repository](https://github.com/mem0ai/mem0/tree/main/examples)
+2. **Build**: Run `npm install` followed by `npm run build` to install the dependencies and build the extension
+3. **Access Chrome Extensions**: Open Google Chrome and navigate to `chrome://extensions`
+4. **Enable Developer Mode**: Toggle the "Developer mode" switch in the top right corner
+5. **Load Unpacked Extension**: Click "Load unpacked" and select the directory containing the extension files
+6. **Confirm Installation**: The Mem0 YouTube Assistant Extension should now appear in your Chrome toolbar
## Setup
@@ -50,7 +50,6 @@ This extension is not available on the Chrome Web Store yet. You can install it
- "How does this relate to what I already know?"
- "What are some practical applications of this topic related to my work?"
-
## Privacy and Data Security
Your API keys are stored locally in your browser. Your messages are sent to the Mem0 API for extracting and retrieving memories. Mem0 is committed to ensuring your data's privacy and security.
diff --git a/docs/faqs.mdx b/docs/faqs.mdx
index 6c4fc756f..40bd791ff 100644
--- a/docs/faqs.mdx
+++ b/docs/faqs.mdx
@@ -21,10 +21,10 @@ iconType: "solid"
- **Developer-Friendly API**: Offers a straightforward API for seamless integration into various applications.
- **Platform Consistency**: Ensures consistent behavior and data across different platforms and devices.
- **Managed Service**: Provides a hosted solution for easy deployment and maintenance.
- - **Save Costs**: Saves costs by adding relevant memories instead of complete transcripts to context window
+ - **Cost Savings**: Saves costs by adding relevant memories instead of complete transcripts to context window
-
+
Mem0's memory implementation for Large Language Models (LLMs) offers several advantages over Retrieval-Augmented Generation (RAG):
- **Entity Relationships**: Mem0 can understand and relate entities across different interactions, unlike RAG which retrieves information from static documents. This leads to a deeper understanding of context and relationships.
diff --git a/docs/integrations/agentops.mdx b/docs/integrations/agentops.mdx
index ba25c4057..3791423f7 100644
--- a/docs/integrations/agentops.mdx
+++ b/docs/integrations/agentops.mdx
@@ -163,11 +163,10 @@ Organize your monitoring with structured sessions:
4. **Tagging**: Use tags to organize different types of memory operations
5. **Environment Separation**: Use different projects or tags for dev/staging/prod
-## Help & Resources
+## Help
- [AgentOps Documentation](https://docs.agentops.ai/)
- [AgentOps Dashboard](https://app.agentops.ai/)
- [Mem0 Platform](https://app.mem0.ai/)
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/docs/integrations/agno.mdx b/docs/integrations/agno.mdx
index e7d53bcca..8cd91bd8a 100644
--- a/docs/integrations/agno.mdx
+++ b/docs/integrations/agno.mdx
@@ -2,7 +2,7 @@
title: Agno
---
-This integration of [**Mem0**](https://github.com/mem0ai/mem0) with [Agno](https://github.com/agno-agi/agno, enables persistent, multimodal memory for Agno-based agents - improving personalization, context awareness, and continuity across conversations.
+This integration of [**Mem0**](https://github.com/mem0ai/mem0) with [Agno](https://github.com/agno-agi/agno) enables persistent, multimodal memory for Agno-based agents - improving personalization, context awareness, and continuity across conversations.
## Overview
@@ -195,7 +195,7 @@ Customize the integration to your needs:
- **Memory Search**: Configure search relevance and result count
- **Memory Formatting**: Support for various OpenAI message formats
-## Help & Resources
+## Help
- [Agno Documentation](https://docs.agno.com/introduction)
- [Mem0 Platform](https://app.mem0.ai/)
diff --git a/docs/integrations/autogen.mdx b/docs/integrations/autogen.mdx
index 5c708e8dc..b645fa915 100644
--- a/docs/integrations/autogen.mdx
+++ b/docs/integrations/autogen.mdx
@@ -6,8 +6,7 @@ Build conversational AI agents with memory capabilities. This integration combin
## Overview
-In this guide, we'll explore an example of creating a conversational AI system with memory:
-- A customer service bot that can recall previous interactions and provide personalized responses.
+This guide demonstrates creating a conversational AI system with memory. We'll build a customer service bot that can recall previous interactions and provide personalized responses.
## Setup and Configuration
@@ -133,6 +132,4 @@ This integration enables the creation of more intelligent and personalized AI ag
## Help
-In case of any questions, please feel free to reach out to us using one of the following methods:
-
diff --git a/docs/integrations/aws-bedrock.mdx b/docs/integrations/aws-bedrock.mdx
index 4c6b9bec7..b4498cb07 100644
--- a/docs/integrations/aws-bedrock.mdx
+++ b/docs/integrations/aws-bedrock.mdx
@@ -29,9 +29,9 @@ Install required packages:
pip install mem0ai boto3 opensearch-py
```
-Set environment variables:
+Set environment variables.
-Be sure to configure your AWS credentials using environment variables, IAM roles, or the AWS CLI.
+Configure your AWS credentials using environment variables, IAM roles, or the AWS CLI.
```python
import os
diff --git a/docs/integrations/crewai.mdx b/docs/integrations/crewai.mdx
index 3f69fcefc..17d0a664f 100644
--- a/docs/integrations/crewai.mdx
+++ b/docs/integrations/crewai.mdx
@@ -60,9 +60,9 @@ messages = [
{"role": "user", "content": "I am more of a beach person than a mountain person."},
{
"role": "assistant",
- "content": "That's interesting. Do you like hotels or airbnb?",
+ "content": "That's interesting. Do you like hotels or Airbnb?",
},
- {"role": "user", "content": "I like airbnb more."},
+ {"role": "user", "content": "I like Airbnb more."},
]
store_user_preferences("crew_user_1", messages)
@@ -154,7 +154,7 @@ if __name__ == "__main__":
## Benefits
1. **Persistent Context & Memory**: Maintains user preferences and interaction history across sessions
-2. **Flexible & Scalable Design**: Easily extendable with new agents, tasks and capabilities
+2. **Flexible & Scalable Design**: Easily extendable with new agents, tasks, and capabilities
## Conclusion
diff --git a/docs/integrations/elevenlabs.mdx b/docs/integrations/elevenlabs.mdx
index ede81687b..a1ef354dd 100644
--- a/docs/integrations/elevenlabs.mdx
+++ b/docs/integrations/elevenlabs.mdx
@@ -447,8 +447,7 @@ By integrating ElevenLabs Conversational AI with Mem0, you can create voice agen
## Help
-- For more details on ElevenLabs, visit the [ElevenLabs Conversational AI Documentation](https://elevenlabs.io/docs/api-reference/conversational-ai)
-- For Mem0 documentation, refer to the [Mem0 Platform](https://app.mem0.ai/)
-- If you need further assistance, please feel free to reach out to us through the following methods:
+- [ElevenLabs Conversational AI Documentation](https://elevenlabs.io/docs/api-reference/conversational-ai)
+- [Mem0 Platform](https://app.mem0.ai/)
\ No newline at end of file
diff --git a/docs/integrations/flowise.mdx b/docs/integrations/flowise.mdx
index 9f1d747d9..d21b2b7f5 100644
--- a/docs/integrations/flowise.mdx
+++ b/docs/integrations/flowise.mdx
@@ -6,11 +6,11 @@ The [**Mem0 Memory**](https://github.com/mem0ai/mem0) integration with [Flowise]
## Overview
-1. 🧠 Provides persistent memory storage for Flowise chatflows
-2. 🔄 Seamless integration with existing Flowise templates
-3. 🚀 Compatible with various LLM nodes in Flowise
-4. 📝 Supports custom memory configurations
-5. ⚡ Easy to set up and manage
+1. Provides persistent memory storage for Flowise chatflows
+2. Seamless integration with existing Flowise templates
+3. Compatible with various LLM nodes in Flowise
+4. Supports custom memory configurations
+5. Easy to set up and manage
## Prerequisites
@@ -115,12 +115,11 @@ Additional settings available in [Mem0 Project Settings](https://app.mem0.ai/das
2. **Memory Organization**: Utilize projects and organizations for better memory management
3. **Regular Maintenance**: Monitor and clean up unused memories periodically
-## Help & Resources
+## Help
- [Flowise Documentation](https://flowiseai.com/docs)
- [Flowise GitHub Repository](https://github.com/FlowiseAI/Flowise)
- [Flowise Website](https://flowiseai.com/)
- [Mem0 Platform](https://app.mem0.ai/)
-- Need assistance? Reach out through:
\ No newline at end of file
diff --git a/docs/integrations/google-ai-adk.mdx b/docs/integrations/google-ai-adk.mdx
index b1832a85d..a7a5ff52d 100644
--- a/docs/integrations/google-ai-adk.mdx
+++ b/docs/integrations/google-ai-adk.mdx
@@ -9,7 +9,7 @@ Integrate [**Mem0**](https://github.com/mem0ai/mem0) with [Google Agent Developm
1. Store and retrieve memories from Mem0 within Google ADK agents
2. Multi-agent workflows with shared memory across hierarchies
3. Retrieve relevant memories from past conversations
-4. Personalized responses
+4. Personalized responses based on user history
## Prerequisites
@@ -130,9 +130,9 @@ from google.adk.tools.agent_tool import AgentTool
travel_agent = Agent(
name="travel_specialist",
model="gemini-2.0-flash",
- instruction="""You are a travel planning specialist. Use get_user_context to
+ instruction="""You are a travel planning specialist. Use search_memory to
understand the user's travel preferences and history before making recommendations.
- After providing advice, use store_interaction to save travel-related information.""",
+ After providing advice, use save_memory to save travel-related information.""",
description="Specialist in travel planning and recommendations",
tools=[search_memory, save_memory]
)
@@ -141,9 +141,9 @@ travel_agent = Agent(
health_agent = Agent(
name="health_advisor",
model="gemini-2.0-flash",
- instruction="""You are a health and wellness advisor. Use get_user_context to
+ instruction="""You are a health and wellness advisor. Use search_memory to
understand the user's health goals and dietary preferences.
- After providing advice, use store_interaction to save health-related information.""",
+ After providing advice, use save_memory to save health-related information.""",
description="Specialist in health and wellness advice",
tools=[search_memory, save_memory]
)
@@ -155,7 +155,7 @@ coordinator_agent = Agent(
instruction="""You are a coordinator that delegates requests to specialist agents.
For travel-related questions (trips, hotels, flights, destinations), delegate to the travel specialist.
For health-related questions (fitness, diet, wellness, exercise), delegate to the health advisor.
- Use get_user_context to understand the user before delegation.""",
+ Use search_memory to understand the user before delegation.""",
description="Coordinates requests between specialist agents",
tools=[
AgentTool(agent=travel_agent, skip_summarization=False),
@@ -282,6 +282,5 @@ os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
- [Google ADK Documentation](https://google.github.io/adk-docs/)
- [Mem0 Platform](https://app.mem0.ai/)
-- If you need further assistance, please feel free to reach out to us through the following methods:
\ No newline at end of file
diff --git a/docs/integrations/keywords.mdx b/docs/integrations/keywords.mdx
index fff71f1ec..c9783ef02 100644
--- a/docs/integrations/keywords.mdx
+++ b/docs/integrations/keywords.mdx
@@ -94,7 +94,7 @@ client = OpenAI(
# Sample conversation messages
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."}
]
@@ -133,7 +133,6 @@ Integrating Mem0 with Keywords AI provides a powerful combination for building A
## Help
-For more information, refer to:
- [Keywords AI Documentation](https://docs.keywordsai.co)
- [Mem0 Platform](https://app.mem0.ai/)
diff --git a/docs/integrations/langchain-tools.mdx b/docs/integrations/langchain-tools.mdx
index 62b3b0d71..5c7b57e82 100644
--- a/docs/integrations/langchain-tools.mdx
+++ b/docs/integrations/langchain-tools.mdx
@@ -331,6 +331,4 @@ Each tool provides structured input validation through Pydantic models and retur
## Help
-In case of any questions, please feel free to reach out to us using one of the following methods:
-
diff --git a/docs/integrations/langchain.mdx b/docs/integrations/langchain.mdx
index 87db5076a..23da9c220 100644
--- a/docs/integrations/langchain.mdx
+++ b/docs/integrations/langchain.mdx
@@ -163,9 +163,8 @@ By integrating LangChain with Mem0, you can build a personalized Travel Agent AI
## Help
-- For more details on LangChain, visit the [LangChain documentation](https://python.langchain.com/).
-- [Mem0 Platform](https://app.mem0.ai/).
-- If you need further assistance, please feel free to reach out to us through the following methods:
+- [LangChain Documentation](https://python.langchain.com/)
+- [Mem0 Platform](https://app.mem0.ai/)
diff --git a/docs/integrations/langgraph.mdx b/docs/integrations/langgraph.mdx
index 7e3f8027c..17e80aa75 100644
--- a/docs/integrations/langgraph.mdx
+++ b/docs/integrations/langgraph.mdx
@@ -165,8 +165,7 @@ By integrating LangGraph with Mem0, you can build a personalized Customer Suppor
## Help
-- For more details on LangGraph, visit the [LangChain documentation](https://python.langchain.com/docs/langgraph).
-- [Mem0 Platform](https://app.mem0.ai/).
-- If you need further assistance, please feel free to reach out to us through following methods:
+- [LangGraph Documentation](https://python.langchain.com/docs/langgraph)
+- [Mem0 Platform](https://app.mem0.ai/)
diff --git a/docs/integrations/livekit.mdx b/docs/integrations/livekit.mdx
index ad44235e5..2e5961585 100644
--- a/docs/integrations/livekit.mdx
+++ b/docs/integrations/livekit.mdx
@@ -33,7 +33,7 @@ MEM0_API_KEY=your_mem0_api_key
OPENAI_API_KEY=your_openai_api_key
```
-> **Note**: Make sure to have a Livekit and Deepgram account. You can find these variables `LIVEKIT_URL` , `LIVEKIT_API_KEY` and `LIVEKIT_API_SECRET` from [LiveKit Cloud Console](https://cloud.livekit.io/) and for more information you can refer this website [LiveKit Documentation](https://docs.livekit.io/home/cloud/keys-and-tokens/). For `DEEPGRAM_API_KEY` you can get from [Deepgram Console](https://console.deepgram.com/) refer this website [Deepgram Documentation](https://developers.deepgram.com/docs/create-additional-api-keys) for more details.
+> **Note**: Make sure to have a Livekit and Deepgram account. You can find these variables `LIVEKIT_URL`, `LIVEKIT_API_KEY`, and `LIVEKIT_API_SECRET` from the [LiveKit Cloud Console](https://cloud.livekit.io/). For more information, refer to the [LiveKit Documentation](https://docs.livekit.io/home/cloud/keys-and-tokens/). For `DEEPGRAM_API_KEY`, you can get it from the [Deepgram Console](https://console.deepgram.com/). Refer to the [Deepgram Documentation](https://developers.deepgram.com/docs/create-additional-api-keys) for more details.
## Code Breakdown
@@ -196,7 +196,7 @@ or to start your agent in console mode to run inside your terminal:
```sh
python mem0-livekit-voice-agent.py console
```
-5. After the script starts, you can interact with the voice agent using [Livekit's Agent Platform](https://agents-playground.livekit.io/) and connect to the agent inorder to start conversations.
+5. After the script starts, you can interact with the voice agent using [LiveKit's Agent Platform](https://agents-playground.livekit.io/) and connect to the agent to start conversations.
## Best Practices for Voice Agents with Memory
@@ -229,10 +229,9 @@ logger = logging.getLogger("memory_voice_agent")
- Ensure your `.env` file is correctly configured and loaded.
-## Help & Resources
+## Help
- [LiveKit Documentation](https://docs.livekit.io/)
- [Mem0 Platform](https://app.mem0.ai/)
-- Need assistance? Reach out through:
diff --git a/docs/integrations/llama-index.mdx b/docs/integrations/llama-index.mdx
index 8316a449d..ec20a3b83 100644
--- a/docs/integrations/llama-index.mdx
+++ b/docs/integrations/llama-index.mdx
@@ -5,7 +5,7 @@ title: LlamaIndex
LlamaIndex supports Mem0 as a [memory store](https://llamahub.ai/l/memory/llama-index-memory-mem0). In this guide, we'll show you how to use it.
- 🎉 Exciting news! [**Mem0Memory**](https://docs.llamaindex.ai/en/stable/examples/memory/Mem0Memory/) now supports **ReAct** and **FunctionCalling** agents.
+ [**Mem0Memory**](https://docs.llamaindex.ai/en/stable/examples/memory/Mem0Memory/) now supports **ReAct** and **FunctionCalling** agents.
### Installation
@@ -207,9 +207,8 @@ By integrating LlamaIndex with Mem0, you can build a personalized agent that can
## Help
-- For more details on LlamaIndex, visit the [LlamaIndex documentation](https://llamahub.ai/l/memory/llama-index-memory-mem0).
-- [Mem0 Platform](https://app.mem0.ai/).
-- If you need further assistance, please feel free to reach out to us through following methods:
+- [LlamaIndex Documentation](https://llamahub.ai/l/memory/llama-index-memory-mem0)
+- [Mem0 Platform](https://app.mem0.ai/)
diff --git a/docs/integrations/mastra.mdx b/docs/integrations/mastra.mdx
index 9b126a44a..bcb480088 100644
--- a/docs/integrations/mastra.mdx
+++ b/docs/integrations/mastra.mdx
@@ -127,8 +127,7 @@ By integrating Mastra with Mem0, you can build intelligent agents that learn and
## Help
-- For more details on Mastra, visit the [Mastra documentation](https://docs.mastra.ai/).
-- [Mem0 Platform](https://app.mem0.ai/).
-- If you need further assistance, please feel free to reach out to us through the following methods:
+- [Mastra Documentation](https://docs.mastra.ai/)
+- [Mem0 Platform](https://app.mem0.ai/)
\ No newline at end of file
diff --git a/docs/integrations/openai-agents-sdk.mdx b/docs/integrations/openai-agents-sdk.mdx
index 084a89607..0bfa129c0 100644
--- a/docs/integrations/openai-agents-sdk.mdx
+++ b/docs/integrations/openai-agents-sdk.mdx
@@ -130,9 +130,9 @@ health_agent = Agent(
triage_agent = Agent(
name="Personal Assistant",
instructions="""You are a helpful personal assistant that routes requests to specialists.
- For travel-related questions (trips, hotels, flights, destinations), hand off to Travel Planner.
- For health-related questions (fitness, diet, wellness, exercise), hand off to Health Advisor.
- For general questions, you can handle them directly using available tools.""",
+ For travel-related questions (trips, hotels, flights, destinations), hand off to the Travel Planner.
+ For health-related questions (fitness, diet, wellness, exercise), hand off to the Health Advisor.
+ For general questions, handle them directly using available tools.""",
handoffs=[travel_agent, health_agent],
model="gpt-4o"
)
@@ -201,7 +201,7 @@ if __name__ == "__main__":
- **Seamless Handoffs**: Agents maintain context across handoffs
### 3. Flexible Memory Operations
-- **Retrieve Capabilities**: Retrieve relevant memories from previous conversation
+- **Retrieve Capabilities**: Retrieve relevant memories from previous conversations
- **User Segmentation**: Organize memories by user ID
- **Memory Management**: Built-in tools for saving and retrieving information
@@ -229,6 +229,5 @@ mem0.add(
- [OpenAI Agents SDK Documentation](https://openai.github.io/openai-agents-python/)
- [Mem0 Platform](https://app.mem0.ai/)
-- If you need further assistance, please feel free to reach out to us through the following methods:
\ No newline at end of file
diff --git a/docs/integrations/raycast.mdx b/docs/integrations/raycast.mdx
index 456bf14df..5e589b4eb 100644
--- a/docs/integrations/raycast.mdx
+++ b/docs/integrations/raycast.mdx
@@ -24,21 +24,21 @@ d. Enter this key in the extension preferences
- Manage persistent user preferences
- Search through stored memories
-## ✨ Features
+## Features
-**Remember Everything**: Never lose important information - store notes, preferences, and conversations that your AI can recall later
+**Remember Everything**: Never lose important information. Store notes, preferences, and conversations that your AI can recall later.
-**Smart Connections**: Automatically links related topics, just like your brain does - helping you discover useful connections
+**Smart Connections**: Automatically links related topics, helping you discover useful connections.
-**Cost Saver**: Spend less on AI usage by efficiently retrieving relevant information instead of regenerating responses
+**Cost Saver**: Spend less on AI usage by efficiently retrieving relevant information instead of regenerating responses.
-## 🔑 How This Helps You
+## How This Helps You
-**More Personal Experience**: Your AI remembers your preferences and past conversations, making interactions feel more natural
+**More Personal Experience**: Your AI remembers your preferences and past conversations, making interactions feel more natural.
-**Learn Your Style**: Adapts to how you work and what you like, becoming more helpful over time
+**Learn Your Style**: Adapts to how you work and what you like, becoming more helpful over time.
-**No More Repetition**: Stop explaining the same things over and over - your AI remembers your context and preferences
+**No More Repetition**: Stop explaining the same things repeatedly. Your AI remembers your context and preferences.
---
diff --git a/docs/integrations/vercel-ai-sdk.mdx b/docs/integrations/vercel-ai-sdk.mdx
index 29d18c392..ab486211e 100644
--- a/docs/integrations/vercel-ai-sdk.mdx
+++ b/docs/integrations/vercel-ai-sdk.mdx
@@ -5,16 +5,16 @@ title: Vercel AI SDK
The [**Mem0 AI SDK Provider**](https://www.npmjs.com/package/@mem0/vercel-ai-provider) is a library developed by **Mem0** to integrate with the Vercel AI SDK. This library brings enhanced AI interaction capabilities to your applications by introducing persistent memory functionality.
- 🎉 Exciting news! Mem0 AI SDK now supports Vercel AI SDK V5.
+ Mem0 AI SDK now supports Vercel AI SDK V5.
## Overview
-1. 🧠 Offers persistent memory storage for conversational AI
-2. 🔄 Enables smooth integration with the Vercel AI SDK
-3. 🚀 Ensures compatibility with multiple LLM providers
-4. 📝 Supports structured message formats for clarity
-5. ⚡ Facilitates streaming response capabilities
+1. Offers persistent memory storage for conversational AI
+2. Enables smooth integration with the Vercel AI SDK
+3. Ensures compatibility with multiple LLM providers
+4. Supports structured message formats for clarity
+5. Facilitates streaming response capabilities
## Setup and Configuration
@@ -318,8 +318,7 @@ Mem0’s Vercel AI SDK enables the creation of intelligent, context-aware applic
## Help
-- For more details on Vercel AI SDK, visit the [Vercel AI SDK documentation](https://sdk.vercel.ai/docs/introduction)
+- [Vercel AI SDK Documentation](https://sdk.vercel.ai/docs/introduction)
- [Mem0 Platform](https://app.mem0.ai/)
-- If you need further assistance, please feel free to reach out to us through following methods:
\ No newline at end of file
diff --git a/docs/introduction.mdx b/docs/introduction.mdx
index 587202000..4f996c1e8 100644
--- a/docs/introduction.mdx
+++ b/docs/introduction.mdx
@@ -32,7 +32,7 @@ Mem0 sits alongside your retriever, planner, and LLM. Unlike retrieval-based sys
-Memory is not about pushing more tokens into a prompt but about intelligently remembering context that matters. This distinction matters:
+Memory isn't about pushing more tokens into a prompt—it's about intelligently remembering context that matters. This distinction is important:
| Capability | Context Window | Mem0 Memory |
|------------------|------------------------|-----------------------------|
@@ -55,12 +55,12 @@ Mem0 provides continuity. It stores decisions, preferences, and context—not ju
| Recall Type | Document lookup | Evolving user context |
| Use Case | Ground answers in data | Guide behavior across time |
-Together, they’re stronger: RAG informs the LLM; Mem0 shapes its memory.
+Together, they're stronger: RAG informs the LLM while Mem0 shapes its memory.
## Types of Memory in Mem0
-Mem0 supports different kinds of memory to mimic how humans store information:
+Mem0 supports different types of memory to mimic how humans store information:
- **Working Memory**: short-term session awareness
- **Factual Memory**: long-term structured knowledge (e.g., preferences, settings)
@@ -74,11 +74,11 @@ Mem0 isn’t a wrapper around a vector store. It’s a full memory engine with:
- **LLM-based extraction**: Intelligently decides what to remember
- **Filtering & decay**: Avoids memory bloat, forgets irrelevant info
-- **Costs Reduction**: Save compute costs with smart prompt injection of only relevant memories
+- **Cost Reduction**: Save compute costs with smart prompt injection of only relevant memories
- **Dashboards & APIs**: Observability, fine-grained control
- **Cloud and OSS**: Use our platform version or our open-source SDK version
-You plug Mem0 into your agent framework, it doesn’t replace your LLM or workflows. Instead, it adds a smart memory layer on top.
+Plug Mem0 into your agent framework—it doesn't replace your LLM or workflows. Instead, it adds a smart memory layer on top.
## Core Capabilities
diff --git a/docs/open-source/features/async-memory.mdx b/docs/open-source/features/async-memory.mdx
index 27437cb5f..2534413d9 100644
--- a/docs/open-source/features/async-memory.mdx
+++ b/docs/open-source/features/async-memory.mdx
@@ -7,7 +7,7 @@ iconType: "solid"
## AsyncMemory
-The `AsyncMemory` class is a direct asynchronous interface to Mem0's in-process memory operations. Unlike the memory, which interacts with an API, `AsyncMemory` works directly with the underlying storage systems. This makes it ideal for applications where you want to embed Mem0 directly into your codebase.
+The `AsyncMemory` class is a direct asynchronous interface to Mem0's in-process memory operations. Unlike the synchronous memory class, which interacts with an API, `AsyncMemory` works directly with the underlying storage systems. This makes it ideal for applications where you want to embed Mem0 directly into your codebase.
### Initialization
@@ -30,10 +30,10 @@ memory = AsyncMemory(config=custom_config)
### Key Features
-1. **Non-blocking Operations** - All memory operations use `asyncio` to avoid blocking the event loop
-2. **Concurrent Processing** - Parallel execution of vector store and graph operations
-3. **Efficient Resource Utilization** - Better handling of I/O bound operations
-4. **Compatible with Async Frameworks** - Seamless integration with FastAPI, aiohttp, and other async frameworks
+1. **Non-blocking Operations**: All memory operations use `asyncio` to avoid blocking the event loop.
+2. **Concurrent Processing**: Parallel execution of vector store and graph operations.
+3. **Efficient Resource Utilization**: Better handling of I/O-bound operations.
+4. **Compatible with Async Frameworks**: Seamless integration with FastAPI, aiohttp, and other async frameworks.
### Methods
@@ -182,7 +182,7 @@ except Exception as e:
### Example: Concurrent Usage with Other APIs
-`AsyncMemory` can be effectively combined with other async operations. Here's an example showing how to use it alongside OpenAI API calls in separate threads:
+`AsyncMemory` can be effectively combined with other async operations. Here's an example showing how to use it alongside OpenAI API calls:
```python Python
import asyncio
@@ -199,7 +199,7 @@ async def chat_with_memories(message: str, user_id: str = "default_user") -> str
relevant_memories = search_result["results"]
memories_str = "\n".join(f"- {entry['memory']}" for entry in relevant_memories)
- # Generate Assistant response
+ # Generate assistant response
system_prompt = f"You are a helpful AI. Answer the question based on query and memories.\nUser Memories:\n{memories_str}"
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": message}]
response = await async_openai_client.chat.completions.create(model="gpt-4o-mini", messages=messages)
diff --git a/docs/open-source/features/custom-fact-extraction-prompt.mdx b/docs/open-source/features/custom-fact-extraction-prompt.mdx
index 0587ff153..8c3bd75f5 100644
--- a/docs/open-source/features/custom-fact-extraction-prompt.mdx
+++ b/docs/open-source/features/custom-fact-extraction-prompt.mdx
@@ -7,8 +7,7 @@ iconType: "solid"
## Introduction to Custom Fact Extraction Prompt
-Custom fact extraction prompt allow you to tailor the behavior of your Mem0 instance to specific use cases or domains.
-By defining it, you can control how information is extracted from the user's message.
+Custom fact extraction prompts allow you to tailor the behavior of your Mem0 instance to specific use cases or domains. By defining them, you can control how information is extracted from the user's messages.
To create an effective custom fact extraction prompt:
1. Be specific about the information to extract.
@@ -146,8 +145,7 @@ await memory.add('Yesterday, I ordered a laptop, the order id is 12345', { userI
### Example 2
-In this example, we are adding a memory of a user liking to go on hikes. This add message is not specific to the use-case mentioned in the custom prompt.
-Hence, the memory is not added.
+In this example, we are adding a memory of a user liking to go on hikes. This message is not specific to the use case mentioned in the custom prompt. Hence, the memory is not added.
```python Python
diff --git a/docs/open-source/features/custom-update-memory-prompt.mdx b/docs/open-source/features/custom-update-memory-prompt.mdx
index cf0cd7611..1628a42ed 100644
--- a/docs/open-source/features/custom-update-memory-prompt.mdx
+++ b/docs/open-source/features/custom-update-memory-prompt.mdx
@@ -5,23 +5,18 @@ iconType: "solid"
---
-Update memory prompt is a prompt used to determine the action to be performed on the memory.
-By customizing this prompt, you can control how the memory is updated.
+The update memory prompt is used to determine the action to be performed on the memory. By customizing this prompt, you can control how the memory is updated.
+## Introduction
+
+The Mem0 memory system compares newly retrieved facts with existing memory and determines the action to be performed. The types of actions are:
+- **Add**: Add the newly retrieved facts to the memory.
+- **Update**: Update the existing memory with the newly retrieved facts.
+- **Delete**: Delete the existing memory.
+- **No Change**: Do not make any changes to the memory.
-## Introduction
-Mem0 memory system compares the newly retrieved facts with the existing memory and determines the action to be performed on the memory.
-The kinds of actions are:
-- Add
- - Add the newly retrieved facts to the memory.
-- Update
- - Update the existing memory with the newly retrieved facts.
-- Delete
- - Delete the existing memory.
-- No Change
- - Do not make any changes to the memory.
-
### Example
+
Example of a custom update memory prompt:
@@ -178,7 +173,8 @@ Please note to return the IDs in the output from the input IDs only and do not g
```
-## Output format
+## Output Format
+
The prompt needs to guide the output to follow the structure as shown below:
```json Add
@@ -232,10 +228,10 @@ The prompt needs to guide the output to follow the structure as shown below:
-## custom update memory prompt vs custom prompt
+## Custom Update Memory Prompt vs Custom Prompt
| Feature | `custom_update_memory_prompt` | `custom_prompt` |
|---------|-------------------------------|-----------------|
-| Use case | Determine the action to be performed on the memory | Extract the facts from messages |
+| Use case | Determine the action to be performed on the memory | Extract facts from messages |
| Reference | Retrieved facts from messages and old memory | Messages |
| Output | Action to be performed on the memory | Extracted facts |
\ No newline at end of file
diff --git a/docs/open-source/features/multimodal-support.mdx b/docs/open-source/features/multimodal-support.mdx
index 95abe1f23..cf83fd717 100644
--- a/docs/open-source/features/multimodal-support.mdx
+++ b/docs/open-source/features/multimodal-support.mdx
@@ -69,10 +69,10 @@ client.add(messages, user_id="alice")
## Supported Image Formats
Mem0 supports common image formats:
-- **JPEG/JPG** - Standard photos and images
-- **PNG** - Images with transparency support
-- **WebP** - Modern web-optimized format
-- **GIF** - Animated and static graphics
+- **JPEG/JPG**: Standard photos and images
+- **PNG**: Images with transparency support
+- **WebP**: Modern web-optimized format
+- **GIF**: Animated and static graphics
## Local Files vs URLs
@@ -224,9 +224,9 @@ client.add(messages, user_id="user123")
- **Resolution**: Images are automatically resized if needed
### Performance Tips
-1. **Compress large images** before sending to reduce processing time
-2. **Use appropriate formats** - JPEG for photos, PNG for graphics with text
-3. **Batch processing** - Send multiple images in separate requests for better reliability
+1. **Compress large images** before sending to reduce processing time.
+2. **Use appropriate formats**: JPEG for photos, PNG for graphics with text.
+3. **Batch processing**: Send multiple images in separate requests for better reliability.
## Error Handling
@@ -291,19 +291,19 @@ try {
## Best Practices
### Image Selection
-- **Use high-quality images** with clear, readable text and details
-- **Ensure good lighting** in photos for better text extraction
-- **Avoid heavily stylized fonts** that may be difficult to read
+- **Use high-quality images** with clear, readable text and details.
+- **Ensure good lighting** in photos for better text extraction.
+- **Avoid heavily stylized fonts** that may be difficult to read.
### Memory Context
-- **Provide context** about what information you want extracted
-- **Combine with text** to give Mem0 better understanding of the image's purpose
-- **Be specific** about what aspects of the image are important
+- **Provide context** about what information you want extracted.
+- **Combine with text** to give Mem0 better understanding of the image's purpose.
+- **Be specific** about what aspects of the image are important.
### Privacy and Security
-- **Avoid sensitive information** in images (SSN, passwords, private data)
-- **Use secure image hosting** for URLs to prevent unauthorized access
-- **Consider local processing** for highly sensitive visual content
+- **Avoid sensitive information** in images (SSN, passwords, private data).
+- **Use secure image hosting** for URLs to prevent unauthorized access.
+- **Consider local processing** for highly sensitive visual content.
Using these methods, you can seamlessly incorporate various visual content types into your interactions, further enhancing Mem0's multimodal capabilities for more comprehensive memory management.
diff --git a/docs/open-source/features/openai_compatibility.mdx b/docs/open-source/features/openai_compatibility.mdx
index 6cd52ec32..ccb758e8f 100644
--- a/docs/open-source/features/openai_compatibility.mdx
+++ b/docs/open-source/features/openai_compatibility.mdx
@@ -6,7 +6,7 @@ iconType: "solid"
Mem0 can be easily integrated into chat applications to enhance conversational agents with structured memory. Mem0's APIs are designed to be compatible with OpenAI's, with the goal of making it easy to leverage Mem0 in applications you may have already built.
-If you have a `Mem0 API key`, you can use it to initialize the client. Alternatively, you can initialize Mem0 without an API key if you're using it locally.
+If you have a Mem0 API key, you can use it to initialize the client. Alternatively, you can initialize Mem0 without an API key if you're using it locally.
Mem0 supports several language models (LLMs) through integration with various [providers](https://litellm.vercel.app/docs/providers).
@@ -21,7 +21,7 @@ client = Mem0(api_key="m0-xxx")
messages = [
{
"role": "user",
- "content": "I love indian food but I cannot eat pizza since allergic to cheese."
+ "content": "I love Indian food but I cannot eat pizza since I'm allergic to cheese."
},
]
user_id = "alice"
@@ -51,7 +51,7 @@ print(chat_completion.choices[0].message.content)
In this example, you can see how the second response is tailored based on the information provided in the first interaction. Mem0 remembers the user's preference for Indian food and their cheese allergy, using this information to provide more relevant and personalized restaurant suggestions in San Francisco.
-### Use Mem0 OSS
+## Use Mem0 OSS
```python
config = {
diff --git a/docs/open-source/features/overview.mdx b/docs/open-source/features/overview.mdx
index dbad389de..1a5d80c10 100644
--- a/docs/open-source/features/overview.mdx
+++ b/docs/open-source/features/overview.mdx
@@ -54,4 +54,4 @@ Choose your preferred approach:
- Check out our [examples](/examples) for practical implementations
- Join our [Discord community](https://mem0.dev/DiD) for support
-We're excited to see what you'll build with Mem0 open-source. Let's create smarter, more personalized AI experiences together!
+We're excited to see what you'll build with Mem0 open-source.
diff --git a/docs/open-source/features/rest-api.mdx b/docs/open-source/features/rest-api.mdx
index 4198bcacc..69e550a11 100644
--- a/docs/open-source/features/rest-api.mdx
+++ b/docs/open-source/features/rest-api.mdx
@@ -12,13 +12,13 @@ Mem0 provides a REST API server (written using FastAPI). Users can perform all o
## Features
-- **Create memories:** Create memories based on messages for a user, agent, or run.
-- **Retrieve memories:** Get all memories for a given user, agent, or run.
-- **Search memories:** Search stored memories based on a query.
-- **Update memories:** Update an existing memory.
-- **Delete memories:** Delete a specific memory or all memories for a user, agent, or run.
-- **Reset memories:** Reset all memories for a user, agent, or run.
-- **OpenAPI Documentation:** Accessible via `/docs` endpoint.
+- **Create memories**: Create memories based on messages for a user, agent, or run.
+- **Retrieve memories**: Get all memories for a given user, agent, or run.
+- **Search memories**: Search stored memories based on a query.
+- **Update memories**: Update an existing memory.
+- **Delete memories**: Delete a specific memory or all memories for a user, agent, or run.
+- **Reset memories**: Reset all memories for a user, agent, or run.
+- **OpenAPI Documentation**: Accessible via `/docs` endpoint.
## Running Locally
diff --git a/docs/open-source/graph_memory/features.mdx b/docs/open-source/graph_memory/features.mdx
index 846ed0334..3357fde2e 100644
--- a/docs/open-source/graph_memory/features.mdx
+++ b/docs/open-source/graph_memory/features.mdx
@@ -5,15 +5,13 @@ icon: "list-check"
iconType: "solid"
---
-Graph Memory is a powerful feature that allows users to create and utilize complex relationships between pieces of information.
+Graph Memory is a powerful feature that allows you to create and utilize complex relationships between pieces of information.
-## Graph Memory supports the following features:
+## Graph Memory Features
### Using Custom Prompts
-Users can specify a custom prompt that will be used to extract specific entities from the given input text.
-This allows for more targeted and relevant information extraction based on the user's needs.
-Here's an example of how to specify a custom prompt:
+You can specify a custom prompt that will be used to extract specific entities from the given input text. This allows for more targeted and relevant information extraction based on your needs. Here's an example of how to specify a custom prompt:
```python Python
diff --git a/docs/open-source/graph_memory/overview.mdx b/docs/open-source/graph_memory/overview.mdx
index 6f318faa8..b43682366 100644
--- a/docs/open-source/graph_memory/overview.mdx
+++ b/docs/open-source/graph_memory/overview.mdx
@@ -5,13 +5,7 @@ icon: "info"
iconType: "solid"
---
-Mem0 now supports **Graph Memory**.
-With Graph Memory, users can now create and utilize complex relationships between pieces of information, allowing for more nuanced and context-aware responses.
-This integration enables users to leverage the strengths of both vector-based and graph-based approaches, resulting in more accurate and comprehensive information retrieval and generation.
-
-
-NodeSDK now supports Graph Memory. 🎉
-
+Mem0 now supports **Graph Memory**. With Graph Memory, you can create and utilize complex relationships between pieces of information, allowing for more nuanced and context-aware responses. This integration enables you to leverage the strengths of both vector-based and graph-based approaches, resulting in more accurate and comprehensive information retrieval and generation.
## Installation
@@ -47,17 +41,16 @@ allowfullscreen
## Initialize Graph Memory
-To initialize Graph Memory you'll need to set up your configuration with graph
-store providers. Currently, we support [Neo4j](#initialize-neo4j), [Memgraph](#initialize-memgraph), [Neptune Analytics](#initialize-neptune-analytics), [Neptune DB Cluster](#initialize-neptune-db),and [Kuzu](#initialize-kuzu) as graph store providers.
+To initialize Graph Memory you'll need to set up your configuration with graph store providers. Currently, we support [Neo4j](#initialize-neo4j), [Memgraph](#initialize-memgraph), [Neptune Analytics](#initialize-neptune-analytics), [Neptune DB Cluster](#initialize-neptune-db),and [Kuzu](#initialize-kuzu) as graph store providers.
### Initialize Neo4j
You can setup [Neo4j](https://neo4j.com/) locally or use the hosted [Neo4j AuraDB](https://neo4j.com/product/auradb/).
-If you are using Neo4j locally, then you need to install [APOC plugins](https://neo4j.com/labs/apoc/4.1/installation/).
+If you are using Neo4j locally, you need to install [APOC plugins](https://neo4j.com/labs/apoc/4.1/installation/).
-User can also customize the LLM for Graph Memory from the [Supported LLM list](https://docs.mem0.ai/components/llms/overview) with three levels of configuration:
+You can also customize the LLM for Graph Memory from the [Supported LLM list](https://docs.mem0.ai/components/llms/overview) with three levels of configuration:
1. **Main Configuration**: If `llm` is set in the main config, it will be used for all graph operations.
2. **Graph Store Configuration**: If `llm` is set in the graph_store config, it will override the main config `llm` and be used specifically for graph operations.
@@ -176,13 +169,11 @@ Run Memgraph with Docker:
docker run -p 7687:7687 memgraph/memgraph-mage:latest --schema-info-enabled=True
```
-The `--schema-info-enabled` flag is set to `True` for more performant schema
-generation.
+The `--schema-info-enabled` flag is set to `True` for more performant schema generation.
-Additional information can be found on [Memgraph
-documentation](https://memgraph.com/docs).
+Additional information can be found in the [Memgraph documentation](https://memgraph.com/docs).
-User can also customize the LLM for Graph Memory from the [Supported LLM list](https://docs.mem0.ai/components/llms/overview) with three levels of configuration:
+You can also customize the LLM for Graph Memory from the [Supported LLM list](https://docs.mem0.ai/components/llms/overview) with three levels of configuration:
1. **Main Configuration**: If `llm` is set in the main config, it will be used for all graph operations.
2. **Graph Store Configuration**: If `llm` is set in the graph_store config, it will override the main config `llm` and be used specifically for graph operations.
@@ -234,6 +225,7 @@ m = Memory.from_config(config_dict=config)
Note: You can use Neptune Analytics as part of an Amazon tech stack [Setup AWS Bedrock, AOSS, and Neptune](https://docs.mem0.ai/examples/aws_example#aws-bedrock-and-aoss)
Create an instance of Amazon Neptune Analytics in your AWS account following the [AWS documentation](https://docs.aws.amazon.com/neptune-analytics/latest/userguide/get-started.html).
+
- Public connectivity is not enabled by default, and if accessing from outside a VPC, it needs to be enabled.
- Once the Amazon Neptune Analytics instance is available, you will need the graph-identifier to connect.
- The Neptune Analytics instance must be created using the same vector dimensions as the embedding model creates. See: [Vector indexing in Neptune Analytics](https://docs.aws.amazon.com/neptune-analytics/latest/userguide/vector-index.html).
@@ -329,8 +321,7 @@ Troubleshooting:
### Initialize Kuzu
-[Kuzu](https://kuzudb.com) is a fully local in-process graph database system that runs openCypher queries.
-Kuzu comes embedded into the Python package and there is no additional setup required.
+[Kuzu](https://kuzudb.com) is a fully local in-process graph database system that runs openCypher queries. Kuzu comes embedded into the Python package and there is no additional setup required.
Kuzu needs a path to a file where it will store the graph database. For example:
@@ -347,8 +338,7 @@ config = {
```
-Kuzu can also store its database in memory. Note that in this mode, all stored memories will be lost
-after the program has finished executing.
+Kuzu can also store its database in memory. Note that in this mode, all stored memories will be lost after the program has finished executing.
```python Python
@@ -374,6 +364,7 @@ m = Memory.from_config(config_dict=config)
## Graph Operations
+
Mem0's graph memory supports the following operations:
### Add Memories
@@ -529,7 +520,8 @@ memory.deleteAll({ userId: "alice", agentId: "food-assistant" });
```
-# Example Usage
+## Example Usage
+
Here's an example of how to use Mem0's graph operations:
1. First, we'll add some memories for a user named Alice.
@@ -679,7 +671,7 @@ memory.search("What is my name?", { userId: "alice123" });
```
-Below graph visualization shows what nodes and relationships are fetched from the graph for the provided query.
+The graph visualization below shows what nodes and relationships are fetched from the graph for the provided query.

@@ -708,14 +700,13 @@ memory.search("Who is spiderman?", { userId: "alice123" });
## Using Multiple Agents with Graph Memory
+When working with multiple agents and sessions, you can use the `agent_id` and `run_id` parameters to organize memories by user, agent, and run context. This allows you to:
-When working with multiple agents and sessions, you can use the "agent_id" and "run_id" parameters to organize memories by user, agent, and run context. This allows you to:
-
-1. Create agent-specific knowledge graphs
-2. Share common knowledge between agents
-3. Isolate sensitive or specialized information to specific agents
-4. Track conversation sessions and runs separately
-5. Maintain context across different execution contexts
+1. Create agent-specific knowledge graphs.
+2. Share common knowledge between agents.
+3. Isolate sensitive or specialized information to specific agents.
+4. Track conversation sessions and runs separately.
+5. Maintain context across different execution contexts.
### Example: Multi-Agent Setup
diff --git a/docs/open-source/multimodal-support.mdx b/docs/open-source/multimodal-support.mdx
index fcf910493..a147268ca 100644
--- a/docs/open-source/multimodal-support.mdx
+++ b/docs/open-source/multimodal-support.mdx
@@ -4,11 +4,11 @@ icon: "image"
iconType: "solid"
---
-Mem0 extends its capabilities beyond text by supporting multimodal data, including images. Users can seamlessly integrate images into their interactions, allowing Mem0 to extract pertinent information from visual content and enrich the memory system.
+Mem0 extends its capabilities beyond text by supporting multimodal data, including images. You can seamlessly integrate images into your interactions, allowing Mem0 to extract pertinent information from visual content and enrich the memory system.
## How It Works
-When a user provides an image, Mem0 processes the image to extract textual information and relevant details, which are then added to the user's memory. This feature enhances the system's ability to understand and remember details based on visual inputs.
+When you provide an image, Mem0 processes it to extract textual information and relevant details, which are then added to your memory. This feature enhances the system's ability to understand and remember details based on visual inputs.
To enable multimodal support, you must set `enable_vision = True` in your configuration. The `vision_details` parameter can be set to "auto" (default), "low", or "high" to control the level of detail in image processing.
@@ -104,7 +104,7 @@ await client.add(messages, { userId: "alice" })
Mem0 allows you to add images to user interactions through two primary methods: by providing an image URL or by using a Base64-encoded image. Below are examples demonstrating each approach.
-## 1. Using an Image URL (Recommended)
+### Using an Image URL (Recommended)
You can include an image by passing its direct URL. This method is simple and efficient for online images.
@@ -146,7 +146,7 @@ await client.add([imageMessage], { userId: "alice" })
```
-## 2. Using Base64 Image Encoding for Local Files
+### Using Base64 Image Encoding for Local Files
For local images or scenarios where embedding the image directly is preferable, you can use a Base64-encoded string.
@@ -196,7 +196,7 @@ await client.add([imageMessage], { userId: "alice" })
```
-## 3. OpenAI-Compatible Message Format
+### OpenAI-Compatible Message Format
You can also use the OpenAI-compatible format to combine text and images in a single message:
diff --git a/docs/open-source/node-quickstart.mdx b/docs/open-source/node-quickstart.mdx
index 8b6ea60d8..c495981a1 100644
--- a/docs/open-source/node-quickstart.mdx
+++ b/docs/open-source/node-quickstart.mdx
@@ -69,7 +69,7 @@ const memory = new Memory({
```typescript Code
const 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."}
]
@@ -303,9 +303,9 @@ await memory.reset(); // Reset all memories
### History Store
-Mem0 TypeScript SDK support history stores to run on a serverless environment:
+The Mem0 TypeScript SDK supports history stores to run in serverless environments.
-We recommend using `Supabase` as a history store for serverless environments or disable history store to run on a serverless environment.
+We recommend using Supabase as a history store for serverless environments, or disabling the history store to run in serverless environments.
```typescript Supabase
@@ -353,7 +353,7 @@ create table memory_history (
## Configuration Parameters
-Mem0 offers extensive configuration options to customize its behavior according to your needs. These configurations span across different components like vector stores, language models, embedders, and graph stores.
+Mem0 offers extensive configuration options to customize its behavior according to your needs. These configurations span different components like vector stores, language models, embedders, and graph stores.
diff --git a/docs/open-source/overview.mdx b/docs/open-source/overview.mdx
index c060b70c9..9d990e1aa 100644
--- a/docs/open-source/overview.mdx
+++ b/docs/open-source/overview.mdx
@@ -4,9 +4,9 @@ icon: "eye"
iconType: "solid"
---
-Welcome to Mem0 Open Source - a powerful, self-hosted memory management solution for AI agents and assistants. With Mem0 OSS, you get full control over your infrastructure while maintaining complete customization flexibility.
+Welcome to Mem0 Open Source, a powerful, self-hosted memory management solution for AI agents and assistants. With Mem0 OSS, you get full control over your infrastructure while maintaining complete customization flexibility.
-We offer two SDKs for Python and Node.js.
+We offer two SDKs: Python and Node.js.
Check out our [GitHub repository](https://mem0.dev/gd) to explore the source code.
@@ -21,8 +21,8 @@ Check out our [GitHub repository](https://mem0.dev/gd) to explore the source cod
## Key Features
-- **Full Infrastructure Control**: Host Mem0 on your own servers
-- **Customizable Implementation**: Modify and extend functionality as needed
-- **Local Development**: Perfect for development and testing
-- **No Vendor Lock-in**: Own your data and infrastructure
-- **Community Driven**: Benefit from and contribute to community improvements
+- **Full Infrastructure Control**: Host Mem0 on your own servers.
+- **Customizable Implementation**: Modify and extend functionality as needed.
+- **Local Development**: Perfect for development and testing.
+- **No Vendor Lock-in**: Own your data and infrastructure.
+- **Community Driven**: Benefit from and contribute to community improvements.
diff --git a/docs/open-source/python-quickstart.mdx b/docs/open-source/python-quickstart.mdx
index 622310ef7..cf6cb41d3 100644
--- a/docs/open-source/python-quickstart.mdx
+++ b/docs/open-source/python-quickstart.mdx
@@ -107,7 +107,7 @@ m = Memory.from_config(config_dict=config)
```python Code
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."}
]
@@ -342,9 +342,9 @@ m.reset() # Reset all memories
Mem0 supports three key parameters for organizing memories:
-- **`user_id`**: Organize memories by user identity
-- **`agent_id`**: Organize memories by AI agent or assistant
-- **`run_id`**: Organize memories by session, workflow, or execution context
+- **`user_id`**: Organize memories by user identity.
+- **`agent_id`**: Organize memories by AI agent or assistant.
+- **`run_id`**: Organize memories by session, workflow, or execution context.
### Using All Three Parameters
@@ -369,7 +369,7 @@ session_search = m.search("What do you know about me?", user_id="alice", run_id=
## Configuration Parameters
-Mem0 offers extensive configuration options to customize its behavior according to your needs. These configurations span across different components like vector stores, language models, embedders, and graph stores.
+Mem0 offers extensive configuration options to customize its behavior according to your needs. These configurations span different components like vector stores, language models, embedders, and graph stores.
@@ -425,7 +425,7 @@ Mem0 offers extensive configuration options to customize its behavior according
| `history_db_path` | Path to the history database | "{mem0_dir}/history.db" |
| `version` | API version | "v1.1" |
| `custom_fact_extraction_prompt` | Custom prompt for memory processing | None |
-| `custom_update_memory_prompt` | Custom prompt for update memory | None |
+| `custom_update_memory_prompt` | Custom prompt for memory updates | None |
@@ -510,7 +510,7 @@ chat_completion = client.chat.completions.create(
## Contributing
-We welcome contributions to Mem0! Here's how you can contribute:
+We welcome contributions to Mem0. Here's how you can contribute:
1. Fork the repository and create your branch from `main`.
2. Clone the forked repository to your local machine.
@@ -538,7 +538,7 @@ We welcome contributions to Mem0! Here's how you can contribute:
7. If all tests pass, commit your changes and push to your fork.
8. Open a pull request with a clear title and description.
-Please make sure your code follows our coding conventions and is well-documented. We appreciate your contributions to make Mem0 better!
+Please ensure your code follows our coding conventions and is well-documented.
If you have any questions, please feel free to reach out to us using one of the following methods:
diff --git a/docs/openapi.json b/docs/openapi.json
index 16c99114b..530c7a0eb 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -18,9 +18,7 @@
],
"security": [
{
- "ApiKeyAuth": [
-
- ]
+ "ApiKeyAuth": []
}
],
"paths": {
@@ -43,7 +41,7 @@
},
"responses": {
"201": {
- "description": "",
+ "description": "Agent created successfully.",
"content": {
"application/json": {
"schema": {
@@ -75,7 +73,7 @@
},
"responses": {
"201": {
- "description": "",
+ "description": "App created successfully.",
"content": {
"application/json": {
"schema": {
@@ -114,7 +112,7 @@
],
"responses": {
"200": {
- "description": "",
+ "description": "Successfully retrieved list of entities.",
"content": {
"application/json": {
"schema": {
@@ -124,33 +122,33 @@
"properties": {
"id": {
"type": "string",
- "description": "Unique identifier for the entity"
+ "description": "Unique identifier for the entity."
},
"name": {
"type": "string",
- "description": "Name of the entity"
+ "description": "Name of the entity."
},
"created_at": {
"type": "string",
"format": "date-time",
- "description": "Timestamp of when the entity was created"
+ "description": "Timestamp of when the entity was created."
},
"updated_at": {
"type": "string",
"format": "date-time",
- "description": "Timestamp of when the entity was last updated"
+ "description": "Timestamp of when the entity was last updated."
},
"total_memories": {
"type": "integer",
- "description": "Total number of memories associated with the entity"
+ "description": "Total number of memories associated with the entity."
},
"owner": {
"type": "string",
- "description": "Owner of the entity"
+ "description": "Owner of the entity."
},
"organization": {
"type": "string",
- "description": "Organization the entity belongs to"
+ "description": "Organization the entity belongs to."
},
"metadata": {
"type": "object",
@@ -183,29 +181,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\nusers = client.users()\nprint(users)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Retrieve all users\nclient.users()\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request GET \\\n --url https://api.mem0.ai/v1/entities/ \\\n --header 'Authorization: Token '"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/entities/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/entities/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.get(\"https://api.mem0.ai/v1/entities/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\nusers = client.users()\nprint(users)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Retrieve all users\nclient.users()\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request GET \\\n --url https://api.mem0.ai/v1/entities/ \\\n --header 'Authorization: Token '"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/entities/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v1/entities/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.get(\"https://api.mem0.ai/v1/entities/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
}
]
}
@@ -218,10 +216,8 @@
"operationId": "entities_filters_list",
"responses": {
"200": {
- "description": "",
- "content": {
-
- }
+ "description": "Successfully retrieved entity filters.",
+ "content": {}
}
}
}
@@ -246,7 +242,7 @@
"run"
]
},
- "description": "The type of the entity (user, agent, app, or run)"
+ "description": "The type of the entity (user, agent, app, or run)."
},
{
"name": "entity_id",
@@ -255,15 +251,13 @@
"schema": {
"type": "string"
},
- "description": "The unique identifier of the entity"
+ "description": "The unique identifier of the entity."
}
],
"responses": {
"200": {
- "description": "",
- "content": {
-
- }
+ "description": "Successfully retrieved entity details.",
+ "content": {}
}
}
},
@@ -286,7 +280,7 @@
"run"
]
},
- "description": "The type of the entity (user, agent, app, or run)"
+ "description": "The type of the entity (user, agent, app, or run)."
},
{
"name": "entity_id",
@@ -295,7 +289,7 @@
"schema": {
"type": "string"
},
- "description": "The unique identifier of the entity"
+ "description": "The unique identifier of the entity."
}
],
"responses": {
@@ -316,7 +310,7 @@
}
},
"400": {
- "description": "Invalid entity type",
+ "description": "Invalid entity type.",
"content": {
"application/json": {
"schema": {
@@ -333,29 +327,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "import requests\n\nurl = \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)"
- },
- {
- "lang": "JavaScript",
- "source": "const options = {method: 'DELETE', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));"
- },
- {
- "lang": "cURL",
- "source": "curl --request DELETE \\\n --url https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/ \\\n --header 'Authorization: Token '"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.delete(\"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "import requests\n\nurl = \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "const options = {method: 'DELETE', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request DELETE \\\n --url https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/ \\\n --header 'Authorization: Token '"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.delete(\"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
}
]
}
@@ -370,10 +364,8 @@
"operationId": "events_list",
"responses": {
"200": {
- "description": "",
- "content": {
-
- }
+ "description": "Successfully retrieved events.",
+ "content": {}
}
}
}
@@ -381,39 +373,49 @@
"/v1/exports/": {
"post": {
"tags": [
- "exports"
+ "exports"
],
- "summary": "Create an export job with schema",
- "description": "Create a structured export of memories based on a provided schema.",
- "operationId": "exports_create",
+ "summary": "Create an export job with schema",
+ "description": "Create a structured export of memories based on a provided schema.",
+ "operationId": "exports_create",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
- "required": ["schema"],
+ "required": [
+ "schema"
+ ],
"properties": {
- "schema": {
- "type": "object",
- "description": "Schema definition for the export"
- },
- "filters": {
- "type": "object",
- "properties": {
- "user_id": {"type": "string"},
- "agent_id": {"type": "string"},
- "app_id": {"type": "string"},
- "run_id": {"type": "string"}
- },
- "description": "Filters to apply while exporting memories. Available fields are: user_id, agent_id, app_id, run_id."
- },
- "org_id": {
- "type": "string",
- "description": "Filter exports by organization ID"
- },
- "project_id": {
- "type": "string",
- "description": "Filter exports by project ID"
+ "schema": {
+ "type": "object",
+ "description": "Schema definition for the export"
+ },
+ "filters": {
+ "type": "object",
+ "properties": {
+ "user_id": {
+ "type": "string"
+ },
+ "agent_id": {
+ "type": "string"
+ },
+ "app_id": {
+ "type": "string"
+ },
+ "run_id": {
+ "type": "string"
+ }
+ },
+ "description": "Filters to apply while exporting memories. Available fields are: user_id, agent_id, app_id, run_id."
+ },
+ "org_id": {
+ "type": "string",
+ "description": "Filter exports by organization ID."
+ },
+ "project_id": {
+ "type": "string",
+ "description": "Filter exports by project ID."
}
}
}
@@ -422,183 +424,201 @@
"required": true
},
"responses": {
- "201": {
- "description": "Export created successfully",
+ "201": {
+ "description": "Export created successfully.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "message": {
- "type": "string",
- "example": "Memory export request received. The export will be ready in a few seconds."
- },
+ "message": {
+ "type": "string",
+ "example": "Memory export request received. The export will be ready in a few seconds."
+ },
"id": {
"type": "string",
"format": "uuid",
- "example": "550e8400-e29b-41d4-a716-446655440000"
+ "example": "550e8400-e29b-41d4-a716-446655440000"
+ }
+ },
+ "required": [
+ "message",
+ "id"
+ ]
+ }
+ }
}
},
- "required": ["message", "id"]
- }
- }
- }
- },
- "400": {
- "description": "Bad Request",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "message": {
+ "400": {
+ "description": "Bad Request.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
"type": "string",
- "example": "Schema is required and must be a valid object"
+ "example": "Schema is required and must be a valid object"
+ }
+ }
+ }
+ }
}
+ }
+ },
+ "x-code-samples": [
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\n\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\njson_schema = {pydantic_json_schema}\nfilters = {\n \"AND\": [\n {\"user_id\": \"alex\"}\n ]\n}\n\nresponse = client.create_memory_export(\n schema=json_schema,\n filters=filters\n)\nprint(response)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst jsonSchema = {pydantic_json_schema};\nconst filters = {\n AND: [\n {user_id: 'alex'}\n ]\n};\n\nclient.createMemoryExport({\n schema: jsonSchema,\n filters: filters\n})\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request POST \\\n --url 'https://api.mem0.ai/v1/exports/' \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"schema\": {pydantic_json_schema},\n \"filters\": {\n \"AND\": [\n {\"user_id\": \"alex\"}\n ]\n }\n }'"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\turl := \"https://api.mem0.ai/v1/exports/\"\n\n\tfilters := map[string]interface{}{\n\t\t\"AND\": []map[string]interface{}{\n\t\t\t{\"user_id\": \"alex\"},\n\t\t},\n\t}\n\n\tdata := map[string]interface{}{\n\t\t\"schema\": map[string]interface{}{}, // Your schema here\n\t\t\"filters\": filters,\n\t}\n\n\tjsonData, _ := json.Marshal(data)\n\n\treq, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " [\n ['user_id' => 'alex']\n ]\n];\n\n$data = array(\n \"schema\" => array(), // Your schema here\n \"filters\" => $filters\n);\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/v1/exports/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode($data),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "import com.mashape.unirest.http.HttpResponse;\nimport com.mashape.unirest.http.JsonNode;\nimport com.mashape.unirest.http.Unirest;\nimport org.json.JSONObject;\nimport org.json.JSONArray;\n\nJSONObject filters = new JSONObject()\n .put(\"AND\", new JSONArray()\n .put(new JSONObject().put(\"user_id\", \"alex\")));\n\nJSONObject data = new JSONObject()\n .put(\"schema\", new JSONObject()) // Your schema here\n .put(\"filters\", filters);\n\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/exports/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(data.toString())\n .asJson();"
+ }
+ ]
+ }
+ },
+ "/v1/exports/get": {
+ "post": {
+ "tags": [
+ "exports"
+ ],
+ "summary": "Export data based on filters",
+ "description": "Get the latest memory export.",
+ "operationId": "exports_list",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "memory_export_id": {
+ "type": "string",
+ "description": "The unique identifier of the memory export."
+ },
+ "filters": {
+ "type": "object",
+ "properties": {
+ "user_id": {
+ "type": "string"
+ },
+ "agent_id": {
+ "type": "string"
+ },
+ "app_id": {
+ "type": "string"
+ },
+ "run_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "description": "Filters to apply while exporting memories. Available fields are: user_id, agent_id, app_id, run_id, created_at, updated_at."
+ },
+ "org_id": {
+ "type": "string",
+ "description": "Filter exports by organization ID."
+ },
+ "project_id": {
+ "type": "string",
+ "description": "Filter exports by project ID."
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Successful export.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "description": "Export data response in an object format."
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad Request.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "One of the filters: app_id, user_id, agent_id, run_id is required!"
}
}
}
}
}
},
- "x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\n\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\njson_schema = {pydantic_json_schema}\nfilters = {\n \"AND\": [\n {\"user_id\": \"alex\"}\n ]\n}\n\nresponse = client.create_memory_export(\n schema=json_schema,\n filters=filters\n)\nprint(response)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst jsonSchema = {pydantic_json_schema};\nconst filters = {\n AND: [\n {user_id: 'alex'}\n ]\n};\n\nclient.createMemoryExport({\n schema: jsonSchema,\n filters: filters\n})\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request POST \\\n --url 'https://api.mem0.ai/v1/exports/' \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"schema\": {pydantic_json_schema},\n \"filters\": {\n \"AND\": [\n {\"user_id\": \"alex\"}\n ]\n }\n }'"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\turl := \"https://api.mem0.ai/v1/exports/\"\n\n\tfilters := map[string]interface{}{\n\t\t\"AND\": []map[string]interface{}{\n\t\t\t{\"user_id\": \"alex\"},\n\t\t},\n\t}\n\n\tdata := map[string]interface{}{\n\t\t\"schema\": map[string]interface{}{}, // Your schema here\n\t\t\"filters\": filters,\n\t}\n\n\tjsonData, _ := json.Marshal(data)\n\n\treq, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(jsonData))\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
- },
- {
- "lang": "PHP",
- "source": " [\n ['user_id' => 'alex']\n ]\n];\n\n$data = array(\n \"schema\" => array(), // Your schema here\n \"filters\" => $filters\n);\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/v1/exports/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode($data),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "import com.mashape.unirest.http.HttpResponse;\nimport com.mashape.unirest.http.JsonNode;\nimport com.mashape.unirest.http.Unirest;\nimport org.json.JSONObject;\nimport org.json.JSONArray;\n\nJSONObject filters = new JSONObject()\n .put(\"AND\", new JSONArray()\n .put(new JSONObject().put(\"user_id\", \"alex\")));\n\nJSONObject data = new JSONObject()\n .put(\"schema\", new JSONObject()) // Your schema here\n .put(\"filters\", filters);\n\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/exports/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(data.toString())\n .asJson();"
- }
- ]
- }
- },
- "/v1/exports/get": {
- "post": {
- "tags": [
- "exports"
- ],
- "summary": "Export data based on filters",
- "description": "Get the latest memory export.",
- "operationId": "exports_list",
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "memory_export_id": {"type": "string", "description": "The unique identifier of the memory export"},
- "filters": {
+ "404": {
+ "description": "Not Found.",
+ "content": {
+ "application/json": {
+ "schema": {
"type": "object",
"properties": {
- "user_id": {"type": "string"},
- "agent_id": {"type": "string"},
- "app_id": {"type": "string"},
- "run_id": {"type": "string"},
- "created_at": {"type": "string"},
- "updated_at": {"type": "string"}
- },
- "description": "Filters to apply while exporting memories. Available fields are: user_id, agent_id, app_id, run_id, created_at, updated_at."
- },
- "org_id": {
- "type": "string",
- "description": "Filter exports by organization ID"
- },
- "project_id": {
- "type": "string",
- "description": "Filter exports by project ID"
+ "error": {
+ "type": "string",
+ "example": "No memory export request found"
+ }
+ }
}
}
}
}
- }
- },
- "responses": {
- "200": {
- "description": "Successful export",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "description": "Export data response in a object format"
- }
- }
- }
},
- "400": {
- "description": "Bad Request",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string",
- "example": "One of the filters: app_id, user_id, agent_id, run_id is required!"
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Not Found",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "string",
- "example": "No memory export request found"
- }
- }
- }
- }
- }
- }
- },
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\n\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"project_id\")\n\nmemory_export_id = \"\"\n\nresponse = client.get_memory_export(memory_export_id=memory_export_id)\nprint(response)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst memory_export_id = \"\";\n\n// Get memory export\nclient.getMemoryExport({ memory_export_id })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request POST \\\n --url 'https://api.mem0.ai/v1/exports/get/' \\\n --header 'Authorization: Token ' \\\n --data '{\n \"memory_export_id\": \"\"\n}'"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\tmemory_export_id := \"\"\n\n\treq, _ := http.NewRequest(\"POST\", \"https://api.mem0.ai/v1/exports/get/\", nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
- },
- {
- "lang": "PHP",
- "source": " '']);\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/v1/exports/get/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $data,\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "String data = \"{\\\"memory_export_id\\\":\\\"\\\"}\";\n\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/exports/get/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(data)\n .asString();"
- }
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\n\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"project_id\")\n\nmemory_export_id = \"\"\n\nresponse = client.get_memory_export(memory_export_id=memory_export_id)\nprint(response)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst memory_export_id = \"\";\n\n// Get memory export\nclient.getMemoryExport({ memory_export_id })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request POST \\\n --url 'https://api.mem0.ai/v1/exports/get/' \\\n --header 'Authorization: Token ' \\\n --data '{\n \"memory_export_id\": \"\"\n}'"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\tmemory_export_id := \"\"\n\n\treq, _ := http.NewRequest(\"POST\", \"https://api.mem0.ai/v1/exports/get/\", nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " '']);\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/v1/exports/get/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => $data,\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "String data = \"{\\\"memory_export_id\\\":\\\"\\\"}\";\n\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/exports/get/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(data)\n .asString();"
+ }
]
}
},
@@ -607,7 +627,7 @@
"tags": [
"memories"
],
- "description": "Get all memories",
+ "description": "Get all memories.",
"operationId": "memories_list",
"parameters": [
{
@@ -616,7 +636,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by user ID"
+ "description": "Filter memories by user ID."
},
{
"name": "agent_id",
@@ -624,7 +644,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by agent ID"
+ "description": "Filter memories by agent ID."
},
{
"name": "app_id",
@@ -632,7 +652,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by app ID"
+ "description": "Filter memories by app ID."
},
{
"name": "run_id",
@@ -640,7 +660,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by run ID"
+ "description": "Filter memories by run ID."
},
{
"name": "metadata",
@@ -648,7 +668,7 @@
"schema": {
"type": "object"
},
- "description": "Filter memories by metadata (JSON string)",
+ "description": "Filter memories by metadata (JSON string).",
"style": "deepObject",
"explode": true
},
@@ -657,9 +677,11 @@
"in": "query",
"schema": {
"type": "array",
- "items": { "type": "string" }
+ "items": {
+ "type": "string"
+ }
},
- "description": "Filter memories by categories"
+ "description": "Filter memories by categories."
},
{
"name": "org_id",
@@ -678,45 +700,60 @@
"description": "Filter memories by project ID."
},
{
- "name":"fields",
+ "name": "fields",
"in": "query",
- "schema": { "type": "array", "items": { "type": "string" } },
- "description": "Filter memories by fields"
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "description": "Filter memories by fields."
},
{
- "name":"keywords",
+ "name": "keywords",
"in": "query",
- "schema": { "type": "string" },
- "description": "Filter memories by keywords"
+ "schema": {
+ "type": "string"
+ },
+ "description": "Filter memories by keywords."
},
{
"name": "page",
"in": "query",
- "schema": { "type": "integer" },
- "description": "Page number for pagination. Default: 1"
+ "schema": {
+ "type": "integer"
+ },
+ "description": "Page number for pagination. Default: 1."
},
{
"name": "page_size",
"in": "query",
- "schema": { "type": "integer" },
- "description": "Number of items per page. Default: 100"
+ "schema": {
+ "type": "integer"
+ },
+ "description": "Number of items per page. Default: 100."
},
{
"name": "start_date",
"in": "query",
- "schema": { "type": "string" },
- "description": "Filter memories by start date"
+ "schema": {
+ "type": "string"
+ },
+ "description": "Filter memories by start date."
},
{
"name": "end_date",
"in": "query",
- "schema": { "type": "string" },
- "description": "Filter memories by end date"
+ "schema": {
+ "type": "string"
+ },
+ "description": "Filter memories by end date."
}
],
"responses": {
"200": {
- "description": "",
+ "description": "Successfully retrieved memories.",
"content": {
"application/json": {
"schema": {
@@ -764,7 +801,7 @@
"expiration_date": {
"type": "string",
"format": "date-time",
- "description": "The date and time when the memory will expire. Format: YYYY-MM-DD",
+ "description": "The date and time when the memory will expire. Format: YYYY-MM-DD.",
"title": "Expiration date",
"nullable": true,
"default": null
@@ -792,7 +829,7 @@
}
},
"400": {
- "description": "Bad Request",
+ "description": "Bad Request.",
"content": {
"application/json": {
"schema": {
@@ -809,29 +846,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\n# Retrieve memories for a specific user\nuser_memories = client.get_all(user_id=\"\")\n\nprint(user_memories)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Retrieve memories for a specific user\nclient.getAll({ user_id: \"\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --location --request GET 'https://api.mem0.ai/v1/memories/' \\\n--header 'Authorization: Token '"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.get(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\n# Retrieve memories for a specific user\nuser_memories = client.get_all(user_id=\"\")\n\nprint(user_memories)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Retrieve memories for a specific user\nclient.getAll({ user_id: \"\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --location --request GET 'https://api.mem0.ai/v1/memories/' \\\n--header 'Authorization: Token '"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.get(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
}
]
},
@@ -839,7 +876,7 @@
"tags": [
"memories"
],
- "description": "Add memories",
+ "description": "Add memories.",
"operationId": "memories_create",
"requestBody": {
"content": {
@@ -853,7 +890,7 @@
},
"responses": {
"200": {
- "description": "Successful memory creation",
+ "description": "Successful memory creation.",
"content": {
"application/json": {
"schema": {
@@ -916,29 +953,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\n\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nmessages = [\n {\"role\": \"user\", \"content\": \"\"},\n {\"role\": \"assistant\", \"content\": \"\"}\n]\n\nclient.add(messages, user_id=\"\", version=\"v2\")"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst messages = [\n { role: \"user\", content: \"Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts.\" },\n { role: \"assistant\", content: \"Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions.\" }\n];\n\nclient.add(messages, { user_id: \"\", version: \"v2\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"messages\": [\n {}\n ],\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"includes\": \"\",\n \"excludes\": \"\",\n \"infer\": true,\n \"custom_categories\": {}, \n \"org_id\": \"\",\n \"project_id\": \"\",\n \"version\": \"v2\"\n}'"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\",\n \\\"version\\\": \"v2\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {}, \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\",\n \\\"version\\\": \"v2\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {}, \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\",\n \\\"version\\\": \"v2\"\n}\")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\n\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nmessages = [\n {\"role\": \"user\", \"content\": \"\"},\n {\"role\": \"assistant\", \"content\": \"\"}\n]\n\nclient.add(messages, user_id=\"\", version=\"v2\")"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst messages = [\n { role: \"user\", content: \"Hi, I'm Alex. I'm a vegetarian and I'm allergic to nuts.\" },\n { role: \"assistant\", content: \"Hello Alex! I've noted that you're a vegetarian and have a nut allergy. I'll keep this in mind for any food-related recommendations or discussions.\" }\n];\n\nclient.add(messages, { user_id: \"\", version: \"v2\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"messages\": [\n {}\n ],\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"includes\": \"\",\n \"excludes\": \"\",\n \"infer\": true,\n \"custom_categories\": {}, \n \"org_id\": \"\",\n \"project_id\": \"\",\n \"version\": \"v2\"\n}'"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {},\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\",\n \\\"version\\\": \"v2\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {}, \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\",\n \\\"version\\\": \"v2\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"messages\\\": [\n {}\n ],\n \\\"agent_id\\\": \\\"\\\",\n \\\"user_id\\\": \\\"\\\",\n \\\"app_id\\\": \\\"\\\",\n \\\"run_id\\\": \\\"\\\",\n \\\"metadata\\\": {},\n \\\"includes\\\": \\\"\\\",\n \\\"excludes\\\": \\\"\\\",\n \\\"infer\\\": true,\n \\\"custom_categories\\\": {}, \n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\",\n \\\"version\\\": \"v2\"\n}\")\n .asString();"
}
],
"x-codegen-request-body-name": "data"
@@ -947,7 +984,7 @@
"tags": [
"memories"
],
- "description": "Delete memories",
+ "description": "Delete memories.",
"operationId": "memories_delete",
"parameters": [
{
@@ -956,7 +993,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by user ID"
+ "description": "Filter memories by user ID."
},
{
"name": "agent_id",
@@ -964,7 +1001,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by agent ID"
+ "description": "Filter memories by agent ID."
},
{
"name": "app_id",
@@ -972,7 +1009,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by app ID"
+ "description": "Filter memories by app ID."
},
{
"name": "run_id",
@@ -980,7 +1017,7 @@
"schema": {
"type": "string"
},
- "description": "Filter memories by run ID"
+ "description": "Filter memories by run ID."
},
{
"name": "metadata",
@@ -988,7 +1025,7 @@
"schema": {
"type": "object"
},
- "description": "Filter memories by metadata (JSON string)",
+ "description": "Filter memories by metadata (JSON string).",
"style": "deepObject",
"explode": true
},
@@ -1011,7 +1048,7 @@
],
"responses": {
"204": {
- "description": "Successful deletion of memories",
+ "description": "Successful deletion of memories.",
"content": {
"application/json": {
"schema": {
@@ -1028,29 +1065,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\n# Delete all memories for a specific user\nclient.delete_all(user_id=\"\")"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Delete all memories for a specific user\nclient.deleteAll({ user_id: \"\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request DELETE \\\n --url https://api.mem0.ai/v1/memories/ \\\n --header 'Authorization: Token '"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.delete(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\n# Delete all memories for a specific user\nclient.delete_all(user_id=\"\")"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Delete all memories for a specific user\nclient.deleteAll({ user_id: \"\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request DELETE \\\n --url https://api.mem0.ai/v1/memories/ \\\n --header 'Authorization: Token '"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.delete(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
}
],
"x-codegen-request-body-name": "data"
@@ -1061,7 +1098,7 @@
"tags": [
"memories"
],
- "description": "Get all memories",
+ "description": "Get all memories.",
"operationId": "memories_list_v2",
"parameters": [
{
@@ -1070,32 +1107,79 @@
"schema": {
"type": "object",
"properties": {
- "user_id": {"type": "string"},
- "agent_id": {"type": "string"},
- "app_id": {"type": "string"},
- "run_id": {"type": "string"},
- "created_at": {"type": "string", "format": "date-time"},
- "updated_at": {"type": "string", "format": "date-time"},
- "categories": {"type": "object", "properties": {
- "in": {"type": "array", "items": {"type": "string"}}
- }},
- "metadata": {"type": "object"},
- "keywords": {"type": "object", "properties": {
- "contains": {"type": "string"},
- "icontains": {"type": "string"}
- }}
+ "user_id": {
+ "type": "string"
+ },
+ "agent_id": {
+ "type": "string"
+ },
+ "app_id": {
+ "type": "string"
+ },
+ "run_id": {
+ "type": "string"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "categories": {
+ "type": "object",
+ "properties": {
+ "in": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "metadata": {
+ "type": "object"
+ },
+ "keywords": {
+ "type": "object",
+ "properties": {
+ "contains": {
+ "type": "string"
+ },
+ "icontains": {
+ "type": "string"
+ }
+ }
+ }
},
"additionalProperties": {
"type": "object",
"properties": {
- "in": {"type": "array"},
- "gte": {"type": "string"},
- "lte": {"type": "string"},
- "gt": {"type": "string"},
- "lt": {"type": "string"},
- "ne": {"type": "string"},
- "contains": {"type": "string"},
- "icontains": {"type": "string"}
+ "in": {
+ "type": "array"
+ },
+ "gte": {
+ "type": "string"
+ },
+ "lte": {
+ "type": "string"
+ },
+ "gt": {
+ "type": "string"
+ },
+ "lt": {
+ "type": "string"
+ },
+ "ne": {
+ "type": "string"
+ },
+ "contains": {
+ "type": "string"
+ },
+ "icontains": {
+ "type": "string"
+ }
}
}
},
@@ -1108,7 +1192,9 @@
"in": "query",
"schema": {
"type": "array",
- "items": {"type": "string"}
+ "items": {
+ "type": "string"
+ }
},
"description": "A list of field names to include in the response. If not provided, all fields will be returned."
},
@@ -1131,19 +1217,23 @@
{
"name": "page",
"in": "query",
- "schema": { "type": "integer" },
- "description": "Page number for pagination. Default: 1"
+ "schema": {
+ "type": "integer"
+ },
+ "description": "Page number for pagination. Default: 1."
},
{
"name": "page_size",
"in": "query",
- "schema": { "type": "integer" },
- "description": "Number of items per page. Default: 100"
+ "schema": {
+ "type": "integer"
+ },
+ "description": "Number of items per page. Default: 100."
}
],
"responses": {
"200": {
- "description": "",
+ "description": "Successfully retrieved memories.",
"content": {
"application/json": {
"schema": {
@@ -1177,7 +1267,7 @@
"expiration_date": {
"type": "string",
"format": "date-time",
- "description": "The date and time when the memory will expire. Format: YYYY-MM-DD",
+ "description": "The date and time when the memory will expire. Format: YYYY-MM-DD.",
"title": "Expiration date",
"nullable": true,
"default": null
@@ -1205,7 +1295,7 @@
}
},
"400": {
- "description": "Bad Request",
+ "description": "Bad Request.",
"content": {
"application/json": {
"schema": {
@@ -1222,30 +1312,30 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\n# Retrieve memories with filters\nmemories = client.get_all(\n filters={\n \"AND\": [\n {\n \"user_id\": \"alex\"\n },\n {\n \"created_at\": {\n \"gte\": \"2024-07-01\",\n \"lte\": \"2024-07-31\"\n }\n }\n ]\n },\n version=\"v2\"\n)\n\nprint(memories)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst filters = {\n AND: [\n { user_id: 'alex' },\n { created_at: { gte: '2024-07-01', lte: '2024-07-31' } }\n ]\n};\n\nclient.getAll({ filters, api_version: 'v2' })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl -X POST 'https://api.mem0.ai/v2/memories/' \\\n-H 'Authorization: Token your-api-key' \\\n-H 'Content-Type: application/json' \\\n-d '{\n \"filters\": {\n \"AND\": [\n { \"user_id\": \"alex\" },\n { \"created_at\": { \"gte\": \"2024-07-01\", \"lte\": \"2024-07-31\" } }\n ]\n },\n \"org_id\": \"your-org-id\",\n \"project_id\": \"your-project-id\"\n}'"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\nfunc main() {\n\turl := \"https://api.mem0.ai/v2/memories/\"\n\tfilters := map[string]interface{}{\n\t\t\"AND\": []map[string]interface{}{\n\t\t\t{\"user_id\": \"alex\"},\n\t\t\t{\"created_at\": map[string]string{\n\t\t\t\t\"gte\": \"2024-07-01\",\n\t\t\t\t\"lte\": \"2024-07-31\",\n\t\t\t}},\n\t\t},\n\t}\n\tpayload, _ := json.Marshal(map[string]interface{}{\"filters\": filters})\n\treq, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(payload))\n\treq.Header.Add(\"Authorization\", \"Token your-api-key\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
- },
- {
- "lang": "PHP",
- "source": " [\n ['user_id' => 'alex'],\n ['created_at' => ['gte' => '2024-07-01', 'lte' => '2024-07-31']]\n ]\n];\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/v2/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode(['filters' => $filters]),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token your-api-key\",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "import com.konghq.unirest.http.HttpResponse;\nimport com.konghq.unirest.http.Unirest;\nimport org.json.JSONObject;\n\nJSONObject filters = new JSONObject()\n .put(\"AND\", new JSONArray()\n .put(new JSONObject().put(\"user_id\", \"alex\"))\n .put(new JSONObject().put(\"created_at\", new JSONObject()\n .put(\"gte\", \"2024-07-01\")\n .put(\"lte\", \"2024-07-31\")\n ))\n );\n\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/v2/memories/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .header(\"Content-Type\", \"application/json\")\n .body(new JSONObject().put(\"filters\", filters).toString())\n .asString();\n\nSystem.out.println(response.getBody());"
- }
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\n# Retrieve memories with filters\nmemories = client.get_all(\n filters={\n \"AND\": [\n {\n \"user_id\": \"alex\"\n },\n {\n \"created_at\": {\n \"gte\": \"2024-07-01\",\n \"lte\": \"2024-07-31\"\n }\n }\n ]\n },\n version=\"v2\"\n)\n\nprint(memories)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst filters = {\n AND: [\n { user_id: 'alex' },\n { created_at: { gte: '2024-07-01', lte: '2024-07-31' } }\n ]\n};\n\nclient.getAll({ filters, api_version: 'v2' })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl -X POST 'https://api.mem0.ai/v2/memories/' \\\n-H 'Authorization: Token your-api-key' \\\n-H 'Content-Type: application/json' \\\n-d '{\n \"filters\": {\n \"AND\": [\n { \"user_id\": \"alex\" },\n { \"created_at\": { \"gte\": \"2024-07-01\", \"lte\": \"2024-07-31\" } }\n ]\n },\n \"org_id\": \"your-org-id\",\n \"project_id\": \"your-project-id\"\n}'"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\nfunc main() {\n\turl := \"https://api.mem0.ai/v2/memories/\"\n\tfilters := map[string]interface{}{\n\t\t\"AND\": []map[string]interface{}{\n\t\t\t{\"user_id\": \"alex\"},\n\t\t\t{\"created_at\": map[string]string{\n\t\t\t\t\"gte\": \"2024-07-01\",\n\t\t\t\t\"lte\": \"2024-07-31\",\n\t\t\t}},\n\t\t},\n\t}\n\tpayload, _ := json.Marshal(map[string]interface{}{\"filters\": filters})\n\treq, _ := http.NewRequest(\"POST\", url, bytes.NewBuffer(payload))\n\treq.Header.Add(\"Authorization\", \"Token your-api-key\")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " [\n ['user_id' => 'alex'],\n ['created_at' => ['gte' => '2024-07-01', 'lte' => '2024-07-31']]\n ]\n];\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/v2/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode(['filters' => $filters]),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token your-api-key\",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "import com.konghq.unirest.http.HttpResponse;\nimport com.konghq.unirest.http.Unirest;\nimport org.json.JSONObject;\n\nJSONObject filters = new JSONObject()\n .put(\"AND\", new JSONArray()\n .put(new JSONObject().put(\"user_id\", \"alex\"))\n .put(new JSONObject().put(\"created_at\", new JSONObject()\n .put(\"gte\", \"2024-07-01\")\n .put(\"lte\", \"2024-07-31\")\n ))\n );\n\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/v2/memories/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .header(\"Content-Type\", \"application/json\")\n .body(new JSONObject().put(\"filters\", filters).toString())\n .asString();\n\nSystem.out.println(response.getBody());"
+ }
]
}
},
@@ -1257,10 +1347,8 @@
"operationId": "memories_events_list",
"responses": {
"200": {
- "description": "",
- "content": {
-
- }
+ "description": "Successfully retrieved memory events.",
+ "content": {}
}
}
}
@@ -1284,7 +1372,7 @@
},
"responses": {
"200": {
- "description": "",
+ "description": "Successfully retrieved search results.",
"content": {
"application/json": {
"schema": {
@@ -1295,7 +1383,7 @@
"id": {
"type": "string",
"format": "uuid",
- "description": "Unique identifier for the memory"
+ "description": "Unique identifier for the memory."
},
"memory": {
"type": "string",
@@ -1326,7 +1414,7 @@
"expiration_date": {
"type": "string",
"format": "date-time",
- "description": "The date and time when the memory will expire. Format: YYYY-MM-DD",
+ "description": "The date and time when the memory will expire. Format: YYYY-MM-DD.",
"title": "Expiration date",
"nullable": true,
"default": null
@@ -1334,12 +1422,12 @@
"created_at": {
"type": "string",
"format": "date-time",
- "description": "The timestamp when the memory was created"
+ "description": "The timestamp when the memory was created."
},
"updated_at": {
"type": "string",
"format": "date-time",
- "description": "The timestamp when the memory was last updated"
+ "description": "The timestamp when the memory was last updated."
}
},
"required": [
@@ -1355,7 +1443,7 @@
}
},
"400": {
- "description": "Bad Request",
+ "description": "Bad Request.",
"content": {
"application/json": {
"schema": {
@@ -1372,29 +1460,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nquery = \"Your search query here\"\n\nresults = client.search(query, user_id=\"\", output_format=\"v1.1\")\nprint(results)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst query = \"Your search query here\";\n\nclient.search(query, { user_id: \"\", output_format: \"v1.1\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/search/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_id\": \"\",\n \"project_id\": \"\"\n}'"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.get(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nquery = \"Your search query here\"\n\nresults = client.search(query, user_id=\"\", output_format=\"v1.1\")\nprint(results)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst query = \"Your search query here\";\n\nclient.search(query, { user_id: \"\", output_format: \"v1.1\" })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/memories/search/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"agent_id\": \"\",\n \"user_id\": \"\",\n \"app_id\": \"\",\n \"run_id\": \"\",\n \"metadata\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_id\": \"\",\n \"project_id\": \"\"\n}'"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v1/memories/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.get(\"https://api.mem0.ai/v1/memories/\")\n .header(\"Authorization\", \"Token \")\n .asString();"
}
],
"x-codegen-request-body-name": "data"
@@ -1419,7 +1507,7 @@
},
"responses": {
"200": {
- "description": "",
+ "description": "Successfully retrieved search results.",
"content": {
"application/json": {
"schema": {
@@ -1430,7 +1518,7 @@
"id": {
"type": "string",
"format": "uuid",
- "description": "Unique identifier for the memory"
+ "description": "Unique identifier for the memory."
},
"memory": {
"type": "string",
@@ -1461,7 +1549,7 @@
"expiration_date": {
"type": "string",
"format": "date-time",
- "description": "The date and time when the memory will expire. Format: YYYY-MM-DD",
+ "description": "The date and time when the memory will expire. Format: YYYY-MM-DD.",
"title": "Expiration date",
"nullable": true,
"default": null
@@ -1469,12 +1557,12 @@
"created_at": {
"type": "string",
"format": "date-time",
- "description": "The timestamp when the memory was created"
+ "description": "The timestamp when the memory was created."
},
"updated_at": {
"type": "string",
"format": "date-time",
- "description": "The timestamp when the memory was last updated"
+ "description": "The timestamp when the memory was last updated."
}
},
"required": [
@@ -1491,29 +1579,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nquery = \"What do you know about me?\"\nfilters = {\n \"OR\":[\n {\n \"user_id\":\"alex\"\n },\n {\n \"agent_id\":{\n \"in\":[\n \"travel-assistant\",\n \"customer-support\"\n ]\n }\n }\n ]\n}\nclient.search(query, version=\"v2\", filters=filters)"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst query = \"What do you know about me?\";\nconst filters = {\n OR: [\n { user_id: \"alex\" },\n { agent_id: { in: [\"travel-assistant\", \"customer-support\"] } }\n ]\n};\n\nclient.search(query, { api_version: \"v2\", filters })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request POST \\\n --url https://api.mem0.ai/v2/memories/search/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"filters\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_id\": \"\",\n \"project_id\": \"\"\n}'"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v2/memories/search/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v2/memories/search/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
- },
- {
- "lang": "Java",
- "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v2/memories/search/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\")\n .asString();"
+ {
+ "lang": "Python",
+ "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nquery = \"What do you know about me?\"\nfilters = {\n \"OR\":[\n {\n \"user_id\":\"alex\"\n },\n {\n \"agent_id\":{\n \"in\":[\n \"travel-assistant\",\n \"customer-support\"\n ]\n }\n }\n ]\n}\nclient.search(query, version=\"v2\", filters=filters)"
+ },
+ {
+ "lang": "JavaScript",
+ "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\nconst query = \"What do you know about me?\";\nconst filters = {\n OR: [\n { user_id: \"alex\" },\n { agent_id: { in: [\"travel-assistant\", \"customer-support\"] } }\n ]\n};\n\nclient.search(query, { api_version: \"v2\", filters })\n .then(result => console.log(result))\n .catch(error => console.error(error));"
+ },
+ {
+ "lang": "cURL",
+ "source": "curl --request POST \\\n --url https://api.mem0.ai/v2/memories/search/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"query\": \"\",\n \"filters\": {},\n \"top_k\": 123,\n \"fields\": [\n \"\"\n ],\n \"rerank\": true,\n \"org_id\": \"\",\n \"project_id\": \"\"\n}'"
+ },
+ {
+ "lang": "Go",
+ "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v2/memories/search/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
+ },
+ {
+ "lang": "PHP",
+ "source": " \"https://api.mem0.ai/v2/memories/search/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"
+ },
+ {
+ "lang": "Java",
+ "source": "HttpResponse response = Unirest.post(\"https://api.mem0.ai/v2/memories/search/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"query\\\": \\\"\\\",\n \\\"filters\\\": {},\n \\\"top_k\\\": 123,\n \\\"fields\\\": [\n \\\"\\\"\n ],\n \\\"rerank\\\": true,\n \\\"org_id\\\": \\\"\\\",\n \\\"project_id\\\": \\\"\\\"\n}\")\n .asString();"
}
],
"x-codegen-request-body-name": "data"
@@ -1527,10 +1615,8 @@
"operationId": "memories_read",
"responses": {
"200": {
- "description": "",
- "content": {
-
- }
+ "description": "Successfully retrieved memories.",
+ "content": {}
}
}
},
@@ -1569,12 +1655,12 @@
"type": "string",
"format": "uuid"
},
- "description": "The unique identifier of the memory to retrieve"
+ "description": "The unique identifier of the memory to retrieve."
}
],
"responses": {
"200": {
- "description": "Successfully retrieved the memory",
+ "description": "Successfully retrieved the memory.",
"content": {
"application/json": {
"schema": {
@@ -1583,7 +1669,7 @@
"id": {
"type": "string",
"format": "uuid",
- "description": "Unique identifier for the memory"
+ "description": "Unique identifier for the memory."
},
"memory": {
"type": "string",
@@ -1619,12 +1705,12 @@
"created_at": {
"type": "string",
"format": "date-time",
- "description": "Timestamp of when the memory was created"
+ "description": "Timestamp of when the memory was created."
},
"updated_at": {
"type": "string",
"format": "date-time",
- "description": "Timestamp of when the memory was last updated"
+ "description": "Timestamp of when the memory was last updated."
}
}
}
@@ -1632,7 +1718,7 @@
}
},
"404": {
- "description": "Memory not found",
+ "description": "Memory not found.",
"content": {
"application/json": {
"schema": {
@@ -1649,29 +1735,29 @@
}
},
"x-code-samples": [
- {
- "lang": "Python",
- "source": "# To use the Python SDK, install the package:\n# pip install mem0ai\n\nfrom mem0 import MemoryClient\nclient = MemoryClient(api_key=\"your_api_key\", org_id=\"your_org_id\", project_id=\"your_project_id\")\n\nmemory = client.get(memory_id=\"\")"
- },
- {
- "lang": "JavaScript",
- "source": "// To use the JavaScript SDK, install the package:\n// npm i mem0ai\n\nimport MemoryClient from 'mem0ai';\nconst client = new MemoryClient({ apiKey: \"your-api-key\" });\n\n// Retrieve a specific memory\nclient.get(\"\")\n .then(result => console.log(result))\n .catch(error => console.error(error));"
- },
- {
- "lang": "cURL",
- "source": "curl --request GET \\\n --url https://api.mem0.ai/v1/memories/{memory_id}/ \\\n --header 'Authorization: Token '"
- },
- {
- "lang": "Go",
- "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/memories/{memory_id}/\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
- },
- {
- "lang": "PHP",
- "source": " \"https://api.mem0.ai/v1/memories/{memory_id}/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token