|
@@ -8,8 +8,8 @@ OpenClaw plugin that exposes the mem0 HTTP API as tools for conversational memor
|
|
|
|
|
|
|
|
## Install (local dev)
|
|
## Install (local dev)
|
|
|
```bash
|
|
```bash
|
|
|
-# link plugin into OpenClaw extensions
|
|
|
|
|
-openclaw plugins install -l /home/lucky/.openclaw/extensions/openclaw-mem0-python
|
|
|
|
|
|
|
+# link plugin into OpenClaw extensions (use workspace repo as source)
|
|
|
|
|
+openclaw plugins install -l /home/lucky/.openclaw/workspace/openclaw-mem0-python
|
|
|
|
|
|
|
|
# enable if not already
|
|
# enable if not already
|
|
|
openclaw plugins enable openclaw-mem0-python
|
|
openclaw plugins enable openclaw-mem0-python
|
|
@@ -37,12 +37,24 @@ Knowledge tools:
|
|
|
- `searchKnowledge({ query, userId?, limit? })`
|
|
- `searchKnowledge({ query, userId?, limit? })`
|
|
|
- `writeKnowledge({ text, userId? })`
|
|
- `writeKnowledge({ text, userId? })`
|
|
|
|
|
|
|
|
|
|
+## Skill (Knowledge RAG Policy)
|
|
|
|
|
+This repo bundles a policy skill that tells the LLM when to use knowledge tools:
|
|
|
|
|
+- Skill source: `skills/knowledge-rag-policy/SKILL.md`
|
|
|
|
|
+- Packaged file: `dist/knowledge-rag-policy.skill`
|
|
|
|
|
+
|
|
|
|
|
+Install the skill (optional):
|
|
|
|
|
+```bash
|
|
|
|
|
+python3 /usr/lib/node_modules/openclaw/skills/skill-creator/scripts/package_skill.py \
|
|
|
|
|
+ /home/lucky/.openclaw/workspace/openclaw-mem0-python/skills/knowledge-rag-policy \
|
|
|
|
|
+ /home/lucky/.openclaw/workspace/openclaw-mem0-python/dist
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
## Test (local)
|
|
## Test (local)
|
|
|
```bash
|
|
```bash
|
|
|
-node /home/lucky/.openclaw/extensions/openclaw-mem0-python/test_memories.mjs
|
|
|
|
|
|
|
+node /home/lucky/.openclaw/workspace/openclaw-mem0-python/test_memories.mjs
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-This test writes/reads conversational memory, then lists knowledge sources and (if present) describes & searches the first book.
|
|
|
|
|
|
|
+This test writes/reads conversational memory, lists knowledge sources, describes the first book, searches it, then cleans up test memories.
|
|
|
|
|
|
|
|
## Notes
|
|
## Notes
|
|
|
- `describeKnowledgeBook` uses `/knowledge/search` plus metadata filtering (`metadata.source_file`) to safely scope results to one book.
|
|
- `describeKnowledgeBook` uses `/knowledge/search` plus metadata filtering (`metadata.source_file`) to safely scope results to one book.
|