/mem0-oss-to-platform
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local `Memory` class) to the mem0 Platform / hosted / managed SDK (the `MemoryClient` class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off
$ npx -y skills add mem0ai/mem0 --skill mem0-oss-to-platform --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/mem0-oss-to-platform
Context preview
The summary Claude sees to decide when to auto-load this skill.
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local `Memory` class) to the mem0 Platform / hosted / managed SDK (the `MemoryClient` class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off
SKILL.md
mem0-oss-to-platform.SKILL.mdname: mem0-oss-to-platform
description: >-
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK
(the local `Memory` class) to the mem0 Platform / hosted / managed SDK (the `MemoryClient`
class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off
OSS/self-hosted to the hosted API — e.g. "migrate my mem0 setup to the platform", "switch from
self-hosted mem0 to MemoryClient", "use my mem0 API key instead of a local Qdrant", "move mem0
to the cloud/hosted/managed service", or "replace my local mem0 vector store + embedder config
with the platform". Applies to Python (`from mem0 import Memory` → `from mem0 import MemoryClient`)
and TypeScript/JavaScript (`import { Memory } from "mem0ai/oss"` → `import MemoryClient from "mem0ai"`).
Trigger even when the user doesn't say the word "migrate" but clearly wants their existing mem0
integration to run against the hosted platform. It first produces a reviewable migration plan,
then executes it after the developer approves. Strictly scoped to the mem0 integration — it does
not refactor, restructure, or "improve" any unrelated code.Migrate mem0 OSS → mem0 Platform (hosted)
This skill migrates a project's memory layer from the **self-hosted mem0 OSS SDK** to the **hosted mem0 Platform SDK**, working for any project shape — an agent, a RAG pipeline, an API service, a chatbot, a background worker. You discover where mem0 is actually used, write a plan the developer reviews, and then execute it on approval.
The mental model (read this first — it's why the migration is shaped the way it is)
OSS mem0 means **the developer runs the whole memory stack themselves**: a vector store (Qdrant/pgvector/Chroma/…), an embedder, an LLM for fact extraction, and a local history DB. All of that is wired up in a config object passed to `Memory`.
The Platform means **mem0 runs that stack for them**. The developer just holds an **API key**. So the migration is mostly *subtraction*: the local infrastructure config collapses into a single `MemoryClient(api_key=...)`. The method calls stay recognizable (`add`/`search`/`get_all`/…), but a few parameter conventions tighten up and the return values are server responses.
So the core of every migration is: 1. `Memory` / `Memory.from_config({...})` → `MemoryClient()` (reads the API key from the env). 2. Delete the local `vector_store` / `llm` / `embedder` / `graph_store` / `history_db_path` config. 3. Fix up each call site to the hosted call convention (entity IDs into `filters`, pagination, etc.). 4. Flag everything that *isn't* a clean 1:1 so the developer can decide (see `references/gotchas.md`).
**Scope discipline:** touch only mem0-related code, config, dependencies, and env. Preserve the project's existing behavior, structure, and style. Do not rename things, "tidy" nearby code, or change the app's logic. The developer asked to swap a backend, not to refactor their project.
Workflow
Work through these phases in order. Phases 1–4 produce the plan; phase 5 runs only after approval.
Phase 0 — Prerequisite check
The hosted SDK needs a mem0 API key (`MEM0_API_KEY`, obtainable at https://app.mem0.ai). Confirm the developer has one. You don't need the key value to write the plan, but flag in the plan that it must be set (in `.env` / secrets manager, never hardcoded) before execution and verification.
Phase 1 — Discover the mem0 footprint
Do not assume the layout. Find every place mem0 appears. Detect the language and the **installed** version first, then sweep for usage. Concretely, search for:
- **Imports / instantiation:** `from mem0 import Memory`, `Memory.from_config`, `Memory(`,
`import ... from "mem0ai"`, `from "mem0ai/oss"`, `new Memory(`.
- **Config blocks:** keys like `vector_store`/`vectorStore`, `embedder`, `llm`, `graph_store`/
`graphStore`, `history_db_path`, `historyStore`, `custom_fact_extraction_prompt`, `custom_update_memory_prompt`, `enable_graph`.
- **Every call site:** `.add(`, `.search(`, `.get_all(`/`.getAll(`, `.delete_all(`/`.deleteAll(`,
`.get(`, `.update(`, `.delete(`, `.reset(`, `.history(`.
- **Dependencies & env:** `requirements.txt`/`pyproject.toml`/`package.json` for `mem0ai` and any
local-infra deps that exist *only* for mem0 (e.g. `qdrant-client`, `chromadb`); `.env`/config for things like `OPENAI_API_KEY` used by the local embedder/LLM; any docker-compose service (e.g. a Qdrant container) that exists only to back mem0.
Use Grep/Glob broadly; a single missed call site is a runtime break later. Record `file:line` for each finding — the plan's inventory is built from this.
Phase 2 — Verify the API against the installed SDK (don't guess)
Versions drift, and the OSS and hosted classes have subtly different signatures. Before mapping, confirm the **real** signatures of the installed package rather than trusting memory:
- **Python:** `python -c "import inspect; from mem0 import MemoryClient; print(inspect.signature(MemoryClient.search))"`
for each method you'll touch, and read the installed source under `site-packages/mem0/client/main.py` if anything is ambiguous (e.g. whether a method *rejects* top-level entity params). Also check the OSS side the project currently uses.
- **TypeScript:** read the installed types/dist under `node_modules/mem0ai/` to confirm option names
(`limit` vs `topK`, `userId` vs a nested `filters`) and the default vs `mem0ai/oss` export.
This verification step is the single most important habit — it's what keeps the plan correct across mem0 versions. Then consult `references/api-mapping.md` for the OSS→hosted translation of each method (Python and TypeScript), and the official guide at https://docs.mem0.ai/migration/oss-v2-to-v3.
Phase 3 — Map each site and flag the gaps
For every call site and config block from Phase 1, determine the hosted equivalent using the mapping. Most calls map cleanly. Some don't — and those matte
Read more
name: mem0-oss-to-platform
description: >-
Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK
(the local `Memory` class) to the mem0 Platform / hosted / managed SDK (the `MemoryClient`
class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off
OSS/self-hosted to the hosted API — e.g. "migrate my mem0 setup to the platform", "switch from
self-hosted mem0 to MemoryClient", "use my mem0 API key instead of a local Qdrant", "move mem0
to the cloud/hosted/managed service", or "replace my local mem0 vector store + embedder config
with the platform". Applies to Python (`from mem0 import Memory` → `from mem0 import MemoryClient`)
and TypeScript/JavaScript (`import { Memory } from "mem0ai/oss"` → `import MemoryClient from "mem0ai"`).
Trigger even when the user doesn't say the word "migrate" but clearly wants their existing mem0
integration to run against the hosted platform. It first produces a reviewable migration plan,
then executes it after the developer approves. Strictly scoped to the mem0 integration — it does
not refactor, restructure, or "improve" any unrelated code.Migrate mem0 OSS → mem0 Platform (hosted)
This skill migrates a project's memory layer from the **self-hosted mem0 OSS SDK** to the **hosted mem0 Platform SDK**, working for any project shape — an agent, a RAG pipeline, an API service, a chatbot, a background worker. You discover where mem0 is actually used, write a plan the developer reviews, and then execute it on approval.
The mental model (read this first — it's why the migration is shaped the way it is)
OSS mem0 means **the developer runs the whole memory stack themselves**: a vector store (Qdrant/pgvector/Chroma/…), an embedder, an LLM for fact extraction, and a local history DB. All of that is wired up in a config object passed to `Memory`.
The Platform means **mem0 runs that stack for them**. The developer just holds an **API key**. So the migration is mostly *subtraction*: the local infrastructure config collapses into a single `MemoryClient(api_key=...)`. The method calls stay recognizable (`add`/`search`/`get_all`/…), but a few parameter conventions tighten up and the return values are server responses.
So the core of every migration is: 1. `Memory` / `Memory.from_config({...})` → `MemoryClient()` (reads the API key from the env). 2. Delete the local `vector_store` / `llm` / `embedder` / `graph_store` / `history_db_path` config. 3. Fix up each call site to the hosted call convention (entity IDs into `filters`, pagination, etc.). 4. Flag everything that *isn't* a clean 1:1 so the developer can decide (see `references/gotchas.md`).
**Scope discipline:** touch only mem0-related code, config, dependencies, and env. Preserve the project's existing behavior, structure, and style. Do not rename things, "tidy" nearby code, or change the app's logic. The developer asked to swap a backend, not to refactor their project.
Workflow
Work through these phases in order. Phases 1–4 produce the plan; phase 5 runs only after approval.
Phase 0 — Prerequisite check
The hosted SDK needs a mem0 API key (`MEM0_API_KEY`, obtainable at https://app.mem0.ai). Confirm the developer has one. You don't need the key value to write the plan, but flag in the plan that it must be set (in `.env` / secrets manager, never hardcoded) before execution and verification.
Phase 1 — Discover the mem0 footprint
Do not assume the layout. Find every place mem0 appears. Detect the language and the **installed** version first, then sweep for usage. Concretely, search for:
- **Imports / instantiation:** `from mem0 import Memory`, `Memory.from_config`, `Memory(`,
`import ... from "mem0ai"`, `from "mem0ai/oss"`, `new Memory(`.
- **Config blocks:** keys like `vector_store`/`vectorStore`, `embedder`, `llm`, `graph_store`/
`graphStore`, `history_db_path`, `historyStore`, `custom_fact_extraction_prompt`, `custom_update_memory_prompt`, `enable_graph`.
- **Every call site:** `.add(`, `.search(`, `.get_all(`/`.getAll(`, `.delete_all(`/`.deleteAll(`,
`.get(`, `.update(`, `.delete(`, `.reset(`, `.history(`.
- **Dependencies & env:** `requirements.txt`/`pyproject.toml`/`package.json` for `mem0ai` and any
local-infra deps that exist *only* for mem0 (e.g. `qdrant-client`, `chromadb`); `.env`/config for things like `OPENAI_API_KEY` used by the local embedder/LLM; any docker-compose service (e.g. a Qdrant container) that exists only to back mem0.
Use Grep/Glob broadly; a single missed call site is a runtime break later. Record `file:line` for each finding — the plan's inventory is built from this.
Phase 2 — Verify the API against the installed SDK (don't guess)
Versions drift, and the OSS and hosted classes have subtly different signatures. Before mapping, confirm the **real** signatures of the installed package rather than trusting memory:
- **Python:** `python -c "import inspect; from mem0 import MemoryClient; print(inspect.signature(MemoryClient.search))"`
for each method you'll touch, and read the installed source under `site-packages/mem0/client/main.py` if anything is ambiguous (e.g. whether a method *rejects* top-level entity params). Also check the OSS side the project currently uses.
- **TypeScript:** read the installed types/dist under `node_modules/mem0ai/` to confirm option names
(`limit` vs `topK`, `userId` vs a nested `filters`) and the default vs `mem0ai/oss` export.
This verification step is the single most important habit — it's what keeps the plan correct across mem0 versions. Then consult `references/api-mapping.md` for the OSS→hosted translation of each method (Python and TypeScript), and the official guide at https://docs.mem0.ai/migration/oss-v2-to-v3.
Phase 3 — Map each site and flag the gaps
For every call site and config block from Phase 1, determine the hosted equivalent using the mapping. Most calls map cleanly. Some don't — and those matte
Mem0 ("mem-zero") enhances AI assistants and agents with an intelligent memory layer, enabling personalized AI interactions.
Repo: mem0ai/mem0
Other skills on mem0.
- /context-loader
Searches and injects relevant memories into context before starting work on a task. Use when beginning a new task, switching context, or when project history, past decisions, or coding conventions need to be loaded.
Open skill - /dream
Consolidates stored memories by merging duplicates, resolving contradictions, and pruning stale entries. Use when memory count is high, search results feel noisy or repetitive, or periodic cleanup is needed to maintain memory quality.
Open skill - /export
Exports all project memories to a portable Markdown file for backup or migration. Use when backing up memories, migrating to another project, sharing memory state with teammates, or archiving before cleanup.
Open skill - /forget
Deletes memories by search query or memory ID with confirmation before removal. Use when removing outdated decisions, incorrect memories, sensitive data, or cleaning up after experiments. Also handles undo of recent additions.
Open skill - /health
Diagnoses mem0 connectivity, API key validity, and memory read/write functionality. Use when memory operations fail, searches return empty, add_memory errors occur, MCP connection drops, or to verify the plugin is working correctly.
Open skill - /import
Imports memories from an exported Markdown file or MEMORY.md into the current project. Use when migrating from another project, restoring from backup, importing Claude Code native MEMORY.md content, or setting up a new project with existing knowledge.
Open skill

