@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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # MemClaw
2
2
 
3
+ [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
4
+
3
5
  Layered semantic memory plugin for OpenClaw with L0/L1/L2 tiered retrieval, automatic service management, and migration support from OpenClaw native memory.
4
6
 
5
7
  ## Overview
@@ -13,6 +15,7 @@ MemClaw is an OpenClaw plugin that provides advanced semantic memory capabilitie
13
15
  - **Semantic Search**: Vector-based similarity search across all memory layers
14
16
  - **Session Management**: Create, list, and close memory sessions
15
17
  - **Migration Support**: One-click migration from OpenClaw native memory
18
+ - **Easy Configuration**: Configure LLM/Embedding directly through OpenClaw plugin settings
16
19
  - **Cross-Platform**: Supports Windows x64 and macOS Apple Silicon
17
20
 
18
21
  ## Architecture
@@ -53,7 +56,7 @@ OpenClaw + MemClaw Plugin
53
56
  | Requirement | Details |
54
57
  |-------------|---------|
55
58
  | **Platforms** | Windows x64, macOS Apple Silicon |
56
- | **Node.js** | ≥ 22.0.0 |
59
+ | **Node.js** | ≥ 20.0.0 |
57
60
  | **OpenClaw** | Installed and configured |
58
61
 
59
62
  ### Install Plugin
@@ -114,9 +117,11 @@ Then enable in `openclaw.json`:
114
117
 
115
118
  After making code changes, rebuild with `bun run build` and restart OpenClaw.
116
119
 
117
- ### Configure OpenClaw
120
+ ## Configuration
121
+
122
+ ### Plugin Configuration
118
123
 
119
- Edit your `openclaw.json`:
124
+ Configure MemClaw directly through OpenClaw plugin settings in `openclaw.json`:
120
125
 
121
126
  ```json
122
127
  {
@@ -127,7 +132,13 @@ Edit your `openclaw.json`:
127
132
  "config": {
128
133
  "serviceUrl": "http://localhost:8085",
129
134
  "tenantId": "tenant_claw",
130
- "autoStartServices": true
135
+ "autoStartServices": true,
136
+ "llmApiBaseUrl": "https://api.openai.com/v1",
137
+ "llmApiKey": "your-llm-api-key",
138
+ "llmModel": "gpt-4o-mini",
139
+ "embeddingApiBaseUrl": "https://api.openai.com/v1",
140
+ "embeddingApiKey": "your-embedding-api-key",
141
+ "embeddingModel": "text-embedding-3-small"
131
142
  }
132
143
  }
133
144
  }
@@ -142,26 +153,33 @@ Edit your `openclaw.json`:
142
153
 
143
154
  > **Note**: Set `memorySearch.enabled: false` to disable OpenClaw's built-in memory search and use MemClaw instead.
144
155
 
145
- ### Configure LLM
146
-
147
- On first run, MemClaw creates a configuration file:
148
-
149
- | Platform | Path |
150
- |----------|------|
151
- | Windows | `%APPDATA%\memclaw\config.toml` |
152
- | macOS | `~/Library/Application Support/memclaw/config.toml` |
156
+ ### Configuration Options
153
157
 
154
- Edit the configuration file and fill in required fields:
158
+ | Option | Type | Default | Description |
159
+ |--------|------|---------|-------------|
160
+ | `serviceUrl` | string | `http://localhost:8085` | Cortex Memory service URL |
161
+ | `tenantId` | string | `tenant_claw` | Tenant ID for data isolation |
162
+ | `autoStartServices` | boolean | `true` | Auto-start Qdrant and service |
163
+ | `defaultSessionId` | string | `default` | Default session for memory operations |
164
+ | `searchLimit` | number | `10` | Default number of search results |
165
+ | `minScore` | number | `0.6` | Minimum relevance score (0-1) |
166
+ | `qdrantPort` | number | `6334` | Qdrant port (gRPC) |
167
+ | `servicePort` | number | `8085` | cortex-mem-service port |
168
+ | `llmApiBaseUrl` | string | `https://api.openai.com/v1` | LLM API endpoint URL |
169
+ | `llmApiKey` | string | - | LLM API key (required) |
170
+ | `llmModel` | string | `gpt-5-mini` | LLM model name |
171
+ | `embeddingApiBaseUrl` | string | `https://api.openai.com/v1` | Embedding API endpoint URL |
172
+ | `embeddingApiKey` | string | - | Embedding API key (required) |
173
+ | `embeddingModel` | string | `text-embedding-3-small` | Embedding model name |
155
174
 
156
- ```toml
157
- [llm]
158
- api_key = "xxx" # REQUIRED: Your LLM API key
175
+ ### Configuration via UI
159
176
 
160
- [embedding]
161
- api_key = "xxx" # REQUIRED: Your embedding API key (can be same as llm.api_key)
162
- ```
177
+ You can also configure the plugin through OpenClaw UI:
163
178
 
164
- Then restart OpenClaw.
179
+ 1. Open OpenClaw Settings (`openclaw.json` or via UI)
180
+ 2. Navigate to Plugins → MemClaw → Configuration
181
+ 3. Fill in the required fields for LLM and Embedding
182
+ 4. Save and **restart OpenClaw Gateway** for changes to take effect
165
183
 
166
184
  ## Available Tools
167
185
 
@@ -214,42 +232,47 @@ Close a session and trigger memory extraction pipeline (takes 30-60 seconds).
214
232
  }
215
233
  ```
216
234
 
235
+ > **Important**: Call this tool proactively at natural checkpoints, not just when the conversation ends. Ideal timing: after completing important tasks, topic transitions, or accumulating enough conversation content.
236
+
217
237
  ### cortex_migrate
218
238
 
219
239
  Migrate from OpenClaw native memory to MemClaw. Run once during initial setup.
220
240
 
221
- ## Configuration Options
241
+ ### cortex_maintenance
222
242
 
223
- | Option | Type | Default | Description |
224
- |--------|------|---------|-------------|
225
- | `serviceUrl` | string | `http://localhost:8085` | Cortex Memory service URL |
226
- | `tenantId` | string | `tenant_claw` | Tenant ID for data isolation |
227
- | `autoStartServices` | boolean | `true` | Auto-start Qdrant and service |
228
- | `defaultSessionId` | string | `default` | Default session for memory operations |
229
- | `searchLimit` | number | `10` | Default number of search results |
230
- | `minScore` | number | `0.6` | Minimum relevance score (0-1) |
243
+ Perform periodic maintenance on MemClaw data (prune, reindex, ensure-all layers).
231
244
 
232
245
  ## Quick Decision Flow
233
246
 
234
- 1. **Need to find something** → `cortex_search`
235
- 2. **Need more context** → `cortex_recall`
236
- 3. **Save important information** `cortex_add_memory`
237
- 4. **Conversation complete** `cortex_close_session`
238
- 5. **First time setup** `cortex_migrate`
247
+ | Scenario | Tool |
248
+ |----------|------|
249
+ | Need to find information | `cortex_search` |
250
+ | Need more context | `cortex_recall` |
251
+ | Save important information | `cortex_add_memory` |
252
+ | Complete a task/topic | `cortex_close_session` |
253
+ | First-time use with existing memories | `cortex_migrate` |
254
+
255
+ For detailed guidance on tool selection, session lifecycle, and best practices, see the [Skills Documentation](skills/memclaw/SKILL.md).
239
256
 
240
257
  ## Troubleshooting
241
258
 
259
+ ### Plugin Not Working
260
+
261
+ 1. **Check Configuration**: Open OpenClaw settings and verify MemClaw plugin configuration, especially LLM and Embedding settings
262
+ 2. **Restart OpenClaw Gateway**: Configuration changes require a gateway restart to take effect
263
+ 3. **Verify Services**: Run `cortex_list_sessions` to check if the service is responding
264
+
242
265
  ### Services Won't Start
243
266
 
244
267
  1. Check that ports 6333, 6334, 8085 are available
245
- 2. Verify `api_key` fields are filled in config.toml
268
+ 2. Verify LLM and Embedding credentials are configured correctly
246
269
  3. Run `openclaw skills` to check plugin status
247
270
 
248
271
  ### Search Returns No Results
249
272
 
250
273
  1. Run `cortex_list_sessions` to verify sessions exist
251
274
  2. Lower `min_score` threshold (default: 0.6)
252
- 3. Check service health with `cortex-mem-cli stats`
275
+ 3. Ensure memories have been stored (run `cortex_close_session` to extract memories)
253
276
 
254
277
  ### Migration Fails
255
278
 
@@ -271,6 +294,12 @@ cortex-mem-cli --config config.toml --tenant tenant_claw layers ensure-all
271
294
  cortex-mem-cli --config config.toml --tenant tenant_claw vector reindex
272
295
  ```
273
296
 
297
+ ## Documentation
298
+
299
+ - **[Skills Documentation](skills/memclaw/SKILL.md)** — Agent skill guide with troubleshooting
300
+ - **[Best Practices](skills/memclaw/references/best-practices.md)** — Tool selection, session lifecycle, search strategies
301
+ - **[Tools Reference](skills/memclaw/references/tools.md)** — Detailed tool parameters and examples
302
+
274
303
  ## License
275
304
 
276
305
  MIT
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ function memclawPlugin(api) {
38
38
  exports.plugin = {
39
39
  id: 'memclaw',
40
40
  name: 'MemClaw',
41
- version: '0.9.16',
41
+ version: '0.9.18',
42
42
  configSchema: {
43
43
  type: 'object',
44
44
  properties: {
@@ -3,7 +3,10 @@
3
3
  *
4
4
  * Provides layered semantic memory for OpenClaw with:
5
5
  * - Automatic service startup
6
- * - Memory tools (search, recall, add, list, close)
6
+ * - Memory tools (search, recall, add, close)
7
+ * - Tiered access (L0/L1/L2)
8
+ * - Filesystem browsing
9
+ * - Smart exploration
7
10
  * - Migration from OpenClaw native memory
8
11
  */
9
12
  interface PluginLogger {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-impl.d.ts","sourceRoot":"","sources":["../plugin-impl.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA0CH,UAAU,YAAY;IACrB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClD,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAChD,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAChD,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACjD;AAED,UAAU,SAAS;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACxE,eAAe,CAAC,OAAO,EAAE;QACxB,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;KAC1B,GAAG,IAAI,CAAC;IACT,MAAM,EAAE,YAAY,CAAC;CACrB;AAED,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAA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