---
title: [Quickstart title — action focused]
description: [1 sentence outcome]
icon: "rocket"
estimatedTime: "[~X minutes]"
---
# [Hero headline — promise the win]
<Info>
**Prerequisites**
- [SDK/Runtime requirement]
- [API key or account requirement]
- [Any optional tooling the reader might want]
</Info>
<Tip>
[Optional: cross-link to OSS or platform alternative if applicable. Delete if unused.]
</Tip>
{/* Optional: delete if not needed */}
```mermaid
graph LR
A[Install] */} B[Configure keys]
B */} C[Add memory]
C */} D[Search]
D */} E[Delete]
```
## Install dependencies
<Tabs>
<Tab title="Python">
<Steps>
<Step title="Install the SDK">
```bash
pip install [package-name]
```
</Step>
</Steps>
</Tab>
<Tab title="TypeScript">
<Steps>
<Step title="Install the SDK">
```bash
npm install [package-name]
```
</Step>
</Steps>
</Tab>
</Tabs>
[Explain why the install matters in one sentence.]
## Configure access
<Tabs>
<Tab title="Python">
<Steps>
<Step title="Set environment variables">
```bash
export MEM0_API_KEY="sk-..."
```
</Step>
<Step title="Initialize the client">
```python
from mem0 import Memory
memory = Memory(api_key="sk-...")
```
</Step>
</Steps>
</Tab>
<Tab title="TypeScript">
<Steps>
<Step title="Set environment variables">
```bash
export MEM0_API_KEY="sk-..."
```
</Step>
<Step title="Initialize the client">
```typescript
import { Memory } from "mem0ai";
const memory = new Memory({ apiKey: process.env.MEM0_API_KEY! });
```
</Step>
</Steps>
</Tab>
</Tabs>
<Warning>
[Optional: call out the most common setup failure and how to fix it.]
</Warning>
## Add your first memory
<Tabs>
<Tab title="Python">
<Steps>
<Step title="Send a conversation">
```python
messages = [
{"role": "user", "content": "Hi, I'm Alex and I love basketball."},
{"role": "assistant", "content": "Noted! I'll remember that."},
]
memory.add(messages, user_id="alex")
```
</Step>
</Steps>
</Tab>
<Tab title="TypeScript">
<Steps>
<Step title="Send a conversation">
```typescript
const messages = [
{ role: "user", content: "Hi, I'm Alex and I love basketball." },
{ role: "assistant", content: "Noted! I'll remember that." },
];
await memory.add(messages, { userId: "alex" });
```
</Step>
</Steps>
</Tab>
</Tabs>
<Info icon="check">
Expected output: `[Describe the success log or console output]`. If you see `[common error]`, jump to the troubleshooting section.
</Info>
## Search the memory
<Tabs>
<Tab title="Python">
<Steps>
<Step title="Query the memory">
```python
result = memory.search("What does Alex like?", filters={"user_id": "alex"})
print(result)
```
</Step>
</Steps>
</Tab>
<Tab title="TypeScript">
<Steps>
<Step title="Query the memory">
```typescript
const result = await memory.search("What does Alex like?", { userId: "alex" });
console.log(result);
```
</Step>
</Steps>
</Tab>
</Tabs>
<Info icon="check">
You should see `[show the key fields]`. Screenshot or paste real output when possible.
</Info>
## Delete the memory
<Tabs>
<Tab title="Python">
<Steps>
<Step title="Clean up">
```python
memory.delete_all(user_id="alex")
```
</Step>
</Steps>
</Tab>
<Tab title="TypeScript">
<Steps>
<Step title="Clean up">
```typescript
await memory.deleteAll({ userId: "alex" });
```
</Step>
</Steps>
</Tab>
</Tabs>
## Quick recovery
- `[Error message]` → `[One-line fix or link to troubleshooting guide]`
- `[Second error]` → `[How to resolve]`
{/* DEBUG: verify CTA targets */}
<CardGroup cols={2}>
<Card
title="[Related/alternate path]"
description="[Why it’s worth exploring next]"
icon="sparkles"
href="/[related-link]"
/>
<Card
title="[Next step in the journey]"
description="[Set expectation for what they’ll learn]"
icon="rocket"
href="/[next-link]"
/>
</CardGroup>