mem0
Route Mem0 repository tasks across Python/TypeScript SDKs, OSS provider configuration, CLI workflows, self-hosted/OpenMemory deployment, and framework/editor integrations.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- mem0
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route Mem0 repository tasks across Python/TypeScript SDKs, OSS provider configuration, CLI workflows, self-hosted/OpenMemory deployment, and framework/editor integrations.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/overview.md3.0 KB
- 参考文档references/repo-provenance.md2.1 KB
- 参考文档references/repo-routing-metadata.json402 B
- 参考文档references/troubleshooting.md3.1 KB
- 脚本scripts/mem0_environment_check.py2.7 KB
03 SKILL.md 正文
Mem0 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.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).