mem0
Route Mem0 repository tasks across Python/TypeScript SDKs, OSS provider configuration, CLI workflows, self-hosted/OpenMemory deployment, and framework/editor integrations.
SKILL.md08-移动开发/mem0/SKILL.md
GitHubMem0 Repo Skill
Use this repo skill when a task mentions Mem0, mem0ai, MemoryClient, Memory, the Mem0 memory layer, hosted Platform memory, OSS memory, Mem0 CLI, self-hosted Mem0, OpenMemory, Vercel AI SDK memory, MCP/plugin setup, or Mem0 framework integrations.
This is a router for repository-specific Mem0 knowledge. Pick the nearest sub-skill first, then read the linked references or run bundled read-only helpers.
Quick Route
| User task | Read |
|---|---|
| Add/search/update/delete memories from Python or TypeScript code | sub-skills/sdk-memory/SKILL.md |
Use hosted Platform MemoryClient, OSS Memory, async clients, filters, metadata, categories, feedback, or exports |
sub-skills/sdk-memory/SKILL.md |
| Configure OSS LLMs, embedders, vector stores, rerankers, Qdrant dimensions, BM25/entity retrieval, graph behavior, or optional extras | sub-skills/provider-configuration/SKILL.md |
Run mem0 init, mem0 add, mem0 search, agent JSON mode, stdin/files, config defaults, import/export, entities, or events from a terminal |
sub-skills/cli-memory/SKILL.md |
| Deploy or debug self-hosted Mem0 server, dashboard auth, API keys, request logs, Docker Compose, REST API, migrations, or OpenMemory MCP | sub-skills/self-hosted-openmemory/SKILL.md |
| Wire Mem0 into Vercel AI SDK, Claude/Cursor/Codex/OpenCode/Antigravity, OpenClaw, Pi Agent, LangChain, LangGraph, LlamaIndex, CrewAI, or other frameworks | sub-skills/integrations-plugins/SKILL.md |
First Checks
- Identify the surface: hosted Platform SDK, local OSS memory, CLI, self-hosted service, OpenMemory, plugin/MCP, or framework adapter.
- Confirm runtime requirements: Python 3.10+ for Python packages, Node 18+ for TypeScript/CLI/integration packages, API keys only when live hosted/provider calls are intended.
- Keep entity scope explicit. Stable
user_id,agent_id,run_id, or app/project scope prevents cross-user memory leakage and empty searches. - Prefer read-only bundled helpers before live writes. The scripts in this skill inspect imports, configs, specs, or source snippets and redact secrets by default.
- Confirm destructive operations before deletes, resets, volume wipes, hook rewrites, password resets, or request-log pruning.
Package Facts
- Python SDK distribution:
mem0aiversion2.0.7, import rootmem0, Python>=3.10,<4.0. - TypeScript SDK package:
mem0aiversion3.0.9, exports hosted client andmem0ai/oss, Node>=18. - Python CLI package:
mem0-cliversion0.2.8, entry pointmem0, Python>=3.10. - Node CLI package:
@mem0/cliversion0.2.9, binarymem0, Node>=18. - Vercel provider package:
@mem0/vercel-ai-providerversion3.0.0, Node>=18. - Integration packages include
@mem0/openclaw-mem0and@mem0/pi-agent-pluginfor agent/editor workflows.
Core Concepts
- Hosted Platform clients call the Mem0 API and require a Mem0 API key.
- OSS
Memoryobjects run in-process and require LLM/embedder/vector store configuration; default examples use OpenAI plus local Qdrant or in-memory/SQLite pieces depending on language. - Search/get-all entity scoping uses filters in current SDK examples; add/delete-all may accept top-level entity options depending on SDK surface.
- CLI and plugin workflows are operational surfaces. They often manage config files or hooks, so inspect existing config before adding duplicate entries.
- Self-hosted server/OpenMemory workflows are service deployments. Treat auth, secrets, database volumes, backups, and request logs as production operations.
Shared References and Scripts
references/overview.mdgives the repository capability map and package boundaries.references/troubleshooting.mdcovers cross-cutting install, API key, version, scoping, and routing failures.references/repo-provenance.mdrecords the source commit, package versions, and evidence paths for refresh checks.scripts/mem0_environment_check.py --helpperforms safe Python package/import and environment checks with secret redaction.
Safety Rules
- Never print or hardcode
MEM0_API_KEY, provider keys, self-hosted API keys,JWT_SECRET, admin passwords, MCP bearer tokens, or personal memory contents. - Do not run original repository tests, examples, notebooks, or scripts as runtime instructions from this skill. They were used as evidence only.
- Do not depend on the original repository checkout. Use the bundled references and scripts in this skill tree.
- Ask before mutating user/editor config, starting long-running services, making network writes, deleting memories, or wiping volumes.