|
|
1 tháng trước cách đây | |
|---|---|---|
| node_modules | 1 tháng trước cách đây | |
| .gitignore | 1 tháng trước cách đây | |
| PROJECT.md | 1 tháng trước cách đây | |
| README.md | 1 tháng trước cách đây | |
| index.js | 1 tháng trước cách đây | |
| index.ts | 1 tháng trước cách đây | |
| openclaw.plugin.json | 1 tháng trước cách đây | |
| package-lock.json | 1 tháng trước cách đây | |
| package.json | 1 tháng trước cách đây | |
| test_memories.mjs | 1 tháng trước cách đây | |
| tsconfig.json | 1 tháng trước cách đây |
OpenClaw plugin that exposes the mem0 HTTP API as tools for conversational memory and a tool-driven knowledge base (RAG). Conversational memory can be injected by the hook; knowledge retrieval stays explicit via tool calls.
# link plugin into OpenClaw extensions
openclaw plugins install -l /home/lucky/.openclaw/extensions/openclaw-mem0-python
# enable if not already
openclaw plugins enable openclaw-mem0-python
# reload gateway
openclaw gateway restart
You can set defaults via environment or config:
MEM0_BASE_URL (default: http://192.168.0.200:8420)MEM0_KNOWLEDGE_USER_ID (default: knowledge_base)write({ text, userId? })search({ query, userId?, limit? })read({ userId?, limit? })Knowledge tools:
listKnowledgeSources({ userId? })describeKnowledgeBook({ sourceFile, userId? })searchKnowledgeBook({ query, sourceFile, userId?, limit? })searchKnowledgeBooks({ query, sourceFiles, userId?, limit? })searchKnowledge({ query, userId?, limit? })writeKnowledge({ text, userId? })node /home/lucky/.openclaw/extensions/openclaw-mem0-python/test_memories.mjs
This test writes/reads conversational memory, then lists knowledge sources and (if present) describes & searches the first book.
describeKnowledgeBook uses /knowledge/search plus metadata filtering (metadata.source_file) to safely scope results to one book.hintQuery derived from source_file (same approach as the dashboard).