Mem0 ("mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions.
> /plugin marketplace add mem0ai/mem0> /plugin install mem0@mem0-plugins
Repo: mem0ai/mem0
What's inside
| Benchmark | Old | New | Tokens | Latency p50 |
|---|---|---|---|---|
| LoCoMo | 71.4 | 92.5 | 7.0K | 0.88s |
| LongMemEval | 67.8 | 94.4 | 6.8K | 1.09s |
| BEAM (1M) | β | 64.1 | 6.7K | 1.00s |
| BEAM (10M) | β | 48.6 | 6.9K | 1.05s |
All benchmarks run on the same production-representative model stack. Single-pass retrieval (one call, no agentic loops) at a top_200 retrieval budget. Scores reflect Mem0's managed platform, which includes proprietary optimizations not available in the open-source SDK; open-source users should expect directionally similar gains but not identical numbers.
What changed:
See the migration guide for upgrade instructions. The evaluation framework is open-sourced so anyone can reproduce the numbers.
Mem0 ("mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions. It remembers user preferences, adapts to individual needs, and continuously learns over timeβideal for customer support chatbots, AI assistants, and autonomous systems.
Core Capabilities:
Applications:
AI agents can mint a working Mem0 API key in under five seconds β no email, no dashboard, no OTP. Four commands end-to-end:
# 1. Install
npm install -g @mem0/cli # or: pip install mem0-cli
# 2. Sign up as an agent (replace `claude-code` with your name)
mem0 init --agent --agent-caller claude-code
# 3. Add a memory
mem0 add "I am using mem0"
# 4. Search
mem0 search "am I using mem0"
The human owner can claim the account later with mem0 init --email <their-email> β same key, memories preserved. Full guide: Sign up as an agent.
| Library | Self-Hosted Server | Cloud Platform | |
|---|---|---|---|
| Best for | Testing, prototyping | Teams running on their own infrastructure | Zero-ops production use |
| Setup | pip install mem0ai | docker compose up | Sign up at app.mem0.ai |
| Dashboard | -- | Yes | Yes |
| Auth & API Keys | -- | Yes | Yes |
| Advanced Features | -- | Teasers | All included |
Just testing? Use the library. Building for a team? Self-hosted. Want zero ops? Cloud.
pip install mem0ai
For enhanced hybrid search with BM25 keyword matching and entity extraction, install with NLP support:
pip install mem0ai[nlp]
python -m spacy download en_core_web_sm
Install sdk via npm:
npm install mem0ai
Note: Self-hosted auth is on by default. Upgrading from a pre-auth build? Set
ADMIN_API_KEY, register an admin through the wizard, orAUTH_DISABLED=truefor local dev only. See upgrade notes.
# Recommended: one command β start the stack, create an admin, issue the first API key.
cd server && make bootstrap
# Manual: start the stack and finish setup via the browser wizard.
cd server && docker compose up -d # http://localhost:3000
See the self-hosted docs for configuration.
Manage memories from your terminal:
npm install -g @mem0/cli # or: pip install mem0-cli
mem0 init
mem0 add "Prefers dark mode and vim keybindings" --user-id alice
mem0 search "What does Alice prefer?" --user-id alice
See the CLI documentation for the full command reference.
Teach your AI coding assistant (Claude Code, Codex, Cursor, Windsurf, OpenCode, OpenClaw, and any tool that supports the skills standard) how to build with Mem0. Two categories:
Reference skills β always on (SDK knowledge loaded into the assistant's context):
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 (execute an end-to-end workflow in an existing repo):
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
Use /mem0-integrate to wire Mem0 into an existing repo via a test-first pipeline, then /mem0-test-integration to verify. Use /mem0-oss-to-platform to migrate an existing project from Mem0 OSS to the hosted Platform SDK. See the skills catalog or Vibecoding with Mem0 for the full picture.
Mem0 requires an LLM to function, with gpt-5-mini from OpenAI as the default. However, it supports a variety of LLMs; for details, refer to our Supported LLMs documentation.
Mem0 uses text-embedding-3-small from OpenAI as the default embedding model. For best results with hybrid search (semantic + keyword + entity boosting), we recommend using at least Qwen 600M or a comparable embedding model. See Supported Embeddings for configuration details.
First step is to instantiate the memory:
from openai import OpenAI
from mem0 import Memory
openai_client = OpenAI()
memory = Memory()
def chat_with_memories(message: str, user_id: str = "default_user") -> str:
# Retrieve relevant memories
relevant_memories = memory.search(query=message, filters={"user_id": user_id}, top_k=3)
memories_str = "\n".join(f"- {entry['memory']}" for entry in relevant_memories["results"])
# Generate Assistant response
system_prompt = f"You are a helpful AI. Answer the question based on query and memories.\nUser Memories:\n{memories_str}"
messages = [{"role": "system", "content": system_prompt}, {"role": "user", "content": message}]
response = openai_client.chat.completions.create(model="gpt-5-mini", messages=messages)
assistant_response = response.choices[0].message.content
# Create new memories from the conversation
messages.append({"role": "assistant", "content": assistant_response})
memory.add(messages, user_id=user_id)
return assistant_response
def main():
print("Chat with AI (type 'exit' to quit)")
while True:
user_input = input("You: ").strip()
if user_input.lower() == 'exit':
print("Goodbye!")
break
print(f"AI: {chat_with_memories(user_input)}")
if __name__ == "__main__":
main()
For detailed integration steps, see the Quickstart and API Reference.
We now have a paper you can cite:
@article{mem0,
title={Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory},
author={Chhikara, Prateek and Khant, Dev and Aryan, Saket and Singh, Taranjeet and Yadav, Deshraj},
journal={arXiv preprint arXiv:2504.19413},
year={2025}
}
Apache 2.0 β see the LICENSE file for details.
.agents/
plugins/
marketplace.json
.claude-plugin/
marketplace.json
.codex-plugin/
marketplace.json
.cursor-plugin/
marketplace.json
.github/
advanced-issue-labeler.yml
component-keywords.json
ISSUE_TEMPLATE/
bug_report.yml
config.yml
documentation_issue.yml
feature_request.yml
labeler.yml
PULL_REQUEST_TEMPLATE.md
scripts/
infer-component-labels.js
infer-component-labels.test.js
workflows/
cd.yml
ci-gate.yml
ci.yml
cli-node-cd.yml
cli-node-ci.yml
cli-python-cd.yml
cli-python-ci.yml
docs-llms-txt-check.yml
issue-labeler.yml
mem0-plugin-checks.yml
n8n-nodes-mem0-cd.yml
n8n-nodes-mem0-checks.yml
openclaw-cd.yml
openclaw-checks.yml
opencode-plugin-cd.yml
opencode-plugin-checks.yml
pi-agent-plugin-cd.yml
pi-agent-plugin-checks.yml
pr-labeler.yml
release.yml
stale.yml
ts-sdk-cd.yml
ts-sdk-ci.yml
vercel-ai-cd.yml
zapier-mem0-cd.yml
zapier-mem0-checks.yml
.gitignore
.gitmodules
.pre-commit-config.yaml
AGENTS.md
CLAUDE.md
cli/
CLI_SPECIFICATION.md
cli-spec.json
node/
development.md
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
README.md
src/
agent-detect.ts
backend/
base.ts
index.ts
platform.ts
branding.ts
commands/
agent-mode.ts
agent-rush.ts
config.ts
entities.ts
events.ts
identify.ts
init.ts
memory.ts
utils.ts
whoami.ts
config.ts
globals.d.ts
help.ts
index.ts
output.ts
plugin-sync.ts
state.ts
telemetry.ts
version.ts
telemetry-sender.cjs
tests/
agent-mode.test.ts
branding.test.ts
cli-integration.test.ts
commands.test.ts
config.test.ts
init-internals.test.ts
option-parity.test.ts
output.test.ts
platform-backend.test.ts
setup.ts
telemetry.test.ts
tsconfig.json
tsup.config.ts
vitest.config.ts
python/
development.md
Makefile
pyproject.toml
README.md
src/
mem0_cli/
__init__.py
__main__.py
agent_detect.py
app.py
backend/
__init__.py
base.py
platform.py
branding.py
commands/
__init__.py
agent_mode_cmd.py
agent_rush_cmd.py
config_cmd.py
entities.py
events_cmd.py
identify_cmd.py
init_cmd.py
memory.py
utils.py
whoami_cmd.py
config.py
output.py
plugin_sync.py
state.py
telemetry_sender.py
telemetry.py
tests/
__init__.py
conftest.py
test_agent_mode.py
test_branding.py
test_cli_integration.py
test_commands.py
test_config.py
test_init_internals.py
test_option_parity.py
test_output.py
test_platform_backend_options.py
test_platform_backend_paths.py
test_platform_backend.py
test_telemetry.py
README.md
CONTRIBUTING.md
docs/
_snippets/
async-memory-add.mdx
blank-notif.mdx
get-help.mdx
star-on-github.mdx
api-reference/
api-reference.mdx
entities/
delete-user.mdx
get-users.mdx
events/
get-event.mdx
get-events.mdx
memory/
add-memories.mdx
batch-delete.mdx
batch-update.mdx
create-memory-export.mdx
delete-memories.mdx
delete-memory.mdx
feedback.mdx
get-memories.mdx
get-memory-export.mdx
get-memory.mdx
history-memory.mdx
search-memories.mdx
update-memory.mdx
organization/
add-org-member.mdx
create-org.mdx
delete-org.mdx
get-org-members.mdx
get-org.mdx
get-orgs.mdx
remove-org-member.mdx
update-org-member.mdx
organizations-projects.mdx
project/
add-project-member.mdx
create-project.mdx
delete-project.mdx
get-project-members.mdx
get-project.mdx
get-projects.mdx
remove-project-member.mdx
update-project-member.mdx
update-project.mdx
webhook/
create-webhook.mdx
delete-webhook.mdx
get-webhook.mdx
update-webhook.mdx
changelog/
highlights.mdx
platform.mdx
sdk.mdx
components/
embedders/
config.mdx
models/
aws_bedrock.mdx
azure_openai.mdx
fastembed.mdx
google_AI.mdx
huggingface.mdx
langchain.mdx
lmstudio.mdx
ollama.mdx
openai.mdx
together.mdx
vertexai.mdx
overview.mdx
llms/
config.mdx
models/
anthropic.mdx
aws_bedrock.mdx
azure_openai.mdx
deepseek.mdx
google_AI.mdx
groq.mdx
langchain.mdx
litellm.mdx
lmstudio.mdx
minimax.mdx
mistral_AI.mdx
ollama.mdx
openai.mdx
sarvam.mdx
together.mdx
vllm.mdx
xAI.mdx
overview.mdx
rerankers/
config.mdx
custom-prompts.mdx
models/
cohere.mdx
huggingface.mdx
llm_reranker.mdx
sentence_transformer.mdx
zero_entropy.mdx
optimization.mdx
overview.mdx
vectordbs/
config.mdx
dbs/
azure_mysql.mdx
azure.mdx
baidu.mdx
cassandra.mdx
chroma.mdx
databricks.mdx
elasticsearch.mdx
faiss.mdx
langchain.mdx
milvus.mdx
mongodb.mdx
neon.mdx
neptune_analytics.mdx
opensearch.mdx
oracledb.mdx
pgvector.mdx
pinecone.mdx
qdrant.mdx
redis.mdx
s3_vectors.mdx
supabase.mdx
turbopuffer.mdx
upstash-vector.mdx
valkey.mdx
vectorize.mdx
vertex_ai.mdx
weaviate.mdx
overview.mdx
contributing/
development.mdx
documentation.mdx
cookbooks/
companions/
ai-tutor.mdx
local-companion-ollama.mdx
nodejs-companion.mdx
quickstart-demo.mdx
travel-assistant.mdx
voice-companion-openai.mdx
youtube-research.mdx
essentials/
building-ai-companion.mdx
controlling-memory-ingestion.mdx
entity-partitioning-playbook.mdx
exporting-memories.mdx
tagging-and-organizing-memories.mdx
frameworks/
eliza-os-character.mdx
gemini-3-with-mem0-mcp.mdx
llamaindex-multiagent.mdx
llamaindex-react.mdx
multimodal-retrieval.mdx
integrations/
agents-sdk-tool.mdx
aws-bedrock.mdx
healthcare-google-adk.mdx
mastra-agent.mdx
openai-tool-calls.mdx
tavily-search.mdx
operations/
content-writing.mdx
deep-research.mdx
email-automation.mdx
support-inbox.mdx
team-task-agent.mdx
overview.mdx
core-concepts/
how-it-works.mdx
memory-evaluation.mdx
memory-operations/
add.mdx
delete.mdx
search.mdx
update.mdx
memory-types.mdx
docs.json
favicon.ico
favicon.svg
images/
banner-sm.png
dify-mem0-integration.png
docs thumbnails/
dark/
API.png
Cookbooks.png
mem0_open_source.png
mem0-cli.png
mem0-integrations.png
mem0-platform.png
mem0-plugins.png
light/
API.png
Cookbooks.png
mem0_open_source.png
mem0-cli.png
mem0-integrations.png
mem0-platform.png
mem0-plugins.png
graph-platform.png
hero-dark.svg
hero-light.svg
mem0-bg.png
memory-agent-stack.png
memory-extraction.png
openclaw-architecture.png
platform/
activity.png
api-key.png
playground/
pg-add-memory.png
pg-retrieve-memory.png
provider-icons/
agno.svg
anthropic.svg
autogen.svg
aws-color.svg
azure-color.svg
bedrock-color.svg
camel.svg
chroma.svg
cohere.svg
crewai.svg
databricks.svg
deepseek-color.svg
dify.svg
elasticsearch.svg
elevenlabs.svg
google-color.svg
groq.svg
hermes.svg
huggingface.svg
langchain-color.svg
langchain.svg
livekit.svg
llamaindex.svg
... 1580 moreFAQ
mem0 is a Claude Code plugin with 32 hand-picked skills for data work, indexed on Flowy. Install it with the command on its page. It includes context-loader, dream, export. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.