Vibecoding with Mem0 - Mem0

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

These docs are designed to be easily consumable by LLMs. Each page has a button that lets you copy the page as Markdown or paste directly into ChatGPT, Claude, or any AI coding tool. We follow the llms.txt standard:

Agent Skills

Mem0 ships two kinds of skills for AI coding assistants. Both work with Claude Code, Codex, Cursor, Windsurf, OpenCode, OpenClaw, and any assistant that supports the skills standard.

Reference skills (always on)

Teach your assistant Mem0’s SDK surface so it writes correct code in everyday development:

npx skills add https://github.com/mem0ai/mem0 --skill mem0
npx skills add https://github.com/mem0ai/mem0 --skill mem0-cli
npx skills add https://github.com/mem0ai/mem0 --skill mem0-vercel-ai-sdk

Pipeline skills (run on demand)

Let your assistant execute an end-to-end workflow in an existing repo. Invoked as slash commands:

npx skills add https://github.com/mem0ai/mem0 --skill mem0-integrate
npx skills add https://github.com/mem0ai/mem0 --skill mem0-test-integration
npx skills add https://github.com/mem0ai/mem0 --skill mem0-oss-to-platform

See the skills index for the full catalog.

MCP Server Setup

Connect Claude, Claude Code, Cursor, Windsurf, VS Code, OpenCode, or any MCP-compatible client to Mem0. Get your API key from app.mem0.ai, then add Mem0 MCP with a single command:

npx mcp-add \
  --name mem0-mcp \
  --type http \
  --url "https://mcp.mem0.ai/mcp" \
  --clients "claude,claude code,cursor,windsurf,vscode,opencode"

For per-client setup and advanced options, see Mem0 MCP Setup.

Universal Starter Prompt

Copy this into any AI tool to start building with Mem0:

I want to start building with Mem0, a self-improving memory layer for LLM
applications that gives agents persistent context across sessions.

Mem0 Resources

Documentation:

Code & Examples:

What Mem0 Does:
Mem0 is a memory layer for AI apps, managed (Mem0 Platform) or self-hosted
(Open Source). It stores, retrieves, and manages user memories so agents
remember preferences, learn from interactions, and personalize over time.
Sub-50ms retrieval. Storage: vector embeddings.

Architecture Overview:

Quick Usage (Python Platform):

from mem0 import MemoryClient
client = MemoryClient(api_key="m0-xxx")
client.add("I prefer dark mode and use VS Code.", user_id="user1")
results = client.search("What editor do they use?", filters={"user_id": "user1"})

Quick Usage (JavaScript Platform):

import MemoryClient from 'mem0ai';
const client = new MemoryClient({ apiKey: 'm0-xxx' });
await client.add([{ role: "user", content: "I prefer dark mode." }], { userId: "user1" });
const results = await client.search("What editor?", { filters: { userId: "user1" } });

Quick Usage (Python Open Source):

from mem0 import Memory
m = Memory()
m.add("I prefer dark mode and use VS Code.", user_id="user1")
results = m.search("What editor do they use?", filters={"user_id": "user1"})

Help me integrate Mem0 into my project. Start by asking what I'm building,
what language/framework I'm using, and whether I want managed or self-hosted.

Go Deeper

Platform Quickstart \ \ Get started with the managed API

Open Source \ \ Self-host with full control

Cookbooks \ \ Production-ready tutorials and examples

API Reference \ \ Explore every REST endpoint