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: update timestamp (#2638)

Dev Khant02a2b5955567
diff --git a/docs/features/timestamp.mdx b/docs/features/timestamp.mdx
index cd95256b5..813338401 100644
--- a/docs/features/timestamp.mdx
+++ b/docs/features/timestamp.mdx
@@ -39,9 +39,16 @@ When adding new memories, you can specify a custom timestamp to indicate when th
<CodeGroup>
```python Python
+import os
import time
from datetime import datetime, timedelta
+from mem0 import MemoryClient
+
+os.environ["MEM0_API_KEY"] = "your-api-key"
+
+client = MemoryClient()
+
# Get the current time
current_time = datetime.now()
@@ -56,6 +63,9 @@ client.add("I'm travelling to SF", user_id="user1", timestamp=unix_timestamp)
```
```javascript JavaScript
+import MemoryClient from 'mem0ai';
+const client = new MemoryClient({ apiKey: 'your-api-key' });
+
// Get the current time
const currentTime = new Date();