Platform Quickstart
FreshSet up a Mem0 Platform account and store your first memory in under 5 minutes.
Prerequisites
- Active Mem0 Platform account (sign up free)
- API key from dashboard settings
- Python 3.10+ or Node.js 14+
Step 1: Install the SDK
bash
pip install mem0aibash
npm install mem0aiStep 2: Initialize the Client
python
from mem0 import MemoryClient
client = MemoryClient(api_key="your-api-key")javascript
import MemoryClient from 'mem0ai';
const client = new MemoryClient({ apiKey: 'your-api-key' });bash
export MEM0_API_KEY="your-api-key"bash
mem0 init --api-key "your-api-key"Step 3: Add a Memory
python
messages = [
{"role": "user", "content": "I'm planning a trip to Tokyo next month."},
{"role": "assistant", "content": "Great! I'll remember that for future suggestions."}
]
result = client.add(messages, user_id="alice")
print(result)javascript
const messages = [
{ role: "user", content: "I'm planning a trip to Tokyo next month." },
{ role: "assistant", content: "Great! I'll remember that for future suggestions." }
];
const result = await client.add(messages, {
user_id: "alice",
version: "v2",
});
console.log(result);Step 4: Search Memories
python
results = client.search("What do you know about me?",
filters={"user_id": "alice"})
print(results)javascript
const results = await client.search("What do you know about me?", {
filters: { AND: [{ user_id: "alice" }] }
});
console.log(results);Sample Response
json
{
"results": [
{
"id": "mem_123abc",
"memory": "Planning a trip to Tokyo next month.",
"user_id": "alice",
"categories": ["travel"],
"created_at": "2025-10-22T04:40:22.864647-07:00",
"score": 0.89
}
]
}What Just Happened?
- Messages were analyzed -- Mem0's LLM extracted the key fact ("planning trip to Tokyo")
- Memory was created -- The fact was stored as a vector embedding with metadata
- Category was assigned -- "travel" was automatically applied
- Search worked -- Semantic search found the relevant memory
Next Steps
- Memory Operations -- Add, search, update, delete
- Platform Features -- Filters, graph memory, webhooks, and more
- Platform vs OSS -- Choose the right deployment
- API Reference -- Full REST API documentation