docs/integrations/vercel.mdx
The Mem0 Vercel integration provisions managed Mem0 access directly from the Vercel Marketplace. Installing it creates a Mem0 account for you and injects a MEM0_API_KEY into your Vercel project, so you can add long-term memory to your AI apps and agents in minutes, with no separate signup and billing handled through Vercel.
When you install Mem0 from the Vercel Marketplace:
MEM0_API_KEY, MEM0_ORG_ID, MEM0_PROJECT_ID, MEM0_BASE_URL) are added to your connected Vercel project.You call Mem0 from your app with the injected key. There is nothing else to wire up.
The integration sets the following on your connected project:
| Variable | Description |
|---|---|
MEM0_API_KEY | Your Mem0 API key, scoped to the org and project created for this installation. This is what you authenticate with. |
MEM0_ORG_ID | The Mem0 organization id for this installation. |
MEM0_PROJECT_ID | The Mem0 project id for this installation. |
MEM0_BASE_URL | The Mem0 API base URL (https://api.mem0.ai). |
The API key is scoped to your org and project, so the SDK needs only MEM0_API_KEY to get started.
Install the SDK:
<CodeGroup> ```bash npm npm install mem0ai ```pip install mem0ai
Add and search memories using the injected key:
<CodeGroup> ```typescript JavaScript import MemoryClient from "mem0ai";const memory = new MemoryClient({ apiKey: process.env.MEM0_API_KEY });
// Store a memory await memory.add( [{ role: "user", content: "I'm a vegetarian and allergic to nuts." }], { userId: "user123" }, );
// Retrieve relevant memories const results = await memory.search("What are my dietary restrictions?", { filters: { user_id: "user123" }, }); console.log(results);
```python Python
import os
from mem0 import MemoryClient
memory = MemoryClient(api_key=os.environ["MEM0_API_KEY"])
# Store a memory
memory.add(
[{"role": "user", "content": "I'm a vegetarian and allergic to nuts."}],
user_id="user123",
)
# Retrieve relevant memories
results = memory.search("What are my dietary restrictions?", filters={"user_id": "user123"})
print(results)
See the platform quickstart for the full API.
| Plan | Price | Memories | Retrieval calls | Projects | Support |
|---|---|---|---|---|---|
| Hobby | Free | 10,000 | 1,000 / month | 1 | Community |
| Starter | $20 / month | 50,000 | 5,000 / month | 1 | Community |
Billing runs through your Vercel account; Mem0 never charges your card directly. You can upgrade or downgrade anytime from the installation's settings in the Vercel dashboard.
MEM0_API_KEY is scoped to the org and project created for this installation, so you do not manage keys by hand.