Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Doc: Fix example in quickstart page (#2986)

Dev Khantd47cb8d28418
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index 4ebca6c81..3f3d99fb4 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -333,11 +333,23 @@ const memory = new Memory();
<CodeGroup>
```python Code
# For a user
-result = m.add("I like to drink coffee in the morning and go for a walk.", user_id="alice", metadata={"category": "preferences"})
+messages = [
+ {
+ "role": "user",
+ "content": "I like to drink coffee in the morning and go for a walk"
+ }
+]
+result = m.add(messages, user_id="alice", metadata={"category": "preferences"})
```
```typescript TypeScript
-const result = memory.add("I like to drink coffee in the morning and go for a walk.", { userId: "alice", metadata: { category: "preferences" } });
+const messages = [
+ {
+ role: "user",
+ content: "I like to drink coffee in the morning and go for a walk"
+ }
+];
+const result = memory.add(messages, { userId: "alice", metadata: { category: "preferences" } });
```
```json Output