@memclaw/memclaw 0.9.16 → 0.9.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -36
- package/dist/index.js +1 -1
- package/dist/plugin-impl.d.ts +4 -1
- package/dist/plugin-impl.d.ts.map +1 -1
- package/dist/plugin-impl.js +396 -77
- package/dist/plugin-impl.js.map +1 -1
- package/dist/src/client.d.ts +85 -42
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +138 -80
- package/dist/src/client.js.map +1 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +1 -0
- package/dist/src/config.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/memclaw/SKILL.md +186 -68
- package/skills/memclaw/references/best-practices.md +195 -272
- package/skills/memclaw/references/memory-structure.md +160 -0
- package/skills/memclaw/references/security.md +31 -0
- package/skills/memclaw/references/tools.md +243 -122
- package/skills/memclaw-maintance/SKILL.md +73 -36
- package/skills/memclaw-maintance/references/tools.md +10 -148
- package/skills/lagacy/SKILL.md +0 -239
- package/skills/lagacy/references/maintenance.md +0 -110
- package/skills/lagacy/references/setup.md +0 -283
- package/skills/lagacy/references/tools.md +0 -170
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security & Trust
|
|
2
|
+
|
|
3
|
+
MemClaw is designed with user privacy and data security as top priorities.
|
|
4
|
+
|
|
5
|
+
## What the Plugin Does
|
|
6
|
+
|
|
7
|
+
- **Local Data Storage**: All memory data is stored in the local user data directory
|
|
8
|
+
- **Local Processing**: Based on advanced Cortex Memory technology, providing outstanding memory management capabilities with high performance and accuracy
|
|
9
|
+
- **Migration Safety**: Only reads existing OpenClaw memory files during migration
|
|
10
|
+
|
|
11
|
+
## What the Plugin Does NOT Do
|
|
12
|
+
|
|
13
|
+
- **No External Data Transmission**: Does NOT send data to external servers (all processing is local)
|
|
14
|
+
- **No API Key Leakage**: Does NOT transmit API keys to anywhere other than your configured LLM/embedding provider
|
|
15
|
+
|
|
16
|
+
## Data Storage Location
|
|
17
|
+
|
|
18
|
+
| Platform | Path |
|
|
19
|
+
|----------|------|
|
|
20
|
+
| macOS | `~/Library/Application Support/memclaw` |
|
|
21
|
+
| Windows | `%LOCALAPPDATA%\memclaw` |
|
|
22
|
+
| Linux | `~/.local/share/memclaw` |
|
|
23
|
+
|
|
24
|
+
## API Key Security
|
|
25
|
+
|
|
26
|
+
API keys are configured through OpenClaw plugin settings and are marked as sensitive fields. OpenClaw handles secure storage of these credentials.
|
|
27
|
+
|
|
28
|
+
**Best Practices:**
|
|
29
|
+
- Never share your `openclaw.json` configuration file publicly
|
|
30
|
+
- Use environment-specific API keys when possible
|
|
31
|
+
- Rotate API keys periodically according to your provider's recommendations
|
|
@@ -1,205 +1,326 @@
|
|
|
1
|
-
# Tools Reference
|
|
1
|
+
# MemClaw Tools Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Complete reference for all MemClaw tools.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Search Tools
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### cortex_search
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Layered semantic search with L0/L1/L2 tiered retrieval.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|-----------|------|----------|---------|-------------|
|
|
13
|
-
| `query` | string | Yes | - | Search query — natural language or keywords |
|
|
14
|
-
| `scope` | string | No | - | Session/thread ID to limit search scope |
|
|
15
|
-
| `limit` | integer | No | 10 | Maximum number of results |
|
|
16
|
-
| `min_score` | number | No | 0.6 | Minimum relevance score (0-1) |
|
|
11
|
+
**Parameters:**
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- Search
|
|
21
|
-
-
|
|
13
|
+
| Name | Type | Required | Default | Description |
|
|
14
|
+
|------|------|----------|---------|-------------|
|
|
15
|
+
| query | string | Yes | - | Search query (natural language or keywords) |
|
|
16
|
+
| scope | string | No | - | Session/thread ID to limit search scope |
|
|
17
|
+
| limit | integer | No | 10 | Maximum number of results |
|
|
18
|
+
| min_score | number | No | 0.6 | Minimum relevance score (0-1) |
|
|
19
|
+
| return_layers | ("L0" \| "L1" \| "L2")[] | No | ["L0"] | Which layers to return |
|
|
22
20
|
|
|
23
|
-
**
|
|
21
|
+
**Response:**
|
|
24
22
|
```json
|
|
25
23
|
{
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
"results": [
|
|
25
|
+
{
|
|
26
|
+
"uri": "cortex://session/abc123/timeline/...",
|
|
27
|
+
"score": 0.85,
|
|
28
|
+
"snippet": "L0 abstract text...",
|
|
29
|
+
"overview": "L1 overview text (if requested)...",
|
|
30
|
+
"content": "L2 full content (if requested)...",
|
|
31
|
+
"layers": ["L0", "L1"],
|
|
32
|
+
"source": "layered_vector"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"total": 5
|
|
29
36
|
}
|
|
30
37
|
```
|
|
31
38
|
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
**Example:**
|
|
40
|
+
```typescript
|
|
41
|
+
// Minimal tokens - just abstracts
|
|
42
|
+
cortex_search({ query: "API design", return_layers: ["L0"] })
|
|
43
|
+
|
|
44
|
+
// More context needed
|
|
45
|
+
cortex_search({ query: "authentication flow", return_layers: ["L0", "L1"] })
|
|
46
|
+
|
|
47
|
+
// Full content retrieval
|
|
48
|
+
cortex_search({ query: "exact error message", return_layers: ["L0", "L1", "L2"] })
|
|
49
|
+
```
|
|
35
50
|
|
|
36
51
|
---
|
|
37
52
|
|
|
38
|
-
|
|
53
|
+
### cortex_recall
|
|
39
54
|
|
|
40
|
-
|
|
55
|
+
Convenience wrapper returning L0 + L2 content.
|
|
41
56
|
|
|
42
57
|
**Parameters:**
|
|
43
58
|
|
|
44
|
-
|
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
59
|
+
| Name | Type | Required | Default | Description |
|
|
60
|
+
|------|------|----------|---------|-------------|
|
|
61
|
+
| query | string | Yes | - | Search query |
|
|
62
|
+
| scope | string | No | - | Session/thread ID to limit scope |
|
|
63
|
+
| limit | integer | No | 10 | Maximum number of results |
|
|
49
64
|
|
|
50
|
-
**
|
|
51
|
-
- Need memories with full context, not just summaries
|
|
52
|
-
- Want to see original content
|
|
53
|
-
- Performing detailed memory analysis
|
|
65
|
+
**Response:** Same as `cortex_search` with `return_layers: ["L0", "L2"]`
|
|
54
66
|
|
|
55
|
-
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Filesystem Tools
|
|
70
|
+
|
|
71
|
+
### cortex_ls
|
|
72
|
+
|
|
73
|
+
List directory contents to browse memory structure.
|
|
74
|
+
|
|
75
|
+
**Parameters:**
|
|
76
|
+
|
|
77
|
+
| Name | Type | Required | Default | Description |
|
|
78
|
+
|------|------|----------|---------|-------------|
|
|
79
|
+
| uri | string | No | "cortex://session" | Directory URI to list |
|
|
80
|
+
| recursive | boolean | No | false | Recursively list subdirectories |
|
|
81
|
+
| include_abstracts | boolean | No | false | Include L0 abstracts for files |
|
|
82
|
+
|
|
83
|
+
**Response:**
|
|
56
84
|
```json
|
|
57
85
|
{
|
|
58
|
-
"
|
|
59
|
-
"
|
|
86
|
+
"uri": "cortex://session",
|
|
87
|
+
"total": 3,
|
|
88
|
+
"entries": [
|
|
89
|
+
{
|
|
90
|
+
"uri": "cortex://session/abc123",
|
|
91
|
+
"name": "abc123",
|
|
92
|
+
"is_directory": true,
|
|
93
|
+
"size": 0,
|
|
94
|
+
"modified": "2024-01-15T10:30:00Z"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"uri": "cortex://session/xyz789",
|
|
98
|
+
"name": "xyz789",
|
|
99
|
+
"is_directory": true,
|
|
100
|
+
"size": 0,
|
|
101
|
+
"modified": "2024-01-14T15:00:00Z",
|
|
102
|
+
"abstract_text": "Discussion about API design..."
|
|
103
|
+
}
|
|
104
|
+
]
|
|
60
105
|
}
|
|
61
106
|
```
|
|
62
107
|
|
|
63
|
-
**
|
|
64
|
-
|
|
65
|
-
|
|
108
|
+
**Example:**
|
|
109
|
+
```typescript
|
|
110
|
+
// List all sessions
|
|
111
|
+
cortex_ls({ uri: "cortex://session" })
|
|
112
|
+
|
|
113
|
+
// Browse with abstracts
|
|
114
|
+
cortex_ls({
|
|
115
|
+
uri: "cortex://session/abc123/timeline",
|
|
116
|
+
include_abstracts: true
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
// Recursive listing
|
|
120
|
+
cortex_ls({
|
|
121
|
+
uri: "cortex://session/abc123",
|
|
122
|
+
recursive: true
|
|
123
|
+
})
|
|
124
|
+
```
|
|
66
125
|
|
|
67
126
|
---
|
|
68
127
|
|
|
69
|
-
|
|
128
|
+
### cortex_explore
|
|
70
129
|
|
|
71
|
-
|
|
130
|
+
Smart exploration combining search and browsing.
|
|
72
131
|
|
|
73
132
|
**Parameters:**
|
|
74
133
|
|
|
75
|
-
|
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
81
|
-
**Use Cases:**
|
|
82
|
-
- Persist important information for later retrieval
|
|
83
|
-
- Store user preferences or decisions
|
|
84
|
-
- Save context that should be searchable
|
|
134
|
+
| Name | Type | Required | Default | Description |
|
|
135
|
+
|------|------|----------|---------|-------------|
|
|
136
|
+
| query | string | Yes | - | Exploration query |
|
|
137
|
+
| start_uri | string | No | "cortex://session" | Starting URI |
|
|
138
|
+
| return_layers | ("L0" \| "L1" \| "L2")[] | No | ["L0"] | Layers to return in matches |
|
|
85
139
|
|
|
86
|
-
**
|
|
140
|
+
**Response:**
|
|
87
141
|
```json
|
|
88
142
|
{
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
143
|
+
"query": "authentication",
|
|
144
|
+
"exploration_path": [
|
|
145
|
+
{
|
|
146
|
+
"uri": "cortex://session/abc123/timeline",
|
|
147
|
+
"relevance_score": 0.92,
|
|
148
|
+
"abstract_text": "Discussion about OAuth..."
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"matches": [
|
|
152
|
+
{
|
|
153
|
+
"uri": "cortex://session/abc123/timeline/...",
|
|
154
|
+
"score": 0.88,
|
|
155
|
+
"snippet": "OAuth implementation...",
|
|
156
|
+
"layers": ["L0"]
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"total_explored": 5,
|
|
160
|
+
"total_matches": 2
|
|
92
161
|
}
|
|
93
162
|
```
|
|
94
163
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Tiered Access Tools
|
|
167
|
+
|
|
168
|
+
### cortex_get_abstract (L0)
|
|
169
|
+
|
|
170
|
+
Get ~100 token summary for quick relevance check.
|
|
171
|
+
|
|
172
|
+
**Parameters:**
|
|
173
|
+
|
|
174
|
+
| Name | Type | Required | Description |
|
|
175
|
+
|------|------|----------|-------------|
|
|
176
|
+
| uri | string | Yes | Content URI |
|
|
177
|
+
|
|
178
|
+
**Response:**
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"uri": "cortex://session/abc123/timeline/...",
|
|
182
|
+
"content": "Short abstract...",
|
|
183
|
+
"layer": "L0",
|
|
184
|
+
"token_count": 95
|
|
185
|
+
}
|
|
186
|
+
```
|
|
99
187
|
|
|
100
188
|
---
|
|
101
189
|
|
|
102
|
-
|
|
190
|
+
### cortex_get_overview (L1)
|
|
103
191
|
|
|
104
|
-
|
|
192
|
+
Get ~2000 token overview with key information.
|
|
105
193
|
|
|
106
|
-
**Parameters:**
|
|
194
|
+
**Parameters:**
|
|
107
195
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- Audit memory usage
|
|
196
|
+
| Name | Type | Required | Description |
|
|
197
|
+
|------|------|----------|-------------|
|
|
198
|
+
| uri | string | Yes | Content URI |
|
|
112
199
|
|
|
113
|
-
**Response
|
|
114
|
-
|
|
115
|
-
|
|
200
|
+
**Response:**
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"uri": "cortex://session/abc123/timeline/...",
|
|
204
|
+
"content": "Detailed overview...",
|
|
205
|
+
"layer": "L1",
|
|
206
|
+
"token_count": 1850
|
|
207
|
+
}
|
|
208
|
+
```
|
|
116
209
|
|
|
117
210
|
---
|
|
118
211
|
|
|
119
|
-
|
|
212
|
+
### cortex_get_content (L2)
|
|
120
213
|
|
|
121
|
-
|
|
214
|
+
Get full original content.
|
|
122
215
|
|
|
123
216
|
**Parameters:**
|
|
124
217
|
|
|
125
|
-
|
|
|
126
|
-
|
|
127
|
-
|
|
|
218
|
+
| Name | Type | Required | Description |
|
|
219
|
+
|------|------|----------|-------------|
|
|
220
|
+
| uri | string | Yes | Content URI (file only) |
|
|
128
221
|
|
|
129
|
-
**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
222
|
+
**Response:**
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"uri": "cortex://session/abc123/timeline/...",
|
|
226
|
+
"content": "Full original content...",
|
|
227
|
+
"layer": "L2",
|
|
228
|
+
"token_count": 5420
|
|
229
|
+
}
|
|
230
|
+
```
|
|
133
231
|
|
|
134
|
-
|
|
135
|
-
1. Extracts structured memories (user preferences, entities, decisions)
|
|
136
|
-
2. Generates complete L0/L1 layer summaries
|
|
137
|
-
3. Indexes all extracted memories into the vector database
|
|
232
|
+
---
|
|
138
233
|
|
|
139
|
-
|
|
234
|
+
## Storage Tools
|
|
140
235
|
|
|
141
|
-
|
|
236
|
+
### cortex_add_memory
|
|
237
|
+
|
|
238
|
+
Store a message in memory.
|
|
239
|
+
|
|
240
|
+
**Parameters:**
|
|
241
|
+
|
|
242
|
+
| Name | Type | Required | Default | Description |
|
|
243
|
+
|------|------|----------|---------|-------------|
|
|
244
|
+
| content | string | Yes | - | Message content |
|
|
245
|
+
| role | string | No | "user" | Message role: "user", "assistant", "system" |
|
|
246
|
+
| session_id | string | No | default | Session/thread ID |
|
|
247
|
+
| metadata | object | No | - | Optional metadata (tags, importance, etc.) |
|
|
248
|
+
|
|
249
|
+
**Response:**
|
|
142
250
|
```json
|
|
143
251
|
{
|
|
144
|
-
"
|
|
252
|
+
"success": true,
|
|
253
|
+
"message_uri": "cortex://session/default/timeline/2024-01/15/10_30_00_abc123.md"
|
|
145
254
|
}
|
|
146
255
|
```
|
|
147
256
|
|
|
148
|
-
|
|
257
|
+
**Example:**
|
|
258
|
+
```typescript
|
|
259
|
+
cortex_add_memory({
|
|
260
|
+
content: "User prefers dark mode in all applications",
|
|
261
|
+
role: "assistant",
|
|
262
|
+
metadata: {
|
|
263
|
+
tags: ["preference", "ui"],
|
|
264
|
+
importance: "medium"
|
|
265
|
+
}
|
|
266
|
+
})
|
|
267
|
+
```
|
|
149
268
|
|
|
150
269
|
---
|
|
151
270
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Migrate from OpenClaw's native memory system to MemClaw.
|
|
271
|
+
### cortex_close_session
|
|
155
272
|
|
|
156
|
-
|
|
273
|
+
Trigger memory extraction pipeline.
|
|
157
274
|
|
|
158
|
-
**
|
|
159
|
-
- First-time use with existing OpenClaw memories
|
|
160
|
-
- Want to preserve previous conversation history
|
|
161
|
-
- Switching from built-in memory to MemClaw
|
|
275
|
+
**Parameters:**
|
|
162
276
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
3. Generates L0/L1 layers and vector indices
|
|
277
|
+
| Name | Type | Required | Description |
|
|
278
|
+
|------|------|----------|-------------|
|
|
279
|
+
| session_id | string | No | Session/thread ID (uses default if not specified) |
|
|
167
280
|
|
|
168
|
-
**
|
|
169
|
-
|
|
170
|
-
|
|
281
|
+
**Response:**
|
|
282
|
+
```json
|
|
283
|
+
{
|
|
284
|
+
"success": true,
|
|
285
|
+
"session": {
|
|
286
|
+
"thread_id": "abc123",
|
|
287
|
+
"status": "closed",
|
|
288
|
+
"message_count": 42
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
```
|
|
171
292
|
|
|
172
|
-
**
|
|
293
|
+
**Important:** Call this periodically, not just at conversation end.
|
|
173
294
|
|
|
174
295
|
---
|
|
175
296
|
|
|
176
|
-
##
|
|
297
|
+
## Maintenance Tools
|
|
177
298
|
|
|
178
|
-
|
|
299
|
+
### cortex_maintenance
|
|
300
|
+
|
|
301
|
+
Perform periodic maintenance.
|
|
179
302
|
|
|
180
303
|
**Parameters:**
|
|
181
304
|
|
|
182
|
-
|
|
|
183
|
-
|
|
184
|
-
|
|
|
185
|
-
|
|
|
305
|
+
| Name | Type | Required | Default | Description |
|
|
306
|
+
|------|------|----------|---------|-------------|
|
|
307
|
+
| dryRun | boolean | No | false | Preview changes without executing |
|
|
308
|
+
| commands | string[] | No | ["prune", "reindex", "ensure-all"] | Commands to run |
|
|
309
|
+
|
|
310
|
+
---
|
|
186
311
|
|
|
187
|
-
|
|
188
|
-
- Search results are incomplete or outdated
|
|
189
|
-
- Recovering from crash or data corruption
|
|
190
|
-
- Need to clean up disk space
|
|
312
|
+
### cortex_migrate
|
|
191
313
|
|
|
192
|
-
|
|
193
|
-
- `prune` — Remove vectors whose source files no longer exist
|
|
194
|
-
- `reindex` — Rebuild vector indices and remove stale entries
|
|
195
|
-
- `ensure-all` — Generate missing L0/L1 layer files
|
|
314
|
+
Migrate from OpenClaw native memory.
|
|
196
315
|
|
|
197
|
-
**
|
|
316
|
+
**Parameters:** None
|
|
317
|
+
|
|
318
|
+
**Response:**
|
|
198
319
|
```json
|
|
199
320
|
{
|
|
200
|
-
"
|
|
201
|
-
"
|
|
321
|
+
"dailyLogsMigrated": 15,
|
|
322
|
+
"memoryMdMigrated": true,
|
|
323
|
+
"sessionsCreated": ["migrated_2024-01-15"],
|
|
324
|
+
"errors": []
|
|
202
325
|
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
> **Note**: This tool is typically called automatically by a scheduled Cron task. Manual invocation is for troubleshooting or on-demand maintenance.
|
|
326
|
+
```
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: memclaw-maintance
|
|
3
|
-
description: MemClaw
|
|
3
|
+
description: MemClaw Maintenance Guide — Installation, configuration, and maintenance guidance. For daily usage and tool operations, use the [`memclaw` skill](https://clawhub.ai/sopaco/memclaw) instead.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# MemClaw
|
|
6
|
+
# MemClaw Maintenance Guide
|
|
7
7
|
|
|
8
|
-
> **
|
|
8
|
+
> **Recommended Memory Solution**: MemClaw is the recommended memory system for OpenClaw, providing tiered semantic memory with three-layer retrieval capabilities and automatic service management.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## Important: Skill Usage Guide
|
|
11
|
+
|
|
12
|
+
| Purpose | Use This Skill |
|
|
13
|
+
|---------|---------------|
|
|
14
|
+
| **Daily usage** — searching, browsing, storing memories | [`memclaw`](https://clawhub.ai/sopaco/memclaw) |
|
|
15
|
+
| **Installation & Setup** | `memclaw-maintance` (this skill) |
|
|
16
|
+
| **Configuration** | `memclaw-maintance` (this skill) |
|
|
17
|
+
| **Troubleshooting & Maintenance** | `memclaw-maintance` (this skill) |
|
|
18
|
+
|
|
19
|
+
> **For memory operations like `cortex_search`, `cortex_ls`, `cortex_add_memory`, etc., please use the [`memclaw` skill](https://clawhub.ai/sopaco/memclaw) which provides comprehensive usage documentation.**
|
|
20
|
+
|
|
21
|
+
---
|
|
11
22
|
|
|
12
23
|
## Security & Trust
|
|
13
24
|
|
|
@@ -21,23 +32,11 @@ A tiered semantic memory system with three-tier retrieval capabilities and autom
|
|
|
21
32
|
- Does NOT send data to external servers (all processing is local)
|
|
22
33
|
- Does NOT transmit API keys to anywhere other than your configured LLM/embedding provider
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
MemClaw provides **three-tier semantic memory** with hierarchical retrieval:
|
|
27
|
-
|
|
28
|
-
| Tier | Token Count | Content | Search Purpose |
|
|
29
|
-
|------|-------------|---------|----------------|
|
|
30
|
-
| **L0 (Summary)** | ~100 | High-level summary | Quick filtering |
|
|
31
|
-
| **L1 (Overview)** | ~2000 | Key points + context | Context refinement |
|
|
32
|
-
| **L2 (Full)** | Complete | Original content | Exact matching |
|
|
33
|
-
|
|
34
|
-
The search engine queries all three tiers internally and returns unified results containing `snippet` and `content`.
|
|
35
|
-
|
|
36
|
-
## Installation Steps
|
|
35
|
+
---
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
## Installation
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
### Step 1: Install the Plugin
|
|
41
40
|
|
|
42
41
|
```bash
|
|
43
42
|
openclaw plugins install @memclaw/memclaw
|
|
@@ -61,7 +60,7 @@ Enable MemClaw in `openclaw.json`:
|
|
|
61
60
|
|
|
62
61
|
### Step 3: Configure API Keys
|
|
63
62
|
|
|
64
|
-
**API keys
|
|
63
|
+
**API keys are required to use MemClaw.**
|
|
65
64
|
|
|
66
65
|
1. Open OpenClaw settings (`openclaw.json` or via UI)
|
|
67
66
|
2. Navigate to Plugins → MemClaw → Configuration
|
|
@@ -99,15 +98,24 @@ Enable MemClaw in `openclaw.json`:
|
|
|
99
98
|
|
|
100
99
|
Restart OpenClaw to activate the plugin and start services.
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Verify Installation
|
|
104
|
+
|
|
105
|
+
### Service Status Check
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
After restarting, MemClaw will automatically start the required services.
|
|
105
108
|
|
|
106
|
-
|
|
109
|
+
| Service | Port | Health Check |
|
|
110
|
+
|---------|------|--------------|
|
|
111
|
+
| Qdrant | 6333 (HTTP), 6334 (gRPC) | HTTP GET to `http://localhost:6333` should return Qdrant version info |
|
|
112
|
+
| cortex-mem-service | 8085 | HTTP GET to `http://localhost:8085/health` should return `{"status":"ok"}` |
|
|
113
|
+
|
|
114
|
+
> **Note**: MemClaw does not require users to install any Docker environment. All dependencies are prepared during the plugin installation.
|
|
107
115
|
|
|
108
116
|
### Migrate Existing Memories (Optional)
|
|
109
117
|
|
|
110
|
-
If the user has existing OpenClaw native memories, call
|
|
118
|
+
If the user has existing OpenClaw native memories, call `cortex_migrate` to migrate them:
|
|
111
119
|
|
|
112
120
|
```json
|
|
113
121
|
{}
|
|
@@ -120,23 +128,52 @@ This will:
|
|
|
120
128
|
|
|
121
129
|
> **Run only once** during initial setup.
|
|
122
130
|
|
|
123
|
-
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Maintenance
|
|
124
134
|
|
|
125
|
-
|
|
135
|
+
### Periodic Maintenance
|
|
126
136
|
|
|
127
|
-
|
|
137
|
+
Use `cortex_maintenance` for periodic maintenance:
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"dryRun": false,
|
|
142
|
+
"commands": ["prune", "reindex", "ensure-all"]
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Available Commands:**
|
|
147
|
+
- `prune` — Remove vectors whose source files no longer exist
|
|
148
|
+
- `reindex` — Rebuild vector indices and remove stale entries
|
|
149
|
+
- `ensure-all` — Generate missing L0/L1 layer files
|
|
150
|
+
|
|
151
|
+
> **Note**: This tool is typically called automatically by a scheduled Cron task. Manual invocation is for troubleshooting or on-demand maintenance.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Data Management
|
|
156
|
+
|
|
157
|
+
### Data Location
|
|
158
|
+
|
|
159
|
+
| Platform | Path |
|
|
128
160
|
|----------|------|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
| Complete a task/topic | `cortex_close_session` |
|
|
133
|
-
| First-time use with existing memories | `cortex_migrate` |
|
|
161
|
+
| macOS | `~/Library/Application Support/memclaw` |
|
|
162
|
+
| Windows | `%LOCALAPPDATA%\memclaw` |
|
|
163
|
+
| Linux | `~/.local/share/memclaw` |
|
|
134
164
|
|
|
135
|
-
|
|
165
|
+
### Data Safety
|
|
166
|
+
|
|
167
|
+
- **Backup**: Existing OpenClaw memory files are preserved before migration
|
|
168
|
+
- **Local Storage**: All memory data is stored locally
|
|
169
|
+
- **No Cloud Sync**: Data remains on the local machine
|
|
170
|
+
|
|
171
|
+
---
|
|
136
172
|
|
|
137
173
|
## References
|
|
138
174
|
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
- **
|
|
175
|
+
- **[troubleshooting.md](./references/troubleshooting.md)** — Common issues and solutions
|
|
176
|
+
- **[tools.md](./references/tools.md)** — Maintenance-related tool documentation
|
|
177
|
+
- **`memclaw` skill** — For daily memory operations and usage patterns
|
|
178
|
+
- **Open Source**: [The Project MemClaw](https://github.com/sopaco/cortex-mem)
|
|
142
179
|
- **README**: [MemClaw README](https://raw.githubusercontent.com/sopaco/cortex-mem/refs/heads/main/examples/%40memclaw/plugin/README.md)
|