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. ![Graph Memory Visualization](/images/graph_memory/graph_example8.png) @@ -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 \"\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/{memory_id}/\")\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\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 \"\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/{memory_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }, @@ -1690,7 +1776,7 @@ "type": "string", "format": "uuid" }, - "description": "The unique identifier of the memory to retrieve" + "description": "The unique identifier of the memory to retrieve." } ], "requestBody": { @@ -1714,7 +1800,7 @@ }, "responses": { "200": { - "description": "Successfully updated memory", + "description": "Successfully updated memory.", "content": { "application/json": { "schema": { @@ -1723,7 +1809,7 @@ "id": { "type": "string", "format": "uuid", - "description": "The unique identifier of the updated memory" + "description": "The unique identifier of the updated memory." }, "text": { "type": "string", @@ -1760,12 +1846,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." } } } @@ -1774,29 +1860,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# Update a memory\nmemory_id = \"\"\nclient.update(\n memory_id=memory_id,\n text=\"Your updated memory message here\",\n metadata={\"category\": \"example\"}\n)" - }, - { - "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// Update a specific memory\nconst memory_id = \"\";\nclient.update(memory_id, { \n text: \"Your updated memory message here\",\n metadata: { category: \"example\" }\n})\n .then(result => console.log(result))\n .catch(error => console.error(error));" - }, - { - "lang": "cURL", - "source": "curl --request PUT \\\n --url https://api.mem0.ai/v1/memories/{memory_id}/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\"text\": \"Your updated memory text here\", \"metadata\": {\"category\": \"example\"}}'" - }, - { - "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/{memory_id}/\"\n\n\tpayload := strings.NewReader(`{\n\t\"text\": \"Your updated memory text here\",\n\t\"metadata\": {\n\t\t\"category\": \"example\"\n\t}\n}`)\n\n\treq, _ := http.NewRequest(\"PUT\", 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/{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 => \"PUT\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n CURLOPT_POSTFIELDS => json_encode([\n \"text\" => \"Your updated memory text here\",\n \"metadata\" => [\"category\" => \"example\"]\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.put(\"https://api.mem0.ai/v1/memories/{memory_id}/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\\\"text\\\": \\\"Your updated memory text here\\\", \\\"metadata\\\": {\\\"category\\\": \\\"example\\\"}}\")\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# Update a memory\nmemory_id = \"\"\nclient.update(\n memory_id=memory_id,\n text=\"Your updated memory message here\",\n metadata={\"category\": \"example\"}\n)" + }, + { + "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// Update a specific memory\nconst memory_id = \"\";\nclient.update(memory_id, { \n text: \"Your updated memory message here\",\n metadata: { category: \"example\" }\n})\n .then(result => console.log(result))\n .catch(error => console.error(error));" + }, + { + "lang": "cURL", + "source": "curl --request PUT \\\n --url https://api.mem0.ai/v1/memories/{memory_id}/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\"text\": \"Your updated memory text here\", \"metadata\": {\"category\": \"example\"}}'" + }, + { + "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/{memory_id}/\"\n\n\tpayload := strings.NewReader(`{\n\t\"text\": \"Your updated memory text here\",\n\t\"metadata\": {\n\t\t\"category\": \"example\"\n\t}\n}`)\n\n\treq, _ := http.NewRequest(\"PUT\", 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/{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 => \"PUT\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \",\n \"Content-Type: application/json\"\n ],\n CURLOPT_POSTFIELDS => json_encode([\n \"text\" => \"Your updated memory text here\",\n \"metadata\" => [\"category\" => \"example\"]\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.put(\"https://api.mem0.ai/v1/memories/{memory_id}/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\\\"text\\\": \\\"Your updated memory text here\\\", \\\"metadata\\\": {\\\"category\\\": \\\"example\\\"}}\")\n .asString();" } ], "x-codegen-request-body-name": "data" @@ -1816,12 +1902,12 @@ "type": "string", "format": "uuid" }, - "description": "The unique identifier of the memory to retrieve" + "description": "The unique identifier of the memory to retrieve." } ], "responses": { "204": { - "description": "Successful deletion of memory", + "description": "Successful deletion of memory.", "content": { "application/json": { "schema": { @@ -1838,29 +1924,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_id = \"\"\nclient.delete(memory_id=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// Delete a specific memory\nclient.delete(\"\")\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/{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(\"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/{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 => \"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/{memory_id}/\")\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\nmemory_id = \"\"\nclient.delete(memory_id=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// Delete a specific memory\nclient.delete(\"\")\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/{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(\"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/{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 => \"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/{memory_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] } @@ -1881,12 +1967,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 history", + "description": "Successfully retrieved the memory history.", "content": { "application/json": { "schema": { @@ -1897,12 +1983,12 @@ "id": { "type": "string", "format": "uuid", - "description": "Unique identifier for the history entry" + "description": "Unique identifier for the history entry." }, "memory_id": { "type": "string", "format": "uuid", - "description": "Unique identifier of the associated memory" + "description": "Unique identifier of the associated memory." }, "input": { "type": "array", @@ -1959,12 +2045,12 @@ "created_at": { "type": "string", "format": "date-time", - "description": "The timestamp when this history entry was created" + "description": "The timestamp when this history entry was created." }, "updated_at": { "type": "string", "format": "date-time", - "description": "The timestamp when this history entry was last updated" + "description": "The timestamp when this history entry was last updated." } }, "required": [ @@ -1984,29 +2070,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# Add some message to create history\nmessages = [{\"role\": \"user\", \"content\": \"\"}]\nclient.add(messages, user_id=\"\")\n\n# Add second message to update history\nmessages.append({\"role\": \"user\", \"content\": \"\"})\nclient.add(messages, user_id=\"\")\n\n# Get history of how memory changed over time\nmemory_id = \"\"\nhistory = client.history(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// Get history of how memory changed over time\nclient.history(\"\")\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}/history/ \\\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}/history/\"\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}/history/\",\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/{memory_id}/history/\")\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# Add some message to create history\nmessages = [{\"role\": \"user\", \"content\": \"\"}]\nclient.add(messages, user_id=\"\")\n\n# Add second message to update history\nmessages.append({\"role\": \"user\", \"content\": \"\"})\nclient.add(messages, user_id=\"\")\n\n# Get history of how memory changed over time\nmemory_id = \"\"\nhistory = client.history(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// Get history of how memory changed over time\nclient.history(\"\")\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}/history/ \\\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}/history/\"\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}/history/\",\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/{memory_id}/history/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] } @@ -2030,7 +2116,7 @@ }, "responses": { "201": { - "description": "", + "description": "Run created successfully.", "content": { "application/json": { "schema": { @@ -2053,10 +2139,8 @@ "operationId": "stats_list", "responses": { "200": { - "description": "", - "content": { - - } + "description": "Successfully retrieved statistics.", + "content": {} } } } @@ -2080,7 +2164,7 @@ }, "responses": { "201": { - "description": "", + "description": "User created successfully.", "content": { "application/json": { "schema": { @@ -2115,7 +2199,11 @@ }, "feedback": { "type": "string", - "enum": ["POSITIVE", "NEGATIVE", "VERY_NEGATIVE"], + "enum": [ + "POSITIVE", + "NEGATIVE", + "VERY_NEGATIVE" + ], "nullable": true, "description": "Type of feedback" }, @@ -2132,7 +2220,7 @@ }, "responses": { "200": { - "description": "Successful operation", + "description": "Successful operation.", "content": { "application/json": { "schema": { @@ -2145,7 +2233,11 @@ }, "feedback": { "type": "string", - "enum": ["POSITIVE", "NEGATIVE", "VERY_NEGATIVE"], + "enum": [ + "POSITIVE", + "NEGATIVE", + "VERY_NEGATIVE" + ], "nullable": true, "description": "Type of feedback" }, @@ -2167,18 +2259,18 @@ } }, "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\")\n\n# Submit feedback for a memory\nfeedback = client.feedback(memory_id=\"memory_id\", feedback=\"POSITIVE\")\nprint(feedback)" - }, - { - "lang": "JavaScript", - "source": "// To use the JavaScript SDK, install the package:\n// npm install mem0ai\n\nimport MemoryClient from 'mem0ai';\n\nconst client = new MemoryClient({ apiKey: 'your-api-key'});\n\nclient.feedback({\n memory_id: \"your-memory-id\", \n feedback: \"NEGATIVE\", \n feedback_reason: \"I don't like this memory because it is not relevant.\"\n})" - }, - { - "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/feedback/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\"memory_id\": \"memory_id\", \"feedback\": \"POSITIVE\"}'" - } + { + "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\")\n\n# Submit feedback for a memory\nfeedback = client.feedback(memory_id=\"memory_id\", feedback=\"POSITIVE\")\nprint(feedback)" + }, + { + "lang": "JavaScript", + "source": "// To use the JavaScript SDK, install the package:\n// npm install mem0ai\n\nimport MemoryClient from 'mem0ai';\n\nconst client = new MemoryClient({ apiKey: 'your-api-key'});\n\nclient.feedback({\n memory_id: \"your-memory-id\", \n feedback: \"NEGATIVE\", \n feedback_reason: \"I don't like this memory because it is not relevant.\"\n})" + }, + { + "lang": "cURL", + "source": "curl --request POST \\\n --url https://api.mem0.ai/v1/feedback/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\"memory_id\": \"memory_id\", \"feedback\": \"POSITIVE\"}'" + } ] } }, @@ -2190,7 +2282,7 @@ "operationId": "organizations_read", "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { "application/json": { "schema": { @@ -2200,15 +2292,15 @@ "properties": { "id": { "type": "integer", - "description": "Unique identifier for the organization" + "description": "Unique identifier for the organization." }, "org_id": { "type": "string", - "description": "Organization's unique string identifier" + "description": "Organization's unique string identifier." }, "name": { "type": "string", - "description": "Name of the organization" + "description": "Name of the organization." }, "description": { "type": "string", @@ -2237,12 +2329,12 @@ "created_at": { "type": "string", "format": "date-time", - "description": "Timestamp of when the organization was created" + "description": "Timestamp of when the organization was created." }, "updated_at": { "type": "string", "format": "date-time", - "description": "Timestamp of when the organization was last updated" + "description": "Timestamp of when the organization was last updated." }, "owner": { "type": "integer", @@ -2253,7 +2345,7 @@ "items": { "type": "integer" }, - "description": "List of member identifiers belonging to the organization" + "description": "List of member identifiers belonging to the organization." } } } @@ -2263,29 +2355,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/ \\\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/api/v1/orgs/organizations/\"\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/api/v1/orgs/organizations/\",\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/api/v1/orgs/organizations/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/ \\\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/api/v1/orgs/organizations/\"\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/api/v1/orgs/organizations/\",\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/api/v1/orgs/organizations/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }, @@ -2304,17 +2396,19 @@ "properties": { "name": { "type": "string", - "description": "Name of the new organization" + "description": "Name of the new organization." } }, - "required": ["name"] + "required": [ + "name" + ] } } } }, "responses": { "201": { - "description": "Successfully created a new organization", + "description": "Successfully created a new organization.", "content": { "application/json": { "schema": { @@ -2327,7 +2421,7 @@ "org_id": { "type": "string", "format": "uuid", - "description": "Unique identifier for the organization" + "description": "Unique identifier for the organization." } } } @@ -2335,7 +2429,7 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { @@ -2343,7 +2437,7 @@ "properties": { "errors": { "type": "object", - "description": "Errors found in the payload", + "description": "Errors found in the payload.", "additionalProperties": { "type": "array", "items": { @@ -2358,29 +2452,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/\"\n\npayload = {\"name\": \"\"}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"name\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"name\": \"\"\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/api/v1/orgs/organizations/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"name\\\": \\\"\\\"\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/api/v1/orgs/organizations/\",\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 \\\"name\\\": \\\"\\\"\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.get(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/\"\n\npayload = {\"name\": \"\"}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"name\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"name\": \"\"\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/api/v1/orgs/organizations/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"name\\\": \\\"\\\"\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/api/v1/orgs/organizations/\",\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 \\\"name\\\": \\\"\\\"\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.get(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] } @@ -2406,7 +2500,7 @@ ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { "application/json": { "schema": { @@ -2414,7 +2508,7 @@ "properties": { "id": { "type": "integer", - "description": "Unique identifier for the organization" + "description": "Unique identifier for the organization." }, "org_id": { "type": "string", @@ -2422,7 +2516,7 @@ }, "name": { "type": "string", - "description": "Name of the organization" + "description": "Name of the organization." }, "description": { "type": "string", @@ -2453,12 +2547,12 @@ "created_at": { "type": "string", "format": "date-time", - "description": "Timestamp of when the organization was created" + "description": "Timestamp of when the organization was created." }, "updated_at": { "type": "string", "format": "date-time", - "description": "Timestamp of when the organization was last updated" + "description": "Timestamp of when the organization was last updated." }, "owner": { "type": "integer", @@ -2469,7 +2563,7 @@ "items": { "type": "integer" }, - "description": "List of member identifiers belonging to the organization" + "description": "List of member identifiers belonging to the organization." } } } @@ -2477,7 +2571,7 @@ } }, "404": { - "description": "Organization not found", + "description": "Organization not found.", "content": { "application/json": { "schema": { @@ -2494,29 +2588,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/\"\n\nheaders = {\"Authorization\": \"Token \"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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 \"\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/api/v1/orgs/organizations/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\\n \\\"name\\\": \\\"\\\"\\n}\")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/\"\n\nheaders = {\"Authorization\": \"Token \"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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 \"\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/api/v1/orgs/organizations/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\\n \\\"name\\\": \\\"\\\"\\n}\")\n .asString();" } ] }, @@ -2532,7 +2626,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization to delete", + "description": "Unique identifier of the organization to delete.", "schema": { "type": "string" } @@ -2556,7 +2650,7 @@ } }, "403": { - "description": "Unauthorized", + "description": "Unauthorized.", "content": { "application/json": { "schema": { @@ -2572,7 +2666,7 @@ } }, "404": { - "description": "Organization not found", + "description": "Organization not found.", "content": { "application/json": { "schema": { @@ -2589,29 +2683,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_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/api/v1/orgs/organizations/{org_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] } @@ -2629,7 +2723,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -2637,7 +2731,7 @@ ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { "application/json": { "schema": { @@ -2650,15 +2744,15 @@ "properties": { "user_id": { "type": "string", - "description": "Unique identifier of the member" + "description": "Unique identifier of the member." }, "role": { "type": "string", - "description": "Role of the member in the organization" + "description": "Role of the member in the organization." } } }, - "description": "List of members belonging to the organization" + "description": "List of members belonging to the organization." } } } @@ -2666,7 +2760,7 @@ } }, "404": { - "description": "Organization not found", + "description": "Organization not found.", "content": { "application/json": { "schema": { @@ -2683,29 +2777,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/ \\\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/api/v1/orgs/organizations/{org_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/members/\",\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/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/ \\\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/api/v1/orgs/organizations/{org_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/members/\",\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/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }, @@ -2721,7 +2815,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -2740,7 +2834,7 @@ "properties": { "email": { "type": "string", - "description": "Email of the member whose role is to be updated" + "description": "Email of the member whose role is to be updated." }, "role": { "type": "string", @@ -2753,7 +2847,7 @@ }, "responses": { "200": { - "description": "User role updated successfully", + "description": "User role updated successfully.", "content": { "application/json": { "schema": { @@ -2769,7 +2863,7 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { @@ -2777,7 +2871,7 @@ "properties": { "errors": { "type": "object", - "description": "Errors found in the payload", + "description": "Errors found in the payload.", "additionalProperties": { "type": "array", "items": { @@ -2791,7 +2885,7 @@ } }, "404": { - "description": "Organization not found", + "description": "Organization not found.", "content": { "application/json": { "schema": { @@ -2808,29 +2902,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'PUT',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request PUT \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"PUT\", 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/api/v1/orgs/organizations/{org_id}/members/\",\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 => \"PUT\",\n CURLOPT_POSTFIELDS => \"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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.put(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'PUT',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request PUT \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"PUT\", 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/api/v1/orgs/organizations/{org_id}/members/\",\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 => \"PUT\",\n CURLOPT_POSTFIELDS => \"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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.put(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n .asString();" } ] }, @@ -2846,7 +2940,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -2865,11 +2959,11 @@ "properties": { "email": { "type": "string", - "description": "Email of the member to be added" + "description": "Email of the member to be added." }, "role": { "type": "string", - "description": "Role of the member in the organization" + "description": "Role of the member in the organization." } } } @@ -2878,7 +2972,7 @@ }, "responses": { "201": { - "description": "Member added successfully", + "description": "Member added successfully.", "content": { "application/json": { "schema": { @@ -2894,7 +2988,7 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { @@ -2902,7 +2996,7 @@ "properties": { "errors": { "type": "object", - "description": "Errors found in the payload", + "description": "Errors found in the payload.", "additionalProperties": { "type": "array", "items": { @@ -2916,7 +3010,7 @@ } }, "404": { - "description": "Organization not found", + "description": "Organization not found.", "content": { "application/json": { "schema": { @@ -2933,29 +3027,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/members/\",\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 \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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.get(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/members/\",\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 \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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.get(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }, @@ -2970,7 +3064,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -2988,7 +3082,7 @@ "properties": { "email": { "type": "string", - "description": "Email of the member to be removed" + "description": "Email of the member to be removed." } } } @@ -2997,7 +3091,7 @@ }, "responses": { "200": { - "description": "Member removed successfully", + "description": "Member removed successfully.", "content": { "application/json": { "schema": { @@ -3013,7 +3107,7 @@ } }, "404": { - "description": "Organization not found", + "description": "Organization not found.", "content": { "application/json": { "schema": { @@ -3030,29 +3124,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\npayload = {\"email\": \"\"}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"DELETE\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'DELETE',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', 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/api/v1/orgs/organizations/{org_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\"\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/api/v1/orgs/organizations/{org_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"DELETE\", 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/api/v1/orgs/organizations/{org_id}/members/\",\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_POSTFIELDS => \"{\n \\\"email\\\": \\\"\\\"\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.delete(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\"\n}\")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\"\n\npayload = {\"email\": \"\"}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"DELETE\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'DELETE',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/', 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/api/v1/orgs/organizations/{org_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\"\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/api/v1/orgs/organizations/{org_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"DELETE\", 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/api/v1/orgs/organizations/{org_id}/members/\",\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_POSTFIELDS => \"{\n \\\"email\\\": \\\"\\\"\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.delete(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\"\n}\")\n .asString();" } ] } @@ -3070,7 +3164,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3078,7 +3172,7 @@ ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { "application/json": { "schema": { @@ -3096,7 +3190,7 @@ }, "name": { "type": "string", - "description": "Name of the project" + "description": "Name of the project." }, "description": { "type": "string", @@ -3123,11 +3217,11 @@ }, "role": { "type": "string", - "description": "Role of the member in the project" + "description": "Role of the member in the project." } } }, - "description": "List of members belonging to the project" + "description": "List of members belonging to the project." } } } @@ -3137,29 +3231,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/ \\\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/api/v1/orgs/organizations/{org_id}/projects/\"\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/api/v1/orgs/organizations/{org_id}/projects/\",\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/api/v1/orgs/organizations/{org_id}/projects/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/ \\\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/api/v1/orgs/organizations/{org_id}/projects/\"\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/api/v1/orgs/organizations/{org_id}/projects/\",\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/api/v1/orgs/organizations/{org_id}/projects/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }, @@ -3175,7 +3269,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3202,7 +3296,7 @@ }, "responses": { "200": { - "description": "Project created successfully", + "description": "Project created successfully.", "content": { "application/json": { "schema": { @@ -3215,7 +3309,7 @@ "project_id": { "type": "string", "format": "uuid", - "description": "Unique identifier for the project" + "description": "Unique identifier for the project." } } } @@ -3223,14 +3317,14 @@ } }, "403": { - "description": "Unauthorized", + "description": "Unauthorized.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { - "type": "string", + "type": "string", "example": "Unauthorized to create projects in this organization." } } @@ -3239,7 +3333,7 @@ } }, "400": { - "description": "Bad request", + "description": "Bad request.", "content": { "application/json": { "schema": { @@ -3256,29 +3350,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/\"\n\npayload = {\"name\": \"\"}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"name\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"name\": \"\"\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/api/v1/orgs/organizations/{org_id}/projects/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"name\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/\",\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 \\\"name\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"name\\\": \\\"\\\"\n}\")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/\"\n\npayload = {\"name\": \"\"}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"name\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"name\": \"\"\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/api/v1/orgs/organizations/{org_id}/projects/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"name\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/\",\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 \\\"name\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"name\\\": \\\"\\\"\n}\")\n .asString();" } ] } @@ -3296,7 +3390,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3305,7 +3399,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project", + "description": "Unique identifier of the project.", "schema": { "type": "string" } @@ -3313,7 +3407,7 @@ ], "responses": { "200": { - "description": "Successful response", + "description": "Successful response.", "content": { "application/json": { "schema": { @@ -3356,7 +3450,7 @@ }, "role": { "type": "string", - "description": "Role of the member in the project" + "description": "Role of the member in the project." } } }, @@ -3368,7 +3462,7 @@ } }, "404": { - "description": "Organization or project not found", + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -3385,29 +3479,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\nresponse = client.get_project()\nprint(response)" + { + "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\nresponse = client.get_project()\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\nclient.getProject()\n .then(response => console.log(response))\n .catch(err => console.error(err));" + "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\nclient.getProject()\n .then(response => console.log(response))\n .catch(err => console.error(err));" }, { - "lang": "cURL", - "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/ \\\n --header 'Authorization: Token '" + "lang": "cURL", + "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/ \\\n --header 'Authorization: Token '" }, { - "lang": "Go", - "source": "// To use the Go SDK, install the package:\n// go get github.com/mem0ai/mem0-go\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mem0ai/mem0-go\"\n)\n\nfunc main() {\n\tclient := mem0.NewClient(\"your-api-key\")\n\n\tresponse, err := client.GetProject()\n\tif err != nil {\n\t\tfmt.Printf(\"Error: %v\\n\", err)\n\t\treturn\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}" + "lang": "Go", + "source": "// To use the Go SDK, install the package:\n// go get github.com/mem0ai/mem0-go\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mem0ai/mem0-go\"\n)\n\nfunc main() {\n\tclient := mem0.NewClient(\"your-api-key\")\n\n\tresponse, err := client.GetProject()\n\tif err != nil {\n\t\tfmt.Printf(\"Error: %v\\n\", err)\n\t\treturn\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}" }, { - "lang": "PHP", - "source": "getProject();\n print_r($response);\n} catch (Exception $e) {\n echo 'Error: ' . $e->getMessage();\n}" + "lang": "PHP", + "source": "getProject();\n print_r($response);\n} catch (Exception $e) {\n echo 'Error: ' . $e->getMessage();\n}" }, { - "lang": "Java", - "source": "// To use the Java SDK, add this dependency to your pom.xml:\n// \n// ai.mem0\n// mem0-java\n// 1.0.0\n// \n\nimport ai.mem0.MemoryClient;\n\npublic class Example {\n public static void main(String[] args) {\n MemoryClient client = new MemoryClient(\"your-api-key\");\n \n try {\n Object response = client.getProject();\n System.out.println(response);\n } catch (Exception e) {\n System.err.println(\"Error: \" + e.getMessage());\n }\n }\n}" + "lang": "Java", + "source": "// To use the Java SDK, add this dependency to your pom.xml:\n// \n// ai.mem0\n// mem0-java\n// 1.0.0\n// \n\nimport ai.mem0.MemoryClient;\n\npublic class Example {\n public static void main(String[] args) {\n MemoryClient client = new MemoryClient(\"your-api-key\");\n \n try {\n Object response = client.getProject();\n System.out.println(response);\n } catch (Exception e) {\n System.err.println(\"Error: \" + e.getMessage());\n }\n }\n}" } ] }, @@ -3420,19 +3514,19 @@ "operationId": "update_project", "parameters": [ { - "name": "org_id", + "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } }, { "name": "project_id", - "in": "path", + "in": "path", "required": true, - "description": "Unique identifier of the project to be updated", + "description": "Unique identifier of the project to be updated.", "schema": { "type": "string" } @@ -3464,7 +3558,7 @@ "items": { "type": "object" }, - "description": "List of custom categories to be used for memory categorization" + "description": "List of custom categories to be used for memory categorization." } } } @@ -3473,7 +3567,7 @@ }, "responses": { "200": { - "description": "Project updated successfully", + "description": "Project updated successfully.", "content": { "application/json": { "schema": { @@ -3489,7 +3583,7 @@ } }, "404": { - "description": "Organization or project not found", + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -3506,30 +3600,30 @@ } }, "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\")\n\nnew_categories = [\n {\"cooking\": \"For users interested in cooking and culinary experiences\"},\n {\"fitness\": \"Includes content related to fitness and workouts\"}\n]\n\nresponse = client.update_project(custom_categories=new_categories)\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 newCategories = [\n {\"cooking\": \"For users interested in cooking and culinary experiences\"},\n {\"fitness\": \"Includes content related to fitness and workouts\"}\n];\n\nclient.updateProject({ custom_categories: newCategories })\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request PATCH \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"custom_categories\": [\n {\"cooking\": \"For users interested in cooking and culinary experiences\"},\n {\"fitness\": \"Includes content related to fitness and workouts\"}\n ]\n }'" - }, - { - "lang": "Go", - "source": "// To use the Go SDK, install the package:\n// go get github.com/mem0ai/mem0-go\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mem0ai/mem0-go\"\n)\n\nfunc main() {\n\tclient := mem0.NewClient(\"your-api-key\")\n\n\tnewCategories := []map[string]string{\n\t\t{\"cooking\": \"For users interested in cooking and culinary experiences\"},\n\t\t{\"fitness\": \"Includes content related to fitness and workouts\"},\n\t}\n\n\tresponse, err := client.UpdateProject(mem0.UpdateProjectParams{\n\t\tCustomCategories: newCategories,\n\t})\n\tif err != nil {\n\t\tfmt.Printf(\"Error: %v\\n\", err)\n\t\treturn\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}" - }, - { - "lang": "PHP", - "source": " 'For users interested in cooking and culinary experiences'],\n ['fitness' => 'Includes content related to fitness and workouts']\n];\n\ntry {\n $response = $client->updateProject(['custom_categories' => $newCategories]);\n print_r($response);\n} catch (Exception $e) {\n echo 'Error: ' . $e->getMessage();\n}" - }, - { - "lang": "Java", - "source": "// To use the Java SDK, add this dependency to your pom.xml:\n// \n// ai.mem0\n// mem0-java\n// 1.0.0\n// \n\nimport ai.mem0.MemoryClient;\nimport java.util.*;\n\npublic class Example {\n public static void main(String[] args) {\n MemoryClient client = new MemoryClient(\"your-api-key\");\n \n List> newCategories = Arrays.asList(\n Collections.singletonMap(\"cooking\", \"For users interested in cooking and culinary experiences\"),\n Collections.singletonMap(\"fitness\", \"Includes content related to fitness and workouts\")\n );\n \n try {\n Map params = new HashMap<>();\n params.put(\"custom_categories\", newCategories);\n \n Object response = client.updateProject(params);\n System.out.println(response);\n } catch (Exception e) {\n System.err.println(\"Error: \" + e.getMessage());\n }\n }\n}" - } + { + "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\")\n\nnew_categories = [\n {\"cooking\": \"For users interested in cooking and culinary experiences\"},\n {\"fitness\": \"Includes content related to fitness and workouts\"}\n]\n\nresponse = client.update_project(custom_categories=new_categories)\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 newCategories = [\n {\"cooking\": \"For users interested in cooking and culinary experiences\"},\n {\"fitness\": \"Includes content related to fitness and workouts\"}\n];\n\nclient.updateProject({ custom_categories: newCategories })\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request PATCH \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"custom_categories\": [\n {\"cooking\": \"For users interested in cooking and culinary experiences\"},\n {\"fitness\": \"Includes content related to fitness and workouts\"}\n ]\n }'" + }, + { + "lang": "Go", + "source": "// To use the Go SDK, install the package:\n// go get github.com/mem0ai/mem0-go\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/mem0ai/mem0-go\"\n)\n\nfunc main() {\n\tclient := mem0.NewClient(\"your-api-key\")\n\n\tnewCategories := []map[string]string{\n\t\t{\"cooking\": \"For users interested in cooking and culinary experiences\"},\n\t\t{\"fitness\": \"Includes content related to fitness and workouts\"},\n\t}\n\n\tresponse, err := client.UpdateProject(mem0.UpdateProjectParams{\n\t\tCustomCategories: newCategories,\n\t})\n\tif err != nil {\n\t\tfmt.Printf(\"Error: %v\\n\", err)\n\t\treturn\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}" + }, + { + "lang": "PHP", + "source": " 'For users interested in cooking and culinary experiences'],\n ['fitness' => 'Includes content related to fitness and workouts']\n];\n\ntry {\n $response = $client->updateProject(['custom_categories' => $newCategories]);\n print_r($response);\n} catch (Exception $e) {\n echo 'Error: ' . $e->getMessage();\n}" + }, + { + "lang": "Java", + "source": "// To use the Java SDK, add this dependency to your pom.xml:\n// \n// ai.mem0\n// mem0-java\n// 1.0.0\n// \n\nimport ai.mem0.MemoryClient;\nimport java.util.*;\n\npublic class Example {\n public static void main(String[] args) {\n MemoryClient client = new MemoryClient(\"your-api-key\");\n \n List> newCategories = Arrays.asList(\n Collections.singletonMap(\"cooking\", \"For users interested in cooking and culinary experiences\"),\n Collections.singletonMap(\"fitness\", \"Includes content related to fitness and workouts\")\n );\n \n try {\n Map params = new HashMap<>();\n params.put(\"custom_categories\", newCategories);\n \n Object response = client.updateProject(params);\n System.out.println(response);\n } catch (Exception e) {\n System.err.println(\"Error: \" + e.getMessage());\n }\n }\n}" + } ] }, "delete": { @@ -3544,7 +3638,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3553,7 +3647,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project to be deleted", + "description": "Unique identifier of the project to be deleted.", "schema": { "type": "string" } @@ -3577,7 +3671,7 @@ } }, "404": { - "description": "Organization or project not found", + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -3596,7 +3690,7 @@ "description": "Unauthorized to modify this project", "content": { "application/json": { - "schema": { + "schema": { "type": "object", "properties": { "message": { @@ -3610,29 +3704,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] } @@ -3650,7 +3744,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3659,7 +3753,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project", + "description": "Unique identifier of the project.", "schema": { "type": "string" } @@ -3693,7 +3787,7 @@ } }, "404": { - "description": "Organization or project not found", + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -3710,29 +3804,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\nheaders = {\"Authorization\": \"\"}\n\nresponse = requests.request(\"GET\", url, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {method: 'GET', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request GET \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }, @@ -3748,7 +3842,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3757,7 +3851,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project", + "description": "Unique identifier of the project.", "schema": { "type": "string" } @@ -3776,11 +3870,11 @@ "properties": { "email": { "type": "string", - "description": "Email of the member to be added" + "description": "Email of the member to be added." }, "role": { "type": "string", - "description": "Role of the member in the project" + "description": "Role of the member in the project." } } } @@ -3805,23 +3899,23 @@ } }, "403": { - "description": "Unauthorized to modify project members", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Unauthorized to modify project members." + "description": "Unauthorized to modify project members", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unauthorized to modify project members." + } } } } } - } - }, + }, "404": { - "description": "Organization or project not found", + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -3838,29 +3932,29 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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 \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"POST\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'POST',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request POST \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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 \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n .asString();" } ] }, @@ -3876,7 +3970,7 @@ "name": "org_id", "in": "path", "required": true, - "description": "Unique identifier of the organization", + "description": "Unique identifier of the organization.", "schema": { "type": "string" } @@ -3885,7 +3979,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project", + "description": "Unique identifier of the project.", "schema": { "type": "string" } @@ -3917,7 +4011,7 @@ }, "responses": { "200": { - "description": "User role updated successfully", + "description": "User role updated successfully.", "content": { "application/json": { "schema": { @@ -3933,23 +4027,23 @@ } }, "403": { - "description": "Unauthorized to modify project members", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Unauthorized to modify project members." + "description": "Unauthorized to modify project members", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unauthorized to modify project members." + } } } } } - } - }, + }, "404": { - "description": "Organization or project not found", + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -3966,100 +4060,102 @@ } }, "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)" - }, - { - "lang": "JavaScript", - "source": "const options = {\n method: 'PUT',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "curl --request PUT \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"PUT\", 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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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 => \"PUT\",\n CURLOPT_POSTFIELDS => \"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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.put(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n .asString();" + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\npayload = {\n \"email\": \"\",\n \"role\": \"\"\n}\nheaders = {\n \"Authorization\": \"\",\n \"Content-Type\": \"application/json\"\n}\n\nresponse = requests.request(\"PUT\", url, json=payload, headers=headers)\n\nprint(response.text)" + }, + { + "lang": "JavaScript", + "source": "const options = {\n method: 'PUT',\n headers: {Authorization: 'Token ', 'Content-Type': 'application/json'},\n body: '{\"email\":\"\",\"role\":\"\"}'\n};\n\nfetch('https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "curl --request PUT \\\n --url https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\n --header 'Authorization: Token ' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"email\": \"\",\n \"role\": \"\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\n\n\tpayload := strings.NewReader(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n\n\treq, _ := http.NewRequest(\"PUT\", 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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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 => \"PUT\",\n CURLOPT_POSTFIELDS => \"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\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.put(\"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"email\\\": \\\"\\\",\n \\\"role\\\": \\\"\\\"\n}\")\n .asString();" } ] }, - "delete": { - "summary": "Delete Project Member", - "operationId": "deleteProjectMember", - "tags": ["Project"], - "parameters": [ - { - "name": "org_id", - "in": "path", - "required": true, - "description": "Unique identifier of the organization", - "schema": { - "type": "string" + "delete": { + "summary": "Delete Project Member", + "operationId": "deleteProjectMember", + "tags": [ + "Project" + ], + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "description": "Unique identifier of the organization.", + "schema": { + "type": "string" + } + }, + { + "name": "project_id", + "in": "path", + "required": true, + "description": "Unique identifier of the project.", + "schema": { + "type": "string" + } + }, + { + "name": "email", + "in": "query", + "required": true, + "description": "Email of the member to be removed", + "schema": { + "type": "string" + } } - }, - { - "name": "project_id", - "in": "path", - "required": true, - "description": "Unique identifier of the project", - "schema": { - "type": "string" - } - }, - { - "name": "email", - "in": "query", - "required": true, - "description": "Email of the member to be removed", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Member removed from the project successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Member removed from the project" + ], + "responses": { + "200": { + "description": "Member removed from the project successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Member removed from the project" + } } } } } - } - }, - "403": { - "description": "Unauthorized to modify project members", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Unauthorized to modify project members." + }, + "403": { + "description": "Unauthorized to modify project members", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Unauthorized to modify project members." + } } } } } - } - }, - "404": { - "description": "Organization or project not found", + }, + "404": { + "description": "Organization or project not found.", "content": { "application/json": { "schema": { @@ -4073,35 +4169,35 @@ } } } - } - }, - "x-code-samples": [ - { - "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', 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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + "x-code-samples": [ + { + "lang": "Python", + "source": "import requests\n\nurl = \"https://api.mem0.ai/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/', 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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/ \\\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\"\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\",\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/api/v1/orgs/organizations/{org_id}/projects/{project_id}/members/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] - } + } }, "/v1/batch/": { "put": { @@ -4120,7 +4216,10 @@ "type": "array", "items": { "type": "object", - "required": ["memory_id", "text"], + "required": [ + "memory_id", + "text" + ], "properties": { "memory_id": { "type": "string", @@ -4136,7 +4235,9 @@ "maxItems": 1000 } }, - "required": ["memories"] + "required": [ + "memories" + ] } } }, @@ -4160,7 +4261,7 @@ } }, "400": { - "description": "Bad Request", + "description": "Bad Request.", "content": { "application/json": { "schema": { @@ -4177,18 +4278,18 @@ } }, "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\nupdate_memories = [\n {\n \"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\",\n \"text\": \"Watches football\"\n },\n {\n \"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\",\n \"text\": \"Likes to travel\"\n }\n]\n\nresponse = client.batch_update(update_memories)\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 updateMemories = [\n {\n memoryId: \"285ed74b-6e05-4043-b16b-3abd5b533496\",\n text: \"Watches football\"\n },\n {\n memoryId: \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\",\n text: \"Likes to travel\"\n }\n];\n\nclient.batchUpdate(updateMemories)\n .then(response => console.log('Batch update response:', response))\n .catch(error => console.error(error));" - }, - { - "lang": "cURL", - "source": "curl -X PUT \"https://api.mem0.ai/v1/batch/\" \\\n -H \"Authorization: Token your-api-key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"memories\": [\n {\n \"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\",\n \"text\": \"Watches football\"\n },\n {\n \"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\",\n \"text\": \"Likes to travel\"\n }\n ]\n }'" - } + { + "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\nupdate_memories = [\n {\n \"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\",\n \"text\": \"Watches football\"\n },\n {\n \"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\",\n \"text\": \"Likes to travel\"\n }\n]\n\nresponse = client.batch_update(update_memories)\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 updateMemories = [\n {\n memoryId: \"285ed74b-6e05-4043-b16b-3abd5b533496\",\n text: \"Watches football\"\n },\n {\n memoryId: \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\",\n text: \"Likes to travel\"\n }\n];\n\nclient.batchUpdate(updateMemories)\n .then(response => console.log('Batch update response:', response))\n .catch(error => console.error(error));" + }, + { + "lang": "cURL", + "source": "curl -X PUT \"https://api.mem0.ai/v1/batch/\" \\\n -H \"Authorization: Token your-api-key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"memories\": [\n {\n \"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\",\n \"text\": \"Watches football\"\n },\n {\n \"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\",\n \"text\": \"Likes to travel\"\n }\n ]\n }'" + } ] }, "delete": { @@ -4210,10 +4311,12 @@ "format": "uuid" }, "maxItems": 1000, - "description": "Array of memory IDs to delete" + "description": "Array of memory IDs to delete." } }, - "required": ["memory_ids"] + "required": [ + "memory_ids" + ] } } }, @@ -4237,7 +4340,7 @@ } }, "400": { - "description": "Bad Request", + "description": "Bad Request.", "content": { "application/json": { "schema": { @@ -4254,24 +4357,26 @@ } }, "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\ndelete_memories = [\n {\"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\"},\n {\"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\"}\n]\n\nresponse = client.batch_delete(delete_memories)\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 deleteMemories = [\n { memory_id: \"285ed74b-6e05-4043-b16b-3abd5b533496\" },\n { memory_id: \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\" }\n];\n\nclient.batchDelete(deleteMemories)\n .then(response => console.log('Batch delete response:', response))\n .catch(error => console.error(error));" - }, - { - "lang": "cURL", - "source": "curl -X DELETE \"https://api.mem0.ai/v1/batch/\" \\\n -H \"Authorization: Token your-api-key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"memories\": [\n {\n \"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\"\n },\n {\n \"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\"\n }\n ]\n }'" - } + { + "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\ndelete_memories = [\n {\"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\"},\n {\"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\"}\n]\n\nresponse = client.batch_delete(delete_memories)\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 deleteMemories = [\n { memory_id: \"285ed74b-6e05-4043-b16b-3abd5b533496\" },\n { memory_id: \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\" }\n];\n\nclient.batchDelete(deleteMemories)\n .then(response => console.log('Batch delete response:', response))\n .catch(error => console.error(error));" + }, + { + "lang": "cURL", + "source": "curl -X DELETE \"https://api.mem0.ai/v1/batch/\" \\\n -H \"Authorization: Token your-api-key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"memories\": [\n {\n \"memory_id\": \"285ed74b-6e05-4043-b16b-3abd5b533496\"\n },\n {\n \"memory_id\": \"2c9bd859-d1b7-4d33-a6b8-94e0147c4f07\"\n }\n ]\n }'" + } ] } }, "/api/v1/webhooks/projects/{project_id}/": { "get": { - "tags": ["webhooks"], + "tags": [ + "webhooks" + ], "summary": "Get Project Webhooks", "description": "Retrieve all webhooks for a specific project", "operationId": "get_project_webhooks", @@ -4280,7 +4385,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project", + "description": "Unique identifier of the project.", "schema": { "type": "string" } @@ -4288,7 +4393,7 @@ ], "responses": { "200": { - "description": "List of webhooks for the project", + "description": "List of webhooks for the project.", "content": { "application/json": { "schema": { @@ -4298,7 +4403,7 @@ "properties": { "webhook_id": { "type": "string", - "description": "Unique identifier of the webhook" + "description": "Unique identifier of the webhook." }, "name": { "type": "string", @@ -4306,14 +4411,14 @@ }, "url": { "type": "string", - "description": "URL endpoint for the webhook" + "description": "URL endpoint for the webhook." }, "event_types": { "type": "array", "items": { "type": "string" }, - "description": "List of event types the webhook subscribes to" + "description": "List of event types the webhook subscribes to." }, "is_active": { "type": "boolean", @@ -4357,34 +4462,36 @@ } }, "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\")\n\n# Get all webhooks\nwebhooks = client.get_webhooks(project_id=\"your_project_id\")\nprint(webhooks)\n\n# Create a webhook\nwebhook = client.create_webhook(\n url=\"https://your-webhook-url.com\",\n name=\"My Webhook\",\n project_id=\"your_project_id\",\n event_types=[\"memory:add\"]\n)\nprint(webhook)" - }, - { - "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// Get all webhooks\nclient.getWebhooks('your_project_id')\n .then(webhooks => console.log(webhooks))\n .catch(err => console.error(err));\n\n// Create a webhook\nclient.createWebhook({\n url: 'https://your-webhook-url.com',\n name: 'My Webhook',\n project_id: 'your_project_id',\n event_types: ['memory:add']\n})\n .then(webhook => console.log(webhook))\n .catch(err => console.error(err));" - }, - { - "lang": "cURL", - "source": "# Get all webhooks\ncurl --request GET \\\n --url 'https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/' \\\n --header 'Authorization: Token your-api-key'\n\n# Create a webhook\ncurl --request POST \\\n --url 'https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/' \\\n --header 'Authorization: Token your-api-key' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"url\": \"https://your-webhook-url.com\",\n \"name\": \"My Webhook\",\n \"event_types\": [\"memory:add\"]\n }'" - }, - { - "lang": "PHP", - "source": " \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => [\"Authorization: Token your-api-key\"],\n]);\n\n$response = curl_exec($curl);\n\n// Create a webhook\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => json_encode([\n \"url\" => \"https://your-webhook-url.com\",\n \"name\" => \"My Webhook\",\n \"event_types\" => [\"memory:add\"]\n ]),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token your-api-key\",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\ncurl_close($curl);" - }, - { - "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\t// Get all webhooks\n\treq, _ := http.NewRequest(\"GET\", \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\", nil)\n\treq.Header.Add(\"Authorization\", \"Token your-api-key\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\tfmt.Println(string(body))\n\n\t// Create a webhook\n\tpayload := strings.NewReader(`{\n\t\t\"url\": \"https://your-webhook-url.com\",\n\t\t\"name\": \"My Webhook\",\n\t\t\"event_types\": [\"memory:add\"]\n\t}`)\n\n\treq, _ = http.NewRequest(\"POST\", \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\", 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\tfmt.Println(string(body))\n}" - }, - { - "lang": "Java", - "source": "// Get all webhooks\nHttpResponse response = Unirest.get(\"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .asString();\n\n// Create a webhook\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"url\\\": \\\"https://your-webhook-url.com\\\",\n \\\"name\\\": \\\"My Webhook\\\",\n \\\"event_types\\\": [\\\"memory:add\\\"]\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\")\n\n# Get all webhooks\nwebhooks = client.get_webhooks(project_id=\"your_project_id\")\nprint(webhooks)\n\n# Create a webhook\nwebhook = client.create_webhook(\n url=\"https://your-webhook-url.com\",\n name=\"My Webhook\",\n project_id=\"your_project_id\",\n event_types=[\"memory:add\"]\n)\nprint(webhook)" + }, + { + "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// Get all webhooks\nclient.getWebhooks('your_project_id')\n .then(webhooks => console.log(webhooks))\n .catch(err => console.error(err));\n\n// Create a webhook\nclient.createWebhook({\n url: 'https://your-webhook-url.com',\n name: 'My Webhook',\n project_id: 'your_project_id',\n event_types: ['memory:add']\n})\n .then(webhook => console.log(webhook))\n .catch(err => console.error(err));" + }, + { + "lang": "cURL", + "source": "# Get all webhooks\ncurl --request GET \\\n --url 'https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/' \\\n --header 'Authorization: Token your-api-key'\n\n# Create a webhook\ncurl --request POST \\\n --url 'https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/' \\\n --header 'Authorization: Token your-api-key' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"url\": \"https://your-webhook-url.com\",\n \"name\": \"My Webhook\",\n \"event_types\": [\"memory:add\"]\n }'" + }, + { + "lang": "PHP", + "source": " \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => [\"Authorization: Token your-api-key\"],\n]);\n\n$response = curl_exec($curl);\n\n// Create a webhook\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => json_encode([\n \"url\" => \"https://your-webhook-url.com\",\n \"name\" => \"My Webhook\",\n \"event_types\" => [\"memory:add\"]\n ]),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token your-api-key\",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\ncurl_close($curl);" + }, + { + "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\t// Get all webhooks\n\treq, _ := http.NewRequest(\"GET\", \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\", nil)\n\treq.Header.Add(\"Authorization\", \"Token your-api-key\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\tfmt.Println(string(body))\n\n\t// Create a webhook\n\tpayload := strings.NewReader(`{\n\t\t\"url\": \"https://your-webhook-url.com\",\n\t\t\"name\": \"My Webhook\",\n\t\t\"event_types\": [\"memory:add\"]\n\t}`)\n\n\treq, _ = http.NewRequest(\"POST\", \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\", 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\tfmt.Println(string(body))\n}" + }, + { + "lang": "Java", + "source": "// Get all webhooks\nHttpResponse response = Unirest.get(\"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .asString();\n\n// Create a webhook\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"url\\\": \\\"https://your-webhook-url.com\\\",\n \\\"name\\\": \\\"My Webhook\\\",\n \\\"event_types\\\": [\\\"memory:add\\\"]\n }\")\n .asString();" + } + ] }, "post": { - "tags": ["webhooks"], + "tags": [ + "webhooks" + ], "summary": "Create Webhook", "description": "Create a new webhook for a specific project", "operationId": "create_webhook", @@ -4393,7 +4500,7 @@ "name": "project_id", "in": "path", "required": true, - "description": "Unique identifier of the project", + "description": "Unique identifier of the project.", "schema": { "type": "string" } @@ -4405,7 +4512,9 @@ "application/json": { "schema": { "type": "object", - "required": ["url"], + "required": [ + "url" + ], "properties": { "name": { "type": "string", @@ -4413,15 +4522,19 @@ }, "url": { "type": "string", - "description": "URL endpoint for the webhook" + "description": "URL endpoint for the webhook." }, "event_types": { "type": "array", "items": { "type": "string", - "enum": ["memory:add", "memory:update", "memory:delete"] + "enum": [ + "memory:add", + "memory:update", + "memory:delete" + ] }, - "description": "List of event types to subscribe to" + "description": "List of event types to subscribe to." }, "is_active": { "type": "boolean", @@ -4429,7 +4542,7 @@ }, "project_id": { "type": "string", - "description": "Unique identifier of the project" + "description": "Unique identifier of the project." } } } @@ -4511,36 +4624,38 @@ } }, "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# Create a webhook\nwebhook = client.create_webhook(\n url=\"https://your-webhook-url.com\",\n name=\"My Webhook\",\n project_id=\"your_project_id\",\n event_types=[\"memory:add\"]\n)\nprint(webhook)" - }, - { - "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// Create a webhook\nclient.createWebhook({\n url: \"https://your-webhook-url.com\",\n name: \"My Webhook\",\n project_id: \"your_project_id\",\n event_types: [\"memory:add\"]\n})\n .then(response => console.log('Create webhook response:', response))\n .catch(error => console.error(error));" - }, - { - "lang": "cURL", - "source": "curl -X POST \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\" \\\n -H \"Authorization: Token your-api-key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://your-webhook-url.com\",\n \"name\": \"My Webhook\",\n \"event_types\": [\"memory:add\"]\n }'" - }, - { - "lang": "PHP", - "source": " \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => json_encode([\n \"url\" => \"https://your-webhook-url.com\",\n \"name\" => \"My Webhook\",\n \"event_types\" => [\"memory:add\"]\n ]),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token your-api-key\",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\ncurl_close($curl);\n\necho $response;" - }, - { - "lang": "Go", - "source": "package main\n\nimport (\n \"fmt\"\n \"strings\"\n \"net/http\"\n \"io/ioutil\"\n)\n\nfunc main() {\n payload := strings.NewReader(`{\n \"url\": \"https://your-webhook-url.com\",\n \"name\": \"My Webhook\",\n \"event_types\": [\"memory:add\"]\n }`)\n\n req, _ := http.NewRequest(\"POST\", \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\", payload)\n req.Header.Add(\"Authorization\", \"Token your-api-key\")\n req.Header.Add(\"Content-Type\", \"application/json\")\n\n res, _ := http.DefaultClient.Do(req)\n defer res.Body.Close()\n body, _ := ioutil.ReadAll(res.Body)\n\n fmt.Println(string(body))\n}" - }, - { - "lang": "Java", - "source": "import com.konghq.unirest.http.HttpResponse;\nimport com.konghq.unirest.http.Unirest;\n\n// Create a webhook\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"url\\\": \\\"https://your-webhook-url.com\\\",\n \\\"name\\\": \\\"My Webhook\\\",\n \\\"event_types\\\": [\\\"memory:add\\\"]\n }\")\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# Create a webhook\nwebhook = client.create_webhook(\n url=\"https://your-webhook-url.com\",\n name=\"My Webhook\",\n project_id=\"your_project_id\",\n event_types=[\"memory:add\"]\n)\nprint(webhook)" + }, + { + "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// Create a webhook\nclient.createWebhook({\n url: \"https://your-webhook-url.com\",\n name: \"My Webhook\",\n project_id: \"your_project_id\",\n event_types: [\"memory:add\"]\n})\n .then(response => console.log('Create webhook response:', response))\n .catch(error => console.error(error));" + }, + { + "lang": "cURL", + "source": "curl -X POST \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\" \\\n -H \"Authorization: Token your-api-key\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"url\": \"https://your-webhook-url.com\",\n \"name\": \"My Webhook\",\n \"event_types\": [\"memory:add\"]\n }'" + }, + { + "lang": "PHP", + "source": " \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => json_encode([\n \"url\" => \"https://your-webhook-url.com\",\n \"name\" => \"My Webhook\",\n \"event_types\" => [\"memory:add\"]\n ]),\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token your-api-key\",\n \"Content-Type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\ncurl_close($curl);\n\necho $response;" + }, + { + "lang": "Go", + "source": "package main\n\nimport (\n \"fmt\"\n \"strings\"\n \"net/http\"\n \"io/ioutil\"\n)\n\nfunc main() {\n payload := strings.NewReader(`{\n \"url\": \"https://your-webhook-url.com\",\n \"name\": \"My Webhook\",\n \"event_types\": [\"memory:add\"]\n }`)\n\n req, _ := http.NewRequest(\"POST\", \"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\", payload)\n req.Header.Add(\"Authorization\", \"Token your-api-key\")\n req.Header.Add(\"Content-Type\", \"application/json\")\n\n res, _ := http.DefaultClient.Do(req)\n defer res.Body.Close()\n body, _ := ioutil.ReadAll(res.Body)\n\n fmt.Println(string(body))\n}" + }, + { + "lang": "Java", + "source": "import com.konghq.unirest.http.HttpResponse;\nimport com.konghq.unirest.http.Unirest;\n\n// Create a webhook\nHttpResponse response = Unirest.post(\"https://api.mem0.ai/api/v1/webhooks/your_project_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .header(\"Content-Type\", \"application/json\")\n .body(\"{\n \\\"url\\\": \\\"https://your-webhook-url.com\\\",\n \\\"name\\\": \\\"My Webhook\\\",\n \\\"event_types\\\": [\\\"memory:add\\\"]\n }\")\n .asString();\n\nSystem.out.println(response.getBody());" + } + ] } }, "/api/v1/webhooks/{webhook_id}/": { "put": { - "tags": ["webhooks"], + "tags": [ + "webhooks" + ], "summary": "Update Webhook", "description": "Update an existing webhook", "operationId": "update_webhook", @@ -4549,7 +4664,7 @@ "name": "webhook_id", "in": "path", "required": true, - "description": "Unique identifier of the webhook", + "description": "Unique identifier of the webhook.", "schema": { "type": "string" } @@ -4574,7 +4689,11 @@ "type": "array", "items": { "type": "string", - "enum": ["memory:add", "memory:update", "memory:delete"] + "enum": [ + "memory:add", + "memory:update", + "memory:delete" + ] }, "description": "New list of event types to subscribe to" } @@ -4676,7 +4795,9 @@ ] }, "delete": { - "tags": ["webhooks"], + "tags": [ + "webhooks" + ], "summary": "Delete Webhook", "description": "Delete an existing webhook", "operationId": "delete_webhook", @@ -4685,7 +4806,7 @@ "name": "webhook_id", "in": "path", "required": true, - "description": "Unique identifier of the webhook", + "description": "Unique identifier of the webhook.", "schema": { "type": "string" } @@ -4742,31 +4863,31 @@ } }, "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 a webhook\nresponse = client.delete_webhook(webhook_id=\"your_webhook_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\n// Delete a webhook\nclient.deleteWebhook(\"your_webhook_id\")\n .then(response => console.log('Delete webhook response:', response))\n .catch(error => console.error(error));" - }, - { - "lang": "cURL", - "source": "curl -X DELETE \"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\" \\\n -H \"Authorization: Token your-api-key\"" - }, - { - "lang": "PHP", - "source": " \"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\"Authorization: Token your-api-key\"],\n]);\n\n$response = curl_exec($curl);\ncurl_close($curl);\n\necho $response;" - }, - { - "lang": "Go", - "source": "package main\n\nimport (\n \"fmt\"\n \"net/http\"\n \"io/ioutil\"\n)\n\nfunc main() {\n req, _ := http.NewRequest(\"DELETE\", \"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\", nil)\n req.Header.Add(\"Authorization\", \"Token your-api-key\")\n\n res, _ := http.DefaultClient.Do(req)\n defer res.Body.Close()\n body, _ := ioutil.ReadAll(res.Body)\n\n fmt.Println(string(body))\n}" - }, - { - "lang": "Java", - "source": "import com.konghq.unirest.http.HttpResponse;\nimport com.konghq.unirest.http.Unirest;\n\n// Delete a webhook\nHttpResponse response = Unirest.delete(\"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\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# Delete a webhook\nresponse = client.delete_webhook(webhook_id=\"your_webhook_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\n// Delete a webhook\nclient.deleteWebhook(\"your_webhook_id\")\n .then(response => console.log('Delete webhook response:', response))\n .catch(error => console.error(error));" + }, + { + "lang": "cURL", + "source": "curl -X DELETE \"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\" \\\n -H \"Authorization: Token your-api-key\"" + }, + { + "lang": "PHP", + "source": " \"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\"Authorization: Token your-api-key\"],\n]);\n\n$response = curl_exec($curl);\ncurl_close($curl);\n\necho $response;" + }, + { + "lang": "Go", + "source": "package main\n\nimport (\n \"fmt\"\n \"net/http\"\n \"io/ioutil\"\n)\n\nfunc main() {\n req, _ := http.NewRequest(\"DELETE\", \"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\", nil)\n req.Header.Add(\"Authorization\", \"Token your-api-key\")\n\n res, _ := http.DefaultClient.Do(req)\n defer res.Body.Close()\n body, _ := ioutil.ReadAll(res.Body)\n\n fmt.Println(string(body))\n}" + }, + { + "lang": "Java", + "source": "import com.konghq.unirest.http.HttpResponse;\nimport com.konghq.unirest.http.Unirest;\n\n// Delete a webhook\nHttpResponse response = Unirest.delete(\"https://api.mem0.ai/api/v1/webhooks/your_webhook_id/webhook/\")\n .header(\"Authorization\", \"Token your-api-key\")\n .asString();\n\nSystem.out.println(response.getBody());" + } + ] } } }, @@ -4791,9 +4912,7 @@ "metadata": { "title": "Metadata", "type": "object", - "properties": { - - } + "properties": {} } } }, @@ -4816,9 +4935,7 @@ "metadata": { "title": "Metadata", "type": "object", - "properties": { - - } + "properties": {} } } }, @@ -4864,9 +4981,7 @@ "description": "Additional metadata associated with the memory, which can be used to store any additional information or context about the memory. Best practice for incorporating additional information is through metadata (e.g. location, time, ids, etc.). During retrieval, you can either use these metadata alongside the query to fetch relevant memories or retrieve memories based on the query first and then refine the results using metadata during post-processing.", "title": "Metadata", "type": "object", - "properties": { - - }, + "properties": {}, "nullable": true }, "includes": { @@ -4884,25 +4999,23 @@ "nullable": true }, "infer": { - "description": "Wether to infer the memories or directly store the messages.", + "description": "Whether to infer the memories or directly store the messages.", "title": "Infer", "type": "boolean", "default": true }, "output_format": { - "description": "It two output formats: `v1.0` (default) and `v1.1`. We recommend using `v1.1` as `v1.0` will be deprecated soon.", + "description": "It supports two output formats: `v1.0` (default) and `v1.1`. We recommend using `v1.1` as `v1.0` will be deprecated soon.", "title": "Output format", "type": "string", "nullable": true, "default": "v1.0" }, "custom_categories": { - "description": "A list of categories with category name and it's description.", + "description": "A list of categories with category name and its description.", "title": "Custom categories", "type": "object", - "properties": { - - }, + "properties": {}, "nullable": true }, "custom_instructions": { @@ -4949,7 +5062,7 @@ }, "version": { "description": "The version of the memory to use. The default version is v1, which is deprecated. We recommend using v2 for new applications.", - "title": "Version", + "title": "Version", "type": "string", "nullable": true } @@ -4994,9 +5107,7 @@ "metadata": { "title": "Metadata", "type": "object", - "properties": { - - }, + "properties": {}, "nullable": true, "description": "Additional metadata associated with the memory." }, @@ -5090,32 +5201,79 @@ "type": "object", "description": "A dictionary of filters to apply to the search. Available fields are: user_id, agent_id, app_id, run_id, created_at, updated_at, categories, keywords. Supports logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains). For categories field, use 'contains' for partial matching (e.g., {\"categories\": {\"contains\": \"finance\"}}) or 'in' for exact matching (e.g., {\"categories\": {\"in\": [\"personal_information\"]}}).", "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"}, - "keywords": {"type": "object", "properties": { - "contains": {"type": "string"}, - "icontains": {"type": "string"} - }}, - "categories": {"type": "object", "properties": { - "in": {"type": "array", "items": {"type": "string"}} - }}, - "metadata": {"type": "object"} + "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" + }, + "keywords": { + "type": "object", + "properties": { + "contains": { + "type": "string" + }, + "icontains": { + "type": "string" + } + } + }, + "categories": { + "type": "object", + "properties": { + "in": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "metadata": { + "type": "object" + } }, "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" + } } } }, @@ -5190,9 +5348,7 @@ "metadata": { "title": "Metadata", "type": "object", - "properties": { - - } + "properties": {} } } }, @@ -5210,9 +5366,7 @@ "metadata": { "title": "Metadata", "type": "object", - "properties": { - - } + "properties": {} } } }, @@ -5334,4 +5488,4 @@ } }, "x-original-swagger-version": "2.0" -} +} \ No newline at end of file diff --git a/docs/openmemory/integrations.mdx b/docs/openmemory/integrations.mdx index 25fbf7bb9..3f72a9d05 100644 --- a/docs/openmemory/integrations.mdx +++ b/docs/openmemory/integrations.mdx @@ -26,7 +26,7 @@ These values define where your MCP server is running and which user's memory is ### MCP Client Setup -Use the following one step command to configure OpenMemory Local MCP to a client. The general command format is as follows: +Use the following one-step command to configure OpenMemory Local MCP to a client. The general command format is as follows: ```bash npx @openmemory/install local http://localhost:8765/mcp//sse/ --client diff --git a/docs/openmemory/overview.mdx b/docs/openmemory/overview.mdx index 7bdcef65c..ba863407a 100644 --- a/docs/openmemory/overview.mdx +++ b/docs/openmemory/overview.mdx @@ -4,21 +4,21 @@ icon: "info" iconType: "solid" --- -## 🚀 Hosted OpenMemory MCP Now Available! +## Hosted OpenMemory MCP Now Available #### Sign Up Now - [app.openmemory.dev](https://app.openmemory.dev) Everything you love about OpenMemory MCP but with zero setup. -✅ Works with all MCP-compatible tools (Claude Desktop, Cursor...) -✅ Same standard memory ops: `add_memories`, `search_memory`, etc -✅ One-click provisioning, no Docker required -✅ Powered by Mem0 +- Works with all MCP-compatible tools (Claude Desktop, Cursor, etc.) +- Same standard memory operations: `add_memories`, `search_memory`, etc. +- One-click provisioning, no Docker required +- Powered by Mem0 Add shared, persistent, low-friction memory to your MCP-compatible clients in seconds. -### 🌟 Get Started Now -**Sign up and get your access key at [app.openmemory.dev](https://app.openmemory.dev)** +### Get Started Now +Sign up and get your access key at [app.openmemory.dev](https://app.openmemory.dev). Example installation: `npx @openmemory/install --client claude --env OPENMEMORY_API_KEY=your-key` @@ -28,7 +28,7 @@ OpenMemory is a local memory infrastructure powered by Mem0 that lets you carry ## What is the OpenMemory MCP Server -The OpenMemory MCP Server is a private, local-first memory server that creates a shared, persistent memory layer for your MCP-compatible tools. This runs entirely on your machine, enabling seamless context handoff across tools. Whether you're switching between development, planning, or debugging environments, your AI assistants can access relevant memory without needing repeated instructions. +The OpenMemory MCP Server is a private, local-first memory server that creates a shared, persistent memory layer for your MCP-compatible tools. It runs entirely on your machine, enabling seamless context handoff across tools. Whether you're switching between development, planning, or debugging environments, your AI assistants can access relevant memory without needing repeated instructions. The OpenMemory MCP Server ensures all memory stays local, structured, and under your control with no cloud sync or external storage. @@ -56,8 +56,7 @@ You can also set the `OPENAI_API_KEY` as a parameter to the script: curl -sL https://raw.githubusercontent.com/mem0ai/mem0/main/openmemory/run.sh | OPENAI_API_KEY=your_api_key bash ``` -This will start the OpenMemory server and the OpenMemory UI. Deleting the container will lead to the deletion of the memory store. -We suggest you follow the instructions [here](/openmemory/quickstart#setting-up-openmemory) to set up OpenMemory on your local machine, with more persistent memory store. +This will start the OpenMemory server and the OpenMemory UI. Deleting the container will lead to the deletion of the memory store. We suggest you follow the instructions [here](/openmemory/quickstart#setting-up-openmemory) to set up OpenMemory on your local machine with a more persistent memory store. ## How the OpenMemory MCP Server Works @@ -78,7 +77,7 @@ Store context in Cursor and retrieve it later in Claude or Windsurf without repe All memory is stored on your machine. Nothing goes to the cloud. You maintain full ownership and control. ### Unified Memory UI -The built-in OpenMemory dashboard provides a central view of everything stored. Add, browse, delete and control memory access to clients directly from the dashboard. +The built-in OpenMemory dashboard provides a central view of everything stored. Add, browse, delete, and control memory access to clients directly from the dashboard. ## Supported Clients @@ -86,20 +85,21 @@ The OpenMemory MCP Server is compatible with any client that supports the Model - Cursor - Claude Desktop - Windsurf -- Cline, and more. +- Cline +- And more As more AI systems adopt MCP, your private memory becomes more valuable. ## Real-World Examples -### Scenario 1: Cross-Tool Project Flow +### Scenario 1: Cross-Tool Project Flow Define technical requirements of a project in Claude Desktop. Build in Cursor. Debug issues in Windsurf - all with shared context passed through OpenMemory. -### Scenario 2: Preferences That Persist +### Scenario 2: Preferences That Persist Set your preferred code style or tone in one tool. When you switch to another MCP client, it can access those same preferences without redefining them. ### Scenario 3: Project Knowledge -Save important project details once, then access them from any compatible AI tool, no more repetitive explanations. +Save important project details once, then access them from any compatible AI tool - no more repetitive explanations. ## Conclusion @@ -107,7 +107,7 @@ The OpenMemory MCP Server brings memory to MCP-compatible tools without giving u By standardizing memory operations and keeping all data local, it reduces token overhead, improves performance, and unlocks more intelligent interactions across the growing ecosystem of AI assistants. -This is just the beginning. The MCP server is the first core layer in the OpenMemory platform - a broader effort to make memory portable, private, and interoperable across AI systems. +This is just the beginning. The MCP server is the first core layer in the OpenMemory platform, a broader effort to make memory portable, private, and interoperable across AI systems. ## Getting Started Today diff --git a/docs/openmemory/quickstart.mdx b/docs/openmemory/quickstart.mdx index e7e7a83ff..8057df3a0 100644 --- a/docs/openmemory/quickstart.mdx +++ b/docs/openmemory/quickstart.mdx @@ -4,39 +4,48 @@ icon: "terminal" iconType: "solid" --- -## 🚀 Hosted OpenMemory MCP Now Available! +## Hosted OpenMemory MCP Now Available #### Sign Up Now - [app.openmemory.dev](https://app.openmemory.dev) Everything you love about OpenMemory MCP but with zero setup. -✅ Works with all MCP-compatible tools (Claude Desktop, Cursor...) -✅ Same standard memory ops: `add_memories`, `search_memory`, etc -✅ One-click provisioning, no Docker required -✅ Powered by Mem0 +- Works with all MCP-compatible tools (Claude Desktop, Cursor, etc.) +- Same standard memory operations: `add_memories`, `search_memory`, etc. +- One-click provisioning, no Docker required +- Powered by Mem0 Add shared, persistent, low-friction memory to your MCP-compatible clients in seconds. -### 🌟 Get Started Now -**Sign up and get your access key at [app.openmemory.dev](https://app.openmemory.dev)** +### Get Started Now +Sign up and get your access key at [app.openmemory.dev](https://app.openmemory.dev). Example installation: `npx @openmemory/install --client claude --env OPENMEMORY_API_KEY=your-key` ## Getting Started with Hosted OpenMemory -The fastest way to get started is with our hosted version - no setup required: +The fastest way to get started is with our hosted version - no setup required. -### 1. Get your API key +### 1. Get Your API Key Visit [app.openmemory.dev](https://app.openmemory.dev) to sign up and get your `OPENMEMORY_API_KEY`. -### 2. Install and connect to your preferred client +### 2. Install and Connect to Your Preferred Client Example commands (replace `your-key` with your actual API key): -For Claude Desktop: `npx @openmemory/install --client claude --env OPENMEMORY_API_KEY=your-key` +**For Claude Desktop:** +```bash +npx @openmemory/install --client claude --env OPENMEMORY_API_KEY=your-key +``` -For Cursor: `npx @openmemory/install --client cursor --env OPENMEMORY_API_KEY=your-key` +**For Cursor:** +```bash +npx @openmemory/install --client cursor --env OPENMEMORY_API_KEY=your-key +``` -For Windsurf: `npx @openmemory/install --client windsurf --env OPENMEMORY_API_KEY=your-key` +**For Windsurf:** +```bash +npx @openmemory/install --client windsurf --env OPENMEMORY_API_KEY=your-key +``` That's it! Your AI client now has persistent memory across sessions. @@ -68,17 +77,13 @@ You can also set the `OPENAI_API_KEY` as a parameter to the script: curl -sL https://raw.githubusercontent.com/mem0ai/mem0/main/openmemory/run.sh | OPENAI_API_KEY=your_api_key bash ``` -This will start the OpenMemory server and the OpenMemory UI. Deleting the container will lead to the deletion of the memory store. -We suggest you follow the instructions below to set up OpenMemory on your local machine, with more persistant memory store. +This will start the OpenMemory server and the OpenMemory UI. Deleting the container will lead to the deletion of the memory store. We suggest you follow the instructions below to set up OpenMemory on your local machine with a more persistent memory store. ## Setting Up OpenMemory -Getting started with OpenMemory is straight forward and takes just a few minutes to set up on your local machine. Follow these steps: +Getting started with OpenMemory is straightforward and takes just a few minutes to set up on your local machine. Follow these steps: -### Getting started - - -### 1. First clone the repository and then follow the instructions: +### 1. Clone the Repository ```bash # Clone the repository git clone https://github.com/mem0ai/mem0.git @@ -91,50 +96,45 @@ Before running the project, you need to configure environment variables for both You can do this in one of the following ways: -- **Manually**: - Create a `.env` file in each of the following directories: +- **Manually:** Create a `.env` file in each of the following directories: - `/api/.env` - `/ui/.env` -- **Using `.env.example` files**: - Copy and rename the example files: - +- **Using `.env.example` files:** Copy and rename the example files: ```bash cp api/.env.example api/.env cp ui/.env.example ui/.env ``` - - **Using Makefile** (if supported): - Run: +- **Using Makefile** (if supported): Run: + ```bash + make env + ``` - ```bash - make env - ``` -- #### Example `/api/.env` - -``` bash +#### Example `/api/.env` +```bash OPENAI_API_KEY=sk-xxx -USER= # The User Id you want to associate the memories with +USER= # The User ID you want to associate the memories with ``` -- #### Example `/ui/.env` +#### Example `/ui/.env` ```bash NEXT_PUBLIC_API_URL=http://localhost:8765 -NEXT_PUBLIC_USER_ID= # Same as the user id for environment variable in api +NEXT_PUBLIC_USER_ID= # Same as the user ID for environment variable in api ``` ### 3. Build and Run the Project You can run the project using the following two commands: ```bash -make build # builds the mcp server and ui -make up # runs openmemory mcp server and ui -``` +make build # Builds the MCP server and UI +make up # Runs OpenMemory MCP server and UI +``` After running these commands, you will have: -- OpenMemory MCP server running at: http://localhost:8765 (API documentation available at http://localhost:8765/docs) -- OpenMemory UI running at: http://localhost:3000 +- OpenMemory MCP server running at http://localhost:8765 (API documentation available at http://localhost:8765/docs) +- OpenMemory UI running at http://localhost:3000 -#### UI not working on http://localhost:3000? +#### UI Not Working on http://localhost:3000? If the UI does not start properly on http://localhost:3000, try running it manually: @@ -144,17 +144,16 @@ pnpm install pnpm dev ``` - -You can configure the MCP client using the following command (replace username with your username): +You can configure the MCP client using the following command (replace `username` with your username): ```bash npx @openmemory/install local "http://localhost:8765/mcp/cursor/sse/username" --client cursor ``` -The OpenMemory dashboard will be available at http://localhost:3000. From here, you can view and manage your memories, as well as check connection status with your MCP clients. +The OpenMemory dashboard will be available at http://localhost:3000. From here, you can view and manage your memories and check connection status with your MCP clients. Once set up, OpenMemory runs locally on your machine, ensuring all your AI memories remain private and secure while being accessible across any compatible MCP client. -### Getting Started Today +## Getting Started Today -- Github Repository: https://github.com/mem0ai/mem0/tree/main/openmemory +GitHub Repository: https://github.com/mem0ai/mem0/tree/main/openmemory diff --git a/docs/platform/advanced-memory-operations.mdx b/docs/platform/advanced-memory-operations.mdx index 4d4af306a..41a2122f6 100644 --- a/docs/platform/advanced-memory-operations.mdx +++ b/docs/platform/advanced-memory-operations.mdx @@ -11,7 +11,7 @@ This guide covers advanced memory operations including complex filtering, batch ### Async Client (Python) -For asynchronous operations in Python, use the AsyncMemoryClient: +For asynchronous operations in Python, use the `AsyncMemoryClient`: ```python Python import os @@ -94,17 +94,17 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \ When passing `user_id`, memories are primarily created based on user messages, but may be influenced by assistant messages for contextual understanding. For example, in a conversation about food preferences, both the user's stated preferences and their responses to the assistant's questions would form user memories. Similarly, when using `agent_id`, assistant messages are prioritized, but user messages might influence the agent's memories based on context. - + **Example:** ``` User: My favorite cuisine is Italian Assistant: Nice! What about Indian cuisine? User: Don't like it much since I cannot eat spicy food - + Resulting user memories: memory1 - Likes Italian food - memory2 - Doesn't like Indian food since cannot eat spicy - + memory2 - Doesn't like Indian food since cannot eat spicy + (memory2 comes from user's response about Indian cuisine) ``` @@ -283,13 +283,13 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \ ### Search with Custom Filters -Our advanced search allows you to set custom search filters. You can filter by user_id, agent_id, app_id, run_id, created_at, updated_at, categories, and text. The filters support logical operators (AND, OR) and comparison operators (in, gte, lte, gt, lt, ne, contains, icontains, `*`). The wildcard character (`*`) matches everything for a specific field. +Our advanced search allows you to set custom search filters. You can filter by `user_id`, `agent_id`, `app_id`, `run_id`, `created_at`, `updated_at`, `categories`, and `text`. The filters support logical operators (AND, OR) and comparison operators (`in`, `gte`, `lte`, `gt`, `lt`, `ne`, `contains`, `icontains`, `*`). The wildcard character (`*`) matches everything for a specific field. For the **categories** field specifically: - Use `contains` for partial matching (e.g., `{"categories": {"contains": "finance"}}`) - Use `in` for exact matching (e.g., `{"categories": {"in": ["personal_information"]}}`). -Here you need to define `version` as `v2` in the search method. +You need to define `version` as `v2` in the search method. #### Example 1: Search using user_id and agent_id filters @@ -632,9 +632,9 @@ curl -X POST "https://api.mem0.ai/v1/memories/search/?version=v2" \ ### Get All Memories with Pagination - The `get_all` method supports two output formats: `v1.0` (default) and `v1.1`. To use the latest format, which provides more detailed information about each memory operation, set the `output_format` parameter to `v1.1`. +The `get_all` method supports two output formats: `v1.0` (default) and `v1.1`. To use the latest format, which provides more detailed information about each memory operation, set the `output_format` parameter to `v1.1`. - We're soon deprecating the default output format for get_all() method, which returned a list. Once the changes are live, paginated response will be the only supported format, with 100 memories per page by default. You can customize this using the `page` and `page_size` parameters. +We're soon deprecating the default output format for the `get_all()` method, which returned a list. Once the changes are live, paginated response will be the only supported format, with 100 memories per page by default. You can customize this using the `page` and `page_size` parameters. #### Get all memories of a user @@ -749,7 +749,7 @@ For the **categories** field specifically: - Use `contains` for partial matching (e.g., `{"categories": {"contains": "finance"}}`) - Use `in` for exact matching (e.g., `{"categories": {"in": ["personal_information"]}}`). -Here you need to define `version` as `v2` in the get_all method. +You need to define `version` as `v2` in the `get_all` method. diff --git a/docs/platform/features/advanced-retrieval.mdx b/docs/platform/features/advanced-retrieval.mdx index 3a49226eb..e57a2bd46 100644 --- a/docs/platform/features/advanced-retrieval.mdx +++ b/docs/platform/features/advanced-retrieval.mdx @@ -12,7 +12,8 @@ Advanced Retrieval gives you precise control over how memories are found and ran ## Search Enhancement Options ### Keyword Search -**Expands results** to include memories with specific terms, names, and technical keywords. + +Expands results to include memories with specific terms, names, and technical keywords. @@ -44,8 +45,9 @@ results = client.search( -### Reranking -**Reorders results** using deep semantic understanding to put the most relevant memories first. +### Reranking + +Reorders results using deep semantic understanding to put the most relevant memories first. @@ -78,7 +80,8 @@ results = client.search( ### Memory Filtering -**Filters results** to keep only the most precisely relevant memories. + +Filters results to keep only the most precisely relevant memories. @@ -219,7 +222,7 @@ function standardSearch(query, userId) { }); } -// High precision - good for critical applications +// High precision - good for critical applications function preciseSearch(query, userId) { return client.search(query, { user_id: userId, @@ -232,15 +235,17 @@ function preciseSearch(query, userId) { ## Best Practices -### ✅ Do -- **Start simple** with just one enhancement and measure impact -- **Use keyword search** for entity-heavy queries (names, places, technical terms) -- **Use reranking** when the top result quality matters most -- **Use filtering** for production systems where precision is critical -- **Handle empty results** gracefully when filtering is too aggressive -- **Monitor latency** and adjust based on your application's needs +### Do + +- Start simple with just one enhancement and measure impact +- Use keyword search for entity-heavy queries (names, places, technical terms) +- Use reranking when the top result quality matters most +- Use filtering for production systems where precision is critical +- Handle empty results gracefully when filtering is too aggressive +- Monitor latency and adjust based on your application's needs + +### Don't -### ❌ Don't - Enable all options by default without measuring necessity - Use filtering for broad exploratory queries - Ignore latency impact in real-time applications @@ -274,8 +279,4 @@ print(f"Search completed in {latency:.2f}s") # ~0.41s expected 3. **Implement fallback logic** when filtering returns empty results 4. **Monitor and alert** on search latency patterns ---- - -**Ready to enhance your search?** Start with keyword search for broader coverage, add reranking for better ordering, and use filtering when precision is critical. - diff --git a/docs/platform/features/contextual-add.mdx b/docs/platform/features/contextual-add.mdx index 5b291be84..0cb792a15 100644 --- a/docs/platform/features/contextual-add.mdx +++ b/docs/platform/features/contextual-add.mdx @@ -7,7 +7,7 @@ description: "Add messages with automatic context management - no manual history ## What is Contextual Memory Creation? -Contextual memory creation automatically manages message history for you, so you can focus on building great AI experiences instead of tracking interactions manually. Simply send new messages, and Mem0 handles the context automatically. +Contextual memory creation automatically manages message history, allowing you to focus on building AI experiences without manually tracking interactions. Simply send new messages, and Mem0 handles the context automatically. ```python Python @@ -85,7 +85,7 @@ Choose the right approach based on your application's needs: ### User-Level Memories (`user_id` only) -Best for: Personal preferences, profile information, long-term user data +**Best for:** Personal preferences, profile information, long-term user data ```python Python @@ -113,7 +113,7 @@ await client.add(messages, { user_id: "user123", version: "v2" }); ### Session-Specific Memories (`user_id` + `run_id`) -Best for: Task-specific context, separate interaction threads, project-based sessions +**Best for:** Task-specific context, separate interaction threads, project-based sessions ```python Python diff --git a/docs/platform/features/criteria-retrieval.mdx b/docs/platform/features/criteria-retrieval.mdx index a269fc5b2..9c618b1f6 100644 --- a/docs/platform/features/criteria-retrieval.mdx +++ b/docs/platform/features/criteria-retrieval.mdx @@ -4,15 +4,15 @@ icon: "magnifying-glass-plus" iconType: "solid" --- -Mem0’s **Criteria Retrieval** feature allows you to retrieve memories based on your defined criteria. It goes beyond generic semantic relevance and rank memories based on what matters to your application - emotional tone, intent, behavioral signals, or other custom traits. +Mem0's Criteria Retrieval feature allows you to retrieve memories based on your defined criteria. It goes beyond generic semantic relevance and ranks memories based on what matters to your application: emotional tone, intent, behavioral signals, or other custom traits. -Instead of just searching for "how similar a memory is to this query?", you can define what *relevance* really means for your project. For example: +Instead of just searching for "how similar a memory is to this query," you can define what relevance truly means for your project. For example: - Prioritize joyful memories when building a wellness assistant - Downrank negative memories in a productivity-focused agent - Highlight curiosity in a tutoring agent -You define **criteria** - custom attributes like "joy", "negativity", "confidence", or "urgency", and assign weights to control how they influence scoring. When you `search`, Mem0 uses these to re-rank memories that are semantically relevant, favoring those that better match your intent. +You define criteria: custom attributes like "joy", "negativity", "confidence", or "urgency", and assign weights to control how they influence scoring. When you search, Mem0 uses these to re-rank semantically relevant memories, favoring those that better match your intent. This gives you nuanced, intent-aware memory search that adapts to your use case. @@ -149,9 +149,9 @@ results_without_criteria = client.search( ## Search Results Comparison -1. **Memory Ordering**: With criteria, memories with high joy scores (like feeling refreshed and drawing) are ranked higher, while without criteria, the most relevant memory ("User is happy today") comes first. -2. **Score Distribution**: With criteria, scores are more spread out (0.116 to 0.666) and reflect the criteria weights, while without criteria, scores are more clustered (0.336 to 0.607) and based purely on relevance. -3. **Trait Sensitivity**: “Rainy day” content is penalized due to negative tone. “Storm curiosity” is recognized and scored accordingly. +1. **Memory Ordering**: With criteria, memories with high joy scores (like feeling refreshed and drawing) are ranked higher. Without criteria, the most relevant memory ("User is happy today") comes first. +2. **Score Distribution**: With criteria, scores are more spread out (0.116 to 0.666) and reflect the criteria weights. Without criteria, scores are more clustered (0.336 to 0.607) and based purely on relevance. +3. **Trait Sensitivity**: "Rainy day" content is penalized due to negative tone, while "Storm curiosity" is recognized and scored accordingly. @@ -173,10 +173,10 @@ If no criteria are defined for a project, `version="v2"` behaves like normal sea ## Best Practices -- Choose **3–5 criteria** that reflect your application’s intent -- Make descriptions **clear and distinct**, those are interpreted by an LLM -- Use **stronger weights** to amplify impact of important traits -- Avoid redundant or ambiguous criteria (e.g. “positivity” + “joy”) +- Choose 3-5 criteria that reflect your application's intent +- Make descriptions clear and distinct; these are interpreted by an LLM +- Use stronger weights to amplify the impact of important traits +- Avoid redundant or ambiguous criteria (e.g., "positivity" and "joy") - Always handle empty result sets in your application logic diff --git a/docs/platform/features/custom-categories.mdx b/docs/platform/features/custom-categories.mdx index 6a921e0d7..575815322 100644 --- a/docs/platform/features/custom-categories.mdx +++ b/docs/platform/features/custom-categories.mdx @@ -5,9 +5,9 @@ icon: "tags" iconType: "solid" --- -## How to set custom categories? +## How to Set Custom Categories -You can now create custom categories tailored to your specific needs, instead of using the default categories such as travel, sports, music, and more (see [default categories](#default-categories) below). **When custom categories are provided, they will override the default categories.** +You can create custom categories tailored to your specific needs instead of using the default categories such as travel, sports, and music (see [default categories](#default-categories) below). When custom categories are provided, they will override the default categories. There are two ways to set custom categories: @@ -93,7 +93,8 @@ These project-level categories will be automatically applied to all new memories -### 2. During the `add` API call +### 2. During the `add` API Call + You can also set custom categories during the `add` API call. This will override any project-level custom categories for that specific memory addition. For example, if you want to use different categories for food-related memories, you can provide custom categories like "food" and "user_preferences" in the `add` call. These custom categories will be used instead of the project-level categories when categorizing those specific memories. diff --git a/docs/platform/features/custom-instructions.mdx b/docs/platform/features/custom-instructions.mdx index 846dbbc8a..b78da56c5 100644 --- a/docs/platform/features/custom-instructions.mdx +++ b/docs/platform/features/custom-instructions.mdx @@ -7,7 +7,7 @@ iconType: "solid" ## What are Custom Instructions? -Custom instructions are natural language guidelines that tell Mem0 exactly what information to extract and remember from conversations. Think of them as smart filters that ensure your AI application captures only the most relevant data for your specific use case. +Custom instructions are natural language guidelines that tell Mem0 exactly what information to extract and remember from conversations. They act as smart filters that ensure your AI application captures only the most relevant data for your specific use case. ```python Python @@ -291,7 +291,7 @@ client.project.update(custom_instructions=advanced_prompt) ### Testing Your Instructions -Always test your custom instructions with real messages examples: +Always test your custom instructions with real message examples: ```python Python diff --git a/docs/platform/features/direct-import.mdx b/docs/platform/features/direct-import.mdx index 127d30fd9..9b1012e7a 100644 --- a/docs/platform/features/direct-import.mdx +++ b/docs/platform/features/direct-import.mdx @@ -5,9 +5,9 @@ icon: "arrow-right" iconType: "solid" --- -## How to use Direct Import? -The Direct Import feature allows users to skip the memory deduction phase and directly input pre-defined memories into the system for storage and retrieval. -To enable this feature, you need to set the `infer` parameter to `False` in the `add` method. +## How to Use Direct Import + +The Direct Import feature allows users to skip the memory deduction phase and directly input pre-defined memories into the system for storage and retrieval. To enable this feature, set the `infer` parameter to `False` in the `add` method. @@ -17,7 +17,7 @@ To enable this feature, you need to set the `infer` parameter to `False` in the messages = [ {"role": "user", "content": "Alice loves playing badminton"}, {"role": "assistant", "content": "That's great! Alice is a fitness freak"}, - {"role": "user", "content": "Alice mostly cook at home because of gym plan"}, + {"role": "user", "content": "Alice mostly cooks at home because of her gym plan"}, ] @@ -29,12 +29,11 @@ client.add(messages, user_id="alice", infer=False) ``` -You can see that the output of add call is an empty list. +You can see that the output of the add call is an empty list. - Only messages with the role "user" will be used for storage. Messages with roles such as "assistant" or "system" will be ignored during the storage process. +Only messages with the role "user" will be used for storage. Messages with roles such as "assistant" or "system" will be ignored during the storage process. - -## How to retrieve memories? +## How to Retrieve Memories You can retrieve memories using the `search` method. @@ -62,7 +61,7 @@ client.search("What is Alice's favorite sport?", user_id="alice") -## How to retrieve all memories? +## How to Retrieve All Memories You can retrieve all memories using the `get_all` method. @@ -86,7 +85,7 @@ client.get_all(query="What is Alice's favorite sport?", user_id="alice", output_ }, { "id": "8557f05d-7b3c-47e5-b409-9886f9e314fc", - "memory": "Alice mostly cook at home because of gym plan", + "memory": "Alice mostly cooks at home because of her gym plan", "user_id": "pc123", "metadata": null, "categories": null, diff --git a/docs/platform/features/expiration-date.mdx b/docs/platform/features/expiration-date.mdx index 64b757342..044183ce6 100644 --- a/docs/platform/features/expiration-date.mdx +++ b/docs/platform/features/expiration-date.mdx @@ -9,15 +9,14 @@ iconType: "solid" Setting expiration dates for memories offers several advantages: -• **Time-Sensitive Information Management**: Handle information that's only relevant for a specific time period. - -• **Event-Based Memory**: Manage information related to upcoming events that becomes irrelevant after the event passes. +- **Time-Sensitive Information Management**: Handle information that is only relevant for a specific time period. +- **Event-Based Memory**: Manage information related to upcoming events that becomes irrelevant after the event passes. These benefits enable more sophisticated memory management for applications where temporal context matters. ## Setting Memory Expiration Date -You can set an expiration date for memories, after which they will no longer be retrieved in searches. This is useful for creating temporary memories or memories that are only relevant for a specific time period. +You can set an expiration date for memories, after which they will no longer be retrieved in searches. This is useful for creating temporary memories or memories that are relevant only for a specific time period. @@ -30,7 +29,7 @@ client = MemoryClient(api_key="your-api-key") messages = [ { "role": "user", - "content": "I'll be in San Francisco until end of this month." + "content": "I'll be in San Francisco until the end of this month." } ] @@ -48,7 +47,7 @@ const client = new MemoryClient({ apiKey: 'your-api-key' }); const messages = [ { "role": "user", - "content": "I'll be in San Francisco until end of this month." + "content": "I'll be in San Francisco until the end of this month." } ]; @@ -79,7 +78,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \ "messages": [ { "role": "user", - "content": "I'll be in San Francisco until end of this month." + "content": "I'll be in San Francisco until the end of this month." } ], "user_id": "alex", @@ -93,7 +92,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \ { "id": "a1b2c3d4-e5f6-4g7h-8i9j-k0l1m2n3o4p5", "data": { - "memory": "In San Francisco until end of this month" + "memory": "In San Francisco until the end of this month" }, "event": "ADD" } @@ -104,7 +103,7 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \ -Once a memory reaches its expiration date, it won't be included in search or get results, though the data remains stored in the system. +Once a memory reaches its expiration date, it will not be included in search or get results, though the data remains stored in the system. If you have any questions, please feel free to reach out to us using one of the following methods: diff --git a/docs/platform/features/feedback-mechanism.mdx b/docs/platform/features/feedback-mechanism.mdx index 92dd6c7f4..ab26be789 100644 --- a/docs/platform/features/feedback-mechanism.mdx +++ b/docs/platform/features/feedback-mechanism.mdx @@ -4,11 +4,11 @@ icon: "thumbs-up" iconType: "solid" --- -Mem0's **Feedback Mechanism** allows you to provide feedback on the memories generated by your application. This feedback is used to improve the accuracy of the memories and the search results. +Mem0's Feedback Mechanism allows you to provide feedback on the memories generated by your application. This feedback is used to improve the accuracy of the memories and search results. ## How it works -The feedback mechanism is a simple API that allows you to provide feedback on the memories generated by your application. The feedback is stored in the database and is used to improve the accuracy of the memories and the search results. Over time, Mem0 continuously learns from this feedback, refining its memory generation and search capabilities for better performance. +The feedback mechanism is a simple API that allows you to provide feedback on the memories generated by your application. The feedback is stored in the database and used to improve the accuracy of the memories and search results. Over time, Mem0 continuously learns from this feedback, refining its memory generation and search capabilities for better performance. ## Give Feedback @@ -118,27 +118,30 @@ for (const item of feedbackData) { ## Best Practices ### When to Provide Feedback -- **Immediately after memory retrieval** when you can assess relevance -- **During user interactions** when users explicitly indicate satisfaction/dissatisfaction -- **Through automated evaluation** using your application's success metrics + +- Immediately after memory retrieval when you can assess relevance +- During user interactions when users explicitly indicate satisfaction or dissatisfaction +- Through automated evaluation using your application's success metrics ### Effective Feedback Reasons + Provide specific, actionable feedback reasons: -✅ **Good examples:** +**Good examples:** - "Contains outdated contact information" - "Accurately captured the user's dietary restrictions" - "Irrelevant to the current conversation context" -❌ **Avoid vague reasons:** +**Avoid vague reasons:** - "Bad memory" - "Wrong" - "Not good" ### Feedback Strategy -1. **Be consistent** - Apply the same criteria across similar memories -2. **Be specific** - Detailed reasons help improve the system faster -3. **Monitor patterns** - Regular feedback analysis helps identify improvement areas + +1. Be consistent: Apply the same criteria across similar memories +2. Be specific: Detailed reasons help improve the system faster +3. Monitor patterns: Regular feedback analysis helps identify improvement areas ## Error Handling @@ -194,8 +197,8 @@ try { Track the impact of your feedback by monitoring memory performance over time. Consider implementing: -- **Feedback completion rates** - What percentage of memories receive feedback -- **Feedback distribution** - Balance of positive vs. negative feedback -- **Memory quality trends** - How accuracy improves with feedback volume -- **User satisfaction metrics** - Correlation between feedback and user experience +- Feedback completion rates: What percentage of memories receive feedback +- Feedback distribution: Balance of positive vs. negative feedback +- Memory quality trends: How accuracy improves with feedback volume +- User satisfaction metrics: Correlation between feedback and user experience diff --git a/docs/platform/features/graph-memory.mdx b/docs/platform/features/graph-memory.mdx index b36beef77..0f015d7ab 100644 --- a/docs/platform/features/graph-memory.mdx +++ b/docs/platform/features/graph-memory.mdx @@ -7,7 +7,7 @@ description: "Enable graph-based memory retrieval for more contextually relevant ## Overview -Graph Memory enhances memory pipeline by creating relationships between entities in your data. It builds a network of interconnected information for more contextually relevant search results. +Graph Memory enhances the memory pipeline by creating relationships between entities in your data. It builds a network of interconnected information for more contextually relevant search results. This feature allows your AI applications to understand connections between entities, providing richer context for responses. It's ideal for applications needing relationship tracking and nuanced information retrieval across related memories. @@ -112,9 +112,7 @@ The graph memory would look like this: -Response for the graph memory's `add` operation will not be available directly in the response. -As adding graph memories is an asynchronous operation due to heavy processing, -you can use the `get_all()` endpoint to retrieve the memory with the graph metadata. +Response for the graph memory's `add` operation will not be available directly in the response. As adding graph memories is an asynchronous operation due to heavy processing, you can use the `get_all()` endpoint to retrieve the memory with the graph metadata. @@ -320,10 +318,10 @@ const client = new MemoryClient({ project_id: "your-project-id" }); -# Enable graph memory for all operations in this project +// Enable graph memory for all operations in this project await client.updateProject({ enable_graph: true, version: "v1" }); -# Now all add operations will use graph memory by default +// Now all add operations will use graph memory by default const messages = [ { role: "user", content: "My name is Joseph" }, { role: "assistant", content: "Hello Joseph, it's nice to meet you!" }, @@ -342,9 +340,9 @@ await client.add({ ## Best Practices -- Enable Graph Memory for applications where understanding context and relationships between memories is important -- Graph Memory works best with a rich history of related conversations -- Consider Graph Memory for long-running assistants that need to track evolving information +- Enable Graph Memory for applications where understanding context and relationships between memories is important. +- Graph Memory works best with a rich history of related conversations. +- Consider Graph Memory for long-running assistants that need to track evolving information. ## Performance Considerations diff --git a/docs/platform/features/group-chat.mdx b/docs/platform/features/group-chat.mdx index 758e711fc..a2cdfee48 100644 --- a/docs/platform/features/group-chat.mdx +++ b/docs/platform/features/group-chat.mdx @@ -7,8 +7,6 @@ iconType: "solid" -## Introduction to the Group Chat - ## Overview The Group Chat feature enables Mem0 to process conversations involving multiple participants and automatically attribute memories to individual speakers. This allows for precise tracking of each participant's preferences, characteristics, and contributions in collaborative discussions, team meetings, or multi-agent conversations. @@ -288,4 +286,4 @@ Each message in a group chat must include: If you have any questions, please feel free to reach out to us using one of the following methods: - + diff --git a/docs/platform/features/multimodal-support.mdx b/docs/platform/features/multimodal-support.mdx index 6754b357b..0fc7324ea 100644 --- a/docs/platform/features/multimodal-support.mdx +++ b/docs/platform/features/multimodal-support.mdx @@ -5,7 +5,7 @@ icon: "image" iconType: "solid" --- -Mem0 extends its capabilities beyond text by supporting multimodal data, including images and documents. With this feature, users can seamlessly integrate visual and document content into their interactions—allowing Mem0 to extract relevant information from various media types and enrich the memory system. +Mem0 extends its capabilities beyond text by supporting multimodal data, including images and documents. With this feature, users can seamlessly integrate visual and document content into their interactions, allowing Mem0 to extract relevant information from various media types and enrich the memory system. ## How It Works @@ -101,7 +101,7 @@ Mem0 currently supports the following media types: ### 1. Images -#### Using an Image URL (Recommended) +#### Using an Image URL You can include an image by providing its direct URL. This method is simple and efficient for online images. @@ -124,7 +124,7 @@ client.add([image_message], user_id="alice") #### Using Base64 Image Encoding for Local Files -For local images—or when embedding the image directly is preferable—you can use a Base64-encoded string. +For local images or when embedding the image directly is preferable, you can use a Base64-encoded string. ```python Python diff --git a/docs/platform/features/selective-memory.mdx b/docs/platform/features/selective-memory.mdx index 6b731e6da..8c7653a45 100644 --- a/docs/platform/features/selective-memory.mdx +++ b/docs/platform/features/selective-memory.mdx @@ -9,24 +9,19 @@ iconType: "solid" Memory customization offers several key benefits: -• **Focused Storage**: Store only relevant information for a streamlined system. - -• **Improved Accuracy**: Curate memories for more accurate and relevant retrieval. - -• **Enhanced Privacy**: Exclude sensitive information for better privacy control. - -• **Resource Efficiency**: Optimize storage and processing by keeping only pertinent data. - -• **Personalization**: Tailor the experience to individual user preferences. - -• **Contextual Relevance**: Improve effectiveness in specialized domains or applications. +- **Focused Storage**: Store only relevant information for a streamlined system. +- **Improved Accuracy**: Curate memories for more accurate and relevant retrieval. +- **Enhanced Privacy**: Exclude sensitive information for better privacy control. +- **Resource Efficiency**: Optimize storage and processing by keeping only pertinent data. +- **Personalization**: Tailor the experience to individual user preferences. +- **Contextual Relevance**: Improve effectiveness in specialized domains or applications. These benefits allow users to fine-tune their memory systems, creating a more powerful and personalized AI assistant experience. ## Memory Inclusion + Users can define specific kinds of memories to store. This feature enhances memory management by focusing on relevant information, resulting in a more efficient and personalized experience. -Here’s how you can do it: ```python import os @@ -69,7 +64,6 @@ User loves playing baseball with friends. ## Memory Exclusion In addition to specifying what to include, users can also define exclusion rules for their memory management. This feature allows for fine-tuning the memory system by instructing it to omit certain types of information. -Here’s how you can do it: ```python from mem0 import MemoryClient diff --git a/docs/platform/features/timestamp.mdx b/docs/platform/features/timestamp.mdx index 0b4fe0ba9..8b77a1459 100644 --- a/docs/platform/features/timestamp.mdx +++ b/docs/platform/features/timestamp.mdx @@ -20,13 +20,10 @@ By leveraging custom timestamps, you can ensure that your memory system maintain Custom timestamps offer several important benefits: -• **Historical Accuracy**: Preserve the exact timing of past events and information. - -• **Data Migration**: Seamlessly migrate existing data while maintaining original timestamps. - -• **Time-Sensitive Analysis**: Enable time-based analysis and pattern recognition across memories. - -• **Consistent Chronology**: Maintain proper ordering of memories for coherent storytelling. +- **Historical Accuracy**: Preserve the exact timing of past events and information. +- **Data Migration**: Seamlessly migrate existing data while maintaining original timestamps. +- **Time-Sensitive Analysis**: Enable time-based analysis and pattern recognition across memories. +- **Consistent Chronology**: Maintain proper ordering of memories for coherent storytelling. ## Using Custom Timestamps diff --git a/docs/platform/features/webhooks.mdx b/docs/platform/features/webhooks.mdx index 8994d490e..73327958b 100644 --- a/docs/platform/features/webhooks.mdx +++ b/docs/platform/features/webhooks.mdx @@ -13,7 +13,7 @@ Webhooks enable real-time notifications for memory events in your Mem0 project. ### Create Webhook -Create a webhook for your project; it will receive events only from that project: +Create a webhook for your project. It will receive events only from that project: ```python Python @@ -188,13 +188,10 @@ When a memory event occurs, Mem0 sends an HTTP POST request to your webhook URL ## Best Practices -1. **Implement Retry Logic**: Ensure your webhook endpoint can handle temporary failures by implementing retry logic. - +1. **Implement Retry Logic**: Ensure your webhook endpoint can handle temporary failures. 2. **Verify Webhook Source**: Implement security measures to verify that webhook requests originate from Mem0. - 3. **Process Events Asynchronously**: Process webhook events asynchronously to avoid timeouts and ensure reliable handling. - -4. **Monitor Webhook Health**: Regularly review your webhook logs to ensure functionality and promptly address any delivery failures. +4. **Monitor Webhook Health**: Regularly review your webhook logs to ensure functionality and promptly address delivery failures. If you have any questions, please feel free to reach out to us using one of the following methods: diff --git a/docs/platform/overview.mdx b/docs/platform/overview.mdx index 19383077e..7e6c054ba 100644 --- a/docs/platform/overview.mdx +++ b/docs/platform/overview.mdx @@ -30,5 +30,3 @@ Check out our [Platform Guide](/platform/quickstart) to start using Mem0 platfor - Sign up to the [Mem0 Platform](https://mem0.dev/pd) - Join our [Discord](https://mem0.dev/Did) with other developers and get support. - -We're excited to see what you'll build with Mem0 Platform. Let's create smarter, more personalized AI experiences together! diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index f44189241..7402584d8 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -10,10 +10,10 @@ Check out our [Playground](https://mem0.dev/pd-pg) to see Mem0 in action. - Better, faster, fully managed, and hassle free solution. + Better, faster, fully managed, and hassle-free solution. - Self hosted, fully customizable, and open source. + Self-hosted, fully customizable, and open source. @@ -283,7 +283,7 @@ curl -X GET "https://api.mem0.ai/v2/memories/?page=1&page_size=50" \ ## Mem0 Open Source -Our open-source version is available for those who prefer full control and customization. You can self-host Mem0 on your infrastructure and integrate it with your AI agents and assistants. Checkout our [GitHub repository](https://mem0.dev/gd) +Our open-source version is available for those who prefer full control and customization. You can self-host Mem0 on your infrastructure and integrate it with your AI agents and assistants. Check out our [GitHub repository](https://mem0.dev/gd). Follow the steps below to get started with Mem0 Open Source: