@memclaw/plugin 0.9.1 → 0.9.3
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/dist/index.d.ts +100 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin-impl.d.ts +40 -0
- package/dist/plugin-impl.d.ts.map +1 -0
- package/dist/plugin-impl.js +445 -0
- package/dist/plugin-impl.js.map +1 -0
- package/dist/src/binaries.d.ts +29 -0
- package/dist/src/binaries.d.ts.map +1 -0
- package/dist/src/binaries.js +292 -0
- package/dist/src/binaries.js.map +1 -0
- package/dist/src/client.d.ts +88 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +131 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/config.d.ts +50 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +257 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/migrate.d.ts +26 -0
- package/dist/src/migrate.d.ts.map +1 -0
- package/dist/src/migrate.js +287 -0
- package/dist/src/migrate.js.map +1 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +2 -2
- package/skill/SKILL.md +21 -3
- package/skill/references/setup.md +199 -54
|
@@ -2,110 +2,255 @@
|
|
|
2
2
|
|
|
3
3
|
Installation and configuration guide for MemClaw.
|
|
4
4
|
|
|
5
|
+
## Supported Platforms
|
|
6
|
+
|
|
7
|
+
| Platform | npm Package |
|
|
8
|
+
|----------|-------------|
|
|
9
|
+
| macOS Apple Silicon | `@memclaw/bin-darwin-arm64` |
|
|
10
|
+
| Windows x64 | `@memclaw/bin-win-x64` |
|
|
11
|
+
|
|
12
|
+
> **Note**: MemClaw is only supported on the platforms listed above.
|
|
13
|
+
|
|
5
14
|
## Requirements
|
|
6
15
|
|
|
7
16
|
| Requirement | Details |
|
|
8
17
|
|-------------|---------|
|
|
9
|
-
| **Platforms** | Windows x86, macOS Apple Silicon |
|
|
10
18
|
| **Node.js** | ≥ 20.0.0 |
|
|
11
19
|
| **OpenClaw** | Installed and configured |
|
|
20
|
+
| **Qdrant** | Vector database (port 6333/6334) |
|
|
21
|
+
| **cortex-mem-service** | Memory service (port 8085) |
|
|
12
22
|
|
|
13
|
-
## Installation
|
|
23
|
+
## Binary Installation
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
openclaw plugins install @memclaw/plugin
|
|
17
|
-
```
|
|
25
|
+
MemClaw binaries (Qdrant, cortex-mem-service, cortex-mem-cli) are distributed via platform-specific npm packages:
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
- `@memclaw/bin-darwin-arm64` — macOS Apple Silicon
|
|
28
|
+
- `@memclaw/bin-win-x64` — Windows x64
|
|
20
29
|
|
|
21
|
-
|
|
30
|
+
These packages are installed automatically as optional dependencies when installing `@memclaw/plugin`.
|
|
22
31
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"config": {
|
|
30
|
-
"serviceUrl": "http://127.0.0.1:8085",
|
|
31
|
-
"tenantId": "tenant_claw",
|
|
32
|
-
"autoStartServices": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"agents": {
|
|
38
|
-
"defaults": {
|
|
39
|
-
"memorySearch": { "enabled": false }
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
32
|
+
### Manual Binary Installation
|
|
33
|
+
|
|
34
|
+
If binaries are not installed, run:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
npm install @memclaw/bin-darwin-arm64
|
|
43
38
|
```
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
or (for Windows):
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
npm install @memclaw/bin-win-x64
|
|
44
|
+
```
|
|
46
45
|
|
|
47
|
-
##
|
|
46
|
+
## First-Time Setup Checklist
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
**Before using MemClaw, complete these steps:**
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
### Step 1: Verify Platform Support
|
|
51
|
+
|
|
52
|
+
Ensure you are on a supported platform (macOS Apple Silicon or Windows x86/x64).
|
|
53
|
+
|
|
54
|
+
### Step 2: Prepare Data Directory
|
|
55
|
+
|
|
56
|
+
The `--data-dir` parameter specifies the root directory for MemClaw data. By default, use the system's application data directory:
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
| Platform | Default `--data-dir` |
|
|
59
|
+
|----------|----------------------|
|
|
60
|
+
| macOS | `~/Library/Application Support/memclaw` |
|
|
61
|
+
| Windows | `%LOCALAPPDATA%\memclaw` |
|
|
62
|
+
| Linux | `~/.local/share/memclaw` |
|
|
63
|
+
|
|
64
|
+
The `config.toml` file should be placed directly in this directory.
|
|
65
|
+
|
|
66
|
+
### Step 3: Create Configuration File
|
|
67
|
+
|
|
68
|
+
**CRITICAL**: The `config.toml` file MUST be placed in the data directory BEFORE starting cortex-mem-service.
|
|
69
|
+
|
|
70
|
+
Create `config.toml` with the following content:
|
|
57
71
|
|
|
58
72
|
```toml
|
|
73
|
+
# MemClaw Configuration
|
|
74
|
+
#
|
|
75
|
+
# Fill in the required values marked with [REQUIRED] before starting the service.
|
|
76
|
+
|
|
77
|
+
# ============================================================
|
|
78
|
+
# Qdrant Vector Database Configuration
|
|
79
|
+
# ============================================================
|
|
80
|
+
[qdrant]
|
|
81
|
+
# Qdrant gRPC API URL
|
|
82
|
+
url = "http://localhost:6334"
|
|
83
|
+
# Collection name for storing memory vectors
|
|
84
|
+
collection_name = "memclaw"
|
|
85
|
+
# Connection timeout in seconds
|
|
86
|
+
timeout_secs = 30
|
|
87
|
+
|
|
88
|
+
# ============================================================
|
|
59
89
|
# LLM Configuration [REQUIRED for memory processing]
|
|
90
|
+
# ============================================================
|
|
60
91
|
[llm]
|
|
61
92
|
# Your LLM API endpoint (OpenAI-compatible)
|
|
62
93
|
api_base_url = "https://api.openai.com/v1"
|
|
63
94
|
# Your API key [REQUIRED]
|
|
64
|
-
api_key = "
|
|
95
|
+
api_key = "your-api-key-here"
|
|
65
96
|
# Model for memory extraction and layer generation
|
|
66
|
-
model_efficient = "gpt-
|
|
97
|
+
model_efficient = "gpt-5-mini"
|
|
67
98
|
temperature = 0.1
|
|
68
|
-
max_tokens =
|
|
99
|
+
max_tokens = 65535
|
|
69
100
|
|
|
101
|
+
# ============================================================
|
|
70
102
|
# Embedding Configuration [REQUIRED for vector search]
|
|
103
|
+
# ============================================================
|
|
71
104
|
[embedding]
|
|
72
105
|
# Your embedding API endpoint (OpenAI-compatible)
|
|
73
106
|
api_base_url = "https://api.openai.com/v1"
|
|
74
107
|
# Your API key [REQUIRED - can be same as llm.api_key]
|
|
75
|
-
api_key = "
|
|
108
|
+
api_key = "your-api-key-here"
|
|
76
109
|
model_name = "text-embedding-3-small"
|
|
77
110
|
batch_size = 10
|
|
111
|
+
timeout_secs = 30
|
|
112
|
+
|
|
113
|
+
# ============================================================
|
|
114
|
+
# Service Configuration
|
|
115
|
+
# ============================================================
|
|
116
|
+
[server]
|
|
117
|
+
host = "localhost"
|
|
118
|
+
port = 8085
|
|
119
|
+
|
|
120
|
+
# ============================================================
|
|
121
|
+
# Cortex Memory Settings
|
|
122
|
+
# ============================================================
|
|
123
|
+
[cortex]
|
|
124
|
+
# Data directory path - MUST match the --data-dir argument
|
|
125
|
+
# Default paths by platform:
|
|
126
|
+
# macOS: "~/Library/Application Support/memclaw"
|
|
127
|
+
# Windows: "%LOCALAPPDATA%\\memclaw"
|
|
128
|
+
# Linux: "~/.local/share/memclaw"
|
|
129
|
+
data_dir = "."
|
|
130
|
+
enable_intent_analysis = false
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Step 4: Verify Services
|
|
134
|
+
|
|
135
|
+
Check that Qdrant and cortex-mem-service are accessible:
|
|
136
|
+
|
|
137
|
+
| Service | Port | Health Check |
|
|
138
|
+
|---------|------|--------------|
|
|
139
|
+
| Qdrant | 6333 (HTTP), 6334 (gRPC) | HTTP GET to `http://localhost:6333` should return Qdrant version info |
|
|
140
|
+
| cortex-mem-service | 8085 | HTTP GET to `http://localhost:8085/health` should return `{"status":"ok"}` |
|
|
141
|
+
|
|
142
|
+
### Step 5: Start Services (if not running)
|
|
143
|
+
|
|
144
|
+
**Starting Qdrant:**
|
|
145
|
+
|
|
146
|
+
If `autoStartServices` is `true` in plugin config, MemClaw will start Qdrant automatically.
|
|
147
|
+
|
|
148
|
+
To start manually, run the Qdrant binary from the platform package with:
|
|
149
|
+
- `--storage-path` pointing to a storage directory
|
|
150
|
+
- `--http-port 6333`
|
|
151
|
+
- `--grpc-port 6334`
|
|
152
|
+
|
|
153
|
+
**Starting cortex-mem-service:**
|
|
154
|
+
|
|
155
|
+
**CRITICAL**: cortex-mem-service MUST be started with `--data-dir` flag pointing to the directory containing `config.toml`.
|
|
156
|
+
|
|
157
|
+
Arguments:
|
|
158
|
+
- `--data-dir <path>` — Path to data directory containing `config.toml` (**REQUIRED**)
|
|
159
|
+
- `--config <path>` — Path to config file (optional, defaults to `config.toml` in data directory)
|
|
160
|
+
|
|
161
|
+
Example:
|
|
162
|
+
```
|
|
163
|
+
cortex-mem-service --data-dir ~/Library/Application\ Support/memclaw
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Or on Windows:
|
|
167
|
+
```
|
|
168
|
+
cortex-mem-service --data-dir %LOCALAPPDATA%\memclaw
|
|
78
169
|
```
|
|
79
170
|
|
|
80
|
-
|
|
171
|
+
## Plugin Configuration
|
|
81
172
|
|
|
82
|
-
|
|
173
|
+
Edit your `openclaw.json`:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"plugins": {
|
|
178
|
+
"entries": {
|
|
179
|
+
"memclaw": {
|
|
180
|
+
"enabled": true,
|
|
181
|
+
"config": {
|
|
182
|
+
"serviceUrl": "http://localhost:8085",
|
|
183
|
+
"tenantId": "tenant_claw",
|
|
184
|
+
"autoStartServices": true
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"agents": {
|
|
190
|
+
"defaults": {
|
|
191
|
+
"memorySearch": { "enabled": false }
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
> **Important**: Set `memorySearch.enabled: false` to disable OpenClaw's built-in memory search and use MemClaw instead.
|
|
198
|
+
|
|
199
|
+
### Configuration Options
|
|
83
200
|
|
|
84
201
|
| Option | Type | Default | Description |
|
|
85
202
|
|--------|------|---------|-------------|
|
|
86
|
-
| `serviceUrl` | string | `http://
|
|
203
|
+
| `serviceUrl` | string | `http://localhost:8085` | Cortex Memory service URL |
|
|
87
204
|
| `tenantId` | string | `tenant_claw` | Tenant ID for data isolation |
|
|
88
|
-
| `autoStartServices` | boolean | `true` | Auto-start Qdrant and service |
|
|
205
|
+
| `autoStartServices` | boolean | `true` | Auto-start Qdrant and cortex-mem-service |
|
|
89
206
|
| `defaultSessionId` | string | `default` | Default session for memory operations |
|
|
90
207
|
| `searchLimit` | number | `10` | Default number of search results |
|
|
91
208
|
| `minScore` | number | `0.6` | Minimum relevance score (0-1) |
|
|
92
209
|
|
|
93
210
|
## Troubleshooting
|
|
94
211
|
|
|
95
|
-
###
|
|
212
|
+
### Platform Not Supported
|
|
213
|
+
|
|
214
|
+
If you see "Platform not supported" error:
|
|
215
|
+
- Verify you are on macOS Apple Silicon or Windows x64
|
|
216
|
+
- Check that the correct `@memclaw/bin-*` package is installed
|
|
217
|
+
|
|
218
|
+
### Binaries Not Found
|
|
219
|
+
|
|
220
|
+
If binaries are missing:
|
|
221
|
+
1. Verify `@memclaw/bin-*` package is in `node_modules`
|
|
222
|
+
2. Try reinstalling: `npm install @memclaw/bin-darwin-arm64` (or `bin-win-x64`)
|
|
223
|
+
|
|
224
|
+
### cortex-mem-service Won't Start
|
|
225
|
+
|
|
226
|
+
1. Verify `--data-dir` flag is provided
|
|
227
|
+
2. Verify `config.toml` exists in the data directory
|
|
228
|
+
3. Verify required fields in `config.toml`:
|
|
229
|
+
- `llm.api_key` is non-empty
|
|
230
|
+
- `embedding.api_key` is non-empty
|
|
231
|
+
- `cortex.data_dir` matches `--data-dir` argument
|
|
232
|
+
|
|
233
|
+
Default data directories:
|
|
234
|
+
| Platform | Path |
|
|
235
|
+
|----------|------|
|
|
236
|
+
| macOS | `~/Library/Application Support/memclaw` |
|
|
237
|
+
| Windows | `%LOCALAPPDATA%\memclaw` |
|
|
238
|
+
| Linux | `~/.local/share/memclaw` |
|
|
239
|
+
|
|
240
|
+
### Services Not Accessible
|
|
96
241
|
|
|
97
|
-
1.
|
|
98
|
-
2. Verify
|
|
99
|
-
3.
|
|
242
|
+
1. Verify ports 6333, 6334, 8085 are not in use by other applications
|
|
243
|
+
2. Verify firewall allows connections on these ports
|
|
244
|
+
3. Check service logs for error messages
|
|
100
245
|
|
|
101
|
-
### Configuration File
|
|
246
|
+
### Configuration File Issues
|
|
102
247
|
|
|
103
|
-
1. Ensure
|
|
104
|
-
2.
|
|
105
|
-
3.
|
|
248
|
+
1. Ensure `config.toml` uses valid TOML syntax
|
|
249
|
+
2. Verify file encoding is UTF-8
|
|
250
|
+
3. On Windows, use double backslashes in paths: `C:\\Users\\...`
|
|
106
251
|
|
|
107
252
|
### API Key Issues
|
|
108
253
|
|
|
109
|
-
1. Verify
|
|
110
|
-
2.
|
|
111
|
-
3.
|
|
254
|
+
1. Verify API key is valid and has sufficient credits
|
|
255
|
+
2. Verify `api_base_url` is correct for your provider
|
|
256
|
+
3. Verify network connectivity to the API endpoint
|