@memoryrelay/plugin-memoryrelay-ai 0.12.10 → 0.13.0
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 +71 -546
- package/index.ts +642 -16
- package/openclaw.plugin.json +28 -2
- package/package.json +3 -2
- package/skills/codebase-navigation/SKILL.md +105 -0
- package/skills/decision-tracking/SKILL.md +50 -0
- package/skills/entity-and-context/SKILL.md +62 -0
- package/skills/memory-workflow/SKILL.md +84 -0
- package/skills/pattern-management/SKILL.md +57 -0
- package/skills/project-orchestration/SKILL.md +72 -0
- package/skills/release-process/SKILL.md +83 -0
- package/skills/testing-memoryrelay/SKILL.md +87 -0
package/README.md
CHANGED
|
@@ -8,16 +8,19 @@ AI-powered long-term memory for OpenClaw agents. Gives your AI assistant persist
|
|
|
8
8
|
## Features
|
|
9
9
|
|
|
10
10
|
- **39 Tools** covering memories, entities, sessions, decisions, patterns, and projects
|
|
11
|
-
- **
|
|
12
|
-
- **Smart Auto-Capture** - Tier-based privacy system with automatic filtering
|
|
13
|
-
- **Daily Memory Stats** - Morning/evening summaries with growth metrics
|
|
14
|
-
- **Debug & Monitoring** - Comprehensive logging, health checks, and performance metrics
|
|
11
|
+
- **8 Gateway Methods** for stats, debugging, and onboarding
|
|
12
|
+
- **Smart Auto-Capture** - Tier-based privacy system with automatic filtering
|
|
13
|
+
- **Daily Memory Stats** - Morning/evening summaries with growth metrics
|
|
14
|
+
- **Debug & Monitoring** - Comprehensive logging, health checks, and performance metrics
|
|
15
15
|
- **Semantic Search** - Vector-based retrieval finds relevant context by meaning
|
|
16
16
|
- **Auto-Recall** - Automatically injects relevant memories into agent context
|
|
17
17
|
- **Project-First Workflow** - Agents receive workflow instructions to start with project context
|
|
18
18
|
- **Decision Records** - Track and check architectural decisions before making new ones
|
|
19
19
|
- **Pattern Library** - Create, search, and adopt reusable conventions across projects
|
|
20
20
|
- **Session Tracking** - Track work sessions with summaries for continuity
|
|
21
|
+
- **External Session IDs** - Multi-agent collaboration and conversation-spanning sessions
|
|
22
|
+
- **Stale Session Cleanup** - Background service automatically closes inactive sessions after a configurable timeout
|
|
23
|
+
- **Sender Identity Tagging** - Multi-agent traceability via auto-injected `sender_id` metadata
|
|
21
24
|
- **Tool Group Filtering** - Enable only the tool groups you need
|
|
22
25
|
|
|
23
26
|
## Installation
|
|
@@ -64,39 +67,29 @@ openclaw gateway restart
|
|
|
64
67
|
| `defaultProject` | string | — | Default project slug applied to sessions, decisions, and memories |
|
|
65
68
|
| `enabledTools` | string | `all` | Comma-separated tool groups: `memory`, `entity`, `agent`, `session`, `decision`, `pattern`, `project`, `health` |
|
|
66
69
|
| `autoRecall` | boolean | `true` | Inject relevant memories into context each turn |
|
|
67
|
-
| `autoCapture` | boolean\|object | `
|
|
70
|
+
| `autoCapture` | boolean\|object | `false` | Auto-capture config. Boolean for backward compat, object for tier system: `{enabled, tier, confirmFirst}`. Tiers: `off`, `conservative`, `smart`, `aggressive`. |
|
|
68
71
|
| `recallLimit` | number | `5` | Max memories to inject per turn (1-20) |
|
|
69
72
|
| `recallThreshold` | number | `0.3` | Minimum similarity score for recall (0-1) |
|
|
70
73
|
| `excludeChannels` | string[] | `[]` | Channel IDs to skip auto-recall |
|
|
71
|
-
| `debug` | boolean | `false` | Enable debug logging of API calls
|
|
72
|
-
| `verbose` | boolean | `false` | Include request/response bodies in debug logs
|
|
73
|
-
| `logFile` | string | — | Optional file path for persistent debug logs
|
|
74
|
-
| `maxLogEntries` | number | `100` | Circular buffer size for in-memory logs
|
|
74
|
+
| `debug` | boolean | `false` | Enable debug logging of API calls |
|
|
75
|
+
| `verbose` | boolean | `false` | Include request/response bodies in debug logs |
|
|
76
|
+
| `logFile` | string | — | Optional file path for persistent debug logs |
|
|
77
|
+
| `maxLogEntries` | number | `100` | Circular buffer size for in-memory logs |
|
|
78
|
+
| `sessionTimeoutMinutes` | number | `120` | Idle time before a session is automatically closed by the cleanup service |
|
|
79
|
+
| `sessionCleanupIntervalMinutes` | number | `30` | How often the background cleanup service checks for stale sessions |
|
|
75
80
|
|
|
76
|
-
|
|
81
|
+
## Smart Auto-Capture
|
|
77
82
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Phase 1 introduces features designed to make MemoryRelay "just work" without manual effort. The goal: store 3-5x more memories with zero additional work.
|
|
81
|
-
|
|
82
|
-
### Smart Auto-Capture (Issue #12)
|
|
83
|
-
|
|
84
|
-
**Tier-Based Privacy System** — Four capture modes with built-in privacy protection:
|
|
83
|
+
Four capture modes with built-in privacy protection:
|
|
85
84
|
|
|
86
85
|
| Tier | When to Use | Privacy Level |
|
|
87
86
|
|------|-------------|---------------|
|
|
88
87
|
| `off` | Manual storage only | N/A |
|
|
89
88
|
| `conservative` | Low-risk conversations only | High (blocks most patterns) |
|
|
90
|
-
| `smart` |
|
|
89
|
+
| `smart` | Balanced automation | Medium (blocks sensitive data) |
|
|
91
90
|
| `aggressive` | Maximum capture | Low (minimal blocking) |
|
|
92
91
|
|
|
93
|
-
**Privacy Blocklist** — Automatically filters
|
|
94
|
-
- Passwords and API keys (`password: xxx`, `api_key=xxx`)
|
|
95
|
-
- Credit card numbers (Visa, MC, Amex, Discover patterns)
|
|
96
|
-
- Social Security Numbers (`SSN: xxx-xx-xxxx`)
|
|
97
|
-
- Email addresses and phone numbers (when tier < aggressive)
|
|
98
|
-
|
|
99
|
-
**Configuration**:
|
|
92
|
+
**Privacy Blocklist** — Automatically filters passwords, API keys, credit card numbers, SSNs, and other sensitive data.
|
|
100
93
|
|
|
101
94
|
```json
|
|
102
95
|
{
|
|
@@ -108,270 +101,7 @@ Phase 1 introduces features designed to make MemoryRelay "just work" without man
|
|
|
108
101
|
}
|
|
109
102
|
```
|
|
110
103
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
**First-5 Confirmations** — On `smart`/`aggressive` tiers, first 5 captures show confirmation prompts. After 5, auto-capture runs silently. Reset by setting `confirmFirst: 5` again.
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
### Daily Memory Stats (Issue #10)
|
|
118
|
-
|
|
119
|
-
**Morning Check** (9:00 AM) — Start your day with memory growth stats:
|
|
120
|
-
```
|
|
121
|
-
📊 Memory Stats (Morning Check)
|
|
122
|
-
Total: 1,247 memories | Today: 8 (+3 since yesterday)
|
|
123
|
-
This week: 52 memories (+15% vs last week)
|
|
124
|
-
Top categories: development (18), decisions (12), patterns (7)
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
**Evening Review** (8:00 PM) — End your day with activity summary:
|
|
128
|
-
```
|
|
129
|
-
🌙 Memory Activity (Evening Review)
|
|
130
|
-
Today: 12 memories stored | Most recalled: "NorthRelay API v9.0 architecture"
|
|
131
|
-
Most valuable: [Memory about critical bug fix in authentication flow]
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**Gateway Method**: `memoryrelay:heartbeat`
|
|
135
|
-
|
|
136
|
-
**Configuration**:
|
|
137
|
-
```json
|
|
138
|
-
{
|
|
139
|
-
"dailyStats": {
|
|
140
|
-
"enabled": true,
|
|
141
|
-
"morningTime": "09:00",
|
|
142
|
-
"eveningTime": "20:00"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**Integration with HEARTBEAT.md** — Add to your workspace `HEARTBEAT.md`:
|
|
148
|
-
```markdown
|
|
149
|
-
## MemoryRelay Health
|
|
150
|
-
Every heartbeat, check memory stats:
|
|
151
|
-
- Run morning check at 9 AM
|
|
152
|
-
- Run evening review at 8 PM
|
|
153
|
-
- Report if memory storage rate drops below 5/week
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
### CLI Stats Command (Issue #11)
|
|
159
|
-
|
|
160
|
-
**Comprehensive Statistics** — View memory metrics anytime:
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
openclaw gateway-call memoryrelay.stats
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
**Text Output**:
|
|
167
|
-
```
|
|
168
|
-
MemoryRelay Statistics
|
|
169
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
-
|
|
171
|
-
Storage
|
|
172
|
-
Total: 1,247 memories
|
|
173
|
-
Today: 8 memories
|
|
174
|
-
This week: 52 memories (+15% vs last week)
|
|
175
|
-
This month: 218 memories (+8% vs last month)
|
|
176
|
-
|
|
177
|
-
Top 10 Categories
|
|
178
|
-
development ........................ 342 (27%)
|
|
179
|
-
decisions .......................... 156 (12%)
|
|
180
|
-
patterns ........................... 128 (10%)
|
|
181
|
-
infrastructure ..................... 94 (8%)
|
|
182
|
-
[...]
|
|
183
|
-
|
|
184
|
-
Recent Memories (last 5)
|
|
185
|
-
[2026-03-06 12:35] Phase 1 validation test
|
|
186
|
-
[2026-03-06 10:25] Phase 1 implementation complete
|
|
187
|
-
[2026-03-06 09:11] Issue #8 broken down
|
|
188
|
-
[...]
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
**JSON Output** (for scripts):
|
|
192
|
-
```bash
|
|
193
|
-
openclaw gateway-call memoryrelay.stats '{"format": "json"}'
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
**Verbose Mode** (includes growth charts, recall stats):
|
|
197
|
-
```bash
|
|
198
|
-
openclaw gateway-call memoryrelay.stats '{"verbose": true}'
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
### First-Run Onboarding (Issue #9)
|
|
204
|
-
|
|
205
|
-
**Automatic Welcome** — On fresh install (no memories + no onboarding state):
|
|
206
|
-
|
|
207
|
-
1. Plugin detects first run
|
|
208
|
-
2. Creates welcome memory: "Welcome to MemoryRelay! This is your first memory."
|
|
209
|
-
3. Shows auto-capture explanation
|
|
210
|
-
4. Saves state to `~/.openclaw/memoryrelay-onboarding.json`
|
|
211
|
-
5. Never repeats (state file persists)
|
|
212
|
-
|
|
213
|
-
**Manual Trigger** (show again or for new users):
|
|
214
|
-
```bash
|
|
215
|
-
openclaw gateway-call memoryrelay.onboarding
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
**What Users See**:
|
|
219
|
-
```
|
|
220
|
-
🎉 Welcome to MemoryRelay!
|
|
221
|
-
|
|
222
|
-
I just stored my first memory: "Welcome to MemoryRelay! This is your first memory."
|
|
223
|
-
|
|
224
|
-
Auto-capture is enabled (tier: smart). I'll automatically remember:
|
|
225
|
-
✓ Important decisions and changes
|
|
226
|
-
✓ Technical discoveries and solutions
|
|
227
|
-
✓ Project context and conventions
|
|
228
|
-
|
|
229
|
-
Privacy protected — I filter out:
|
|
230
|
-
✗ Passwords and API keys
|
|
231
|
-
✗ Credit card numbers
|
|
232
|
-
✗ Social Security Numbers
|
|
233
|
-
✗ Personal secrets
|
|
234
|
-
|
|
235
|
-
You're all set! I'll build memory over time as we work together.
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
### Gateway Methods Summary
|
|
241
|
-
|
|
242
|
-
| Method | Purpose | Example |
|
|
243
|
-
|--------|---------|---------|
|
|
244
|
-
| `memoryrelay:heartbeat` | Daily stats check (morning/evening) | `openclaw gateway-call memoryrelay.heartbeat` |
|
|
245
|
-
| `memoryrelay:stats` | CLI stats command | `openclaw gateway-call memoryrelay.stats '{"format": "json"}'` |
|
|
246
|
-
| `memoryrelay:onboarding` | Show/restart onboarding | `openclaw gateway-call memoryrelay.onboarding` |
|
|
247
|
-
|
|
248
|
-
**Note**: These are gateway methods, not shell commands. Invoke via `openclaw gateway-call memoryrelay.<method>`.
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
### Expected Impact
|
|
253
|
-
|
|
254
|
-
Based on Zero-Friction Adoption Strategy (Issue #8):
|
|
255
|
-
|
|
256
|
-
| Metric | Before | After Phase 1 | Target |
|
|
257
|
-
|--------|--------|---------------|--------|
|
|
258
|
-
| Memory storage rate | 5/week | 15-25/week | 3-5x |
|
|
259
|
-
| Daily active usage | 10% | 40-50% | 4-5x |
|
|
260
|
-
| Auto-capture adoption | 0% | 40-50% | 70% |
|
|
261
|
-
| First memory time | N/A | <2 min | <5 min |
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
## Debug & Monitoring (v0.8.0+)
|
|
266
|
-
|
|
267
|
-
### Enable Debug Mode
|
|
268
|
-
|
|
269
|
-
```json
|
|
270
|
-
{
|
|
271
|
-
"plugins": {
|
|
272
|
-
"entries": {
|
|
273
|
-
"plugin-memoryrelay-ai": {
|
|
274
|
-
"enabled": true,
|
|
275
|
-
"config": {
|
|
276
|
-
"apiKey": "mem_prod_xxxxx",
|
|
277
|
-
"agentId": "your-agent",
|
|
278
|
-
"debug": true,
|
|
279
|
-
"verbose": false,
|
|
280
|
-
"maxLogEntries": 1000
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
### Debug Commands (Gateway Methods)
|
|
289
|
-
|
|
290
|
-
The plugin provides four debug commands accessible via OpenClaw gateway methods:
|
|
291
|
-
|
|
292
|
-
**Note**: These are **gateway methods**, not standalone shell commands. Invoke them using `openclaw gateway-call memoryrelay.<method>`.
|
|
293
|
-
|
|
294
|
-
#### View Debug Logs
|
|
295
|
-
```bash
|
|
296
|
-
# Last 20 logs
|
|
297
|
-
openclaw gateway-call memoryrelay.logs
|
|
298
|
-
|
|
299
|
-
# Last 50 logs
|
|
300
|
-
openclaw gateway-call memoryrelay.logs '{"limit": 50}'
|
|
301
|
-
|
|
302
|
-
# Filter by tool
|
|
303
|
-
openclaw gateway-call memoryrelay.logs '{"tool": "memory_store", "limit": 20}'
|
|
304
|
-
|
|
305
|
-
# Show errors only
|
|
306
|
-
openclaw gateway-call memoryrelay.logs '{"errorsOnly": true}'
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
#### Health Check
|
|
310
|
-
```bash
|
|
311
|
-
# Run comprehensive health check
|
|
312
|
-
openclaw gateway-call memoryrelay.health
|
|
313
|
-
|
|
314
|
-
# Tests API connectivity, authentication, and core tools
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
#### Test Individual Tools
|
|
318
|
-
```bash
|
|
319
|
-
# Test specific tool
|
|
320
|
-
openclaw gateway-call memoryrelay.test '{"tool": "memory_store"}'
|
|
321
|
-
openclaw gateway-call memoryrelay.test '{"tool": "memory_recall"}'
|
|
322
|
-
openclaw gateway-call memoryrelay.test '{"tool": "project_list"}'
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
#### View Performance Metrics
|
|
326
|
-
```bash
|
|
327
|
-
# Show performance statistics
|
|
328
|
-
openclaw gateway-call memoryrelay.metrics
|
|
329
|
-
|
|
330
|
-
# Displays per-tool metrics:
|
|
331
|
-
# - Call count
|
|
332
|
-
# - Success rate
|
|
333
|
-
# - Average duration
|
|
334
|
-
# - p95/p99 latencies
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Alternative: Direct Gateway Method Calls
|
|
338
|
-
|
|
339
|
-
The same methods can be called programmatically from code or scripts (same syntax as above).
|
|
340
|
-
|
|
341
|
-
### Enhanced Status Reporting
|
|
342
|
-
|
|
343
|
-
The `memory.status` gateway method now provides comprehensive reports including:
|
|
344
|
-
|
|
345
|
-
- Connection status with response time
|
|
346
|
-
- Tool breakdown by category (39 tools across 8 groups)
|
|
347
|
-
- Recent API call history
|
|
348
|
-
- Known issues with affected tools
|
|
349
|
-
- Debug/verbose mode status
|
|
350
|
-
|
|
351
|
-
```bash
|
|
352
|
-
openclaw gateway call memory.status
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
### Debug Log Format
|
|
356
|
-
|
|
357
|
-
When debug mode is enabled, each API call is logged with:
|
|
358
|
-
|
|
359
|
-
```
|
|
360
|
-
TIMESTAMP TOOL DURATION STATUS ERROR
|
|
361
|
-
━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━ ━━━━━━ ━━━━━━━━━━━━━━━━━━━
|
|
362
|
-
7:35:15 PM memory_store 142ms ✓
|
|
363
|
-
7:35:10 PM memory_recall 78ms ✓
|
|
364
|
-
7:35:05 PM memory_batch_store 245ms ✗ 500 Internal Server Error
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
Verbose mode additionally captures request/response bodies for deep troubleshooting.
|
|
368
|
-
|
|
369
|
-
### Performance Impact
|
|
370
|
-
|
|
371
|
-
- **Debug disabled**: ~0ms overhead (no-op checks)
|
|
372
|
-
- **Debug enabled**: ~1-2ms per call (logging only)
|
|
373
|
-
- **Verbose enabled**: ~2-5ms per call (includes JSON serialization)
|
|
374
|
-
- **Memory usage**: ~10KB (default 100 entries) to ~100KB (1000 entries)
|
|
104
|
+
With `confirmFirst`, the first N captures show confirmation prompts before running silently.
|
|
375
105
|
|
|
376
106
|
## Agent Workflow
|
|
377
107
|
|
|
@@ -468,6 +198,18 @@ For new projects, the agent is guided to call `project_register()` first.
|
|
|
468
198
|
|------|-------------|
|
|
469
199
|
| `memory_health` | Check API connectivity and health status |
|
|
470
200
|
|
|
201
|
+
## Direct Commands
|
|
202
|
+
|
|
203
|
+
These slash commands bypass the LLM and execute immediately in the CLI:
|
|
204
|
+
|
|
205
|
+
| Command | Description |
|
|
206
|
+
|---------|-------------|
|
|
207
|
+
| `/memory-status` | Show connection status, tool counts, and memory stats |
|
|
208
|
+
| `/memory-stats` | Show memory growth, categories, and daily statistics |
|
|
209
|
+
| `/memory-health` | Run health check against the MemoryRelay API |
|
|
210
|
+
| `/memory-logs` | Show recent debug log entries |
|
|
211
|
+
| `/memory-metrics` | Show per-tool performance metrics (call count, success rate, latency) |
|
|
212
|
+
|
|
471
213
|
## Tool Group Filtering
|
|
472
214
|
|
|
473
215
|
Only enable the groups you need:
|
|
@@ -509,33 +251,50 @@ Exclude specific channels from auto-recall and workflow injection:
|
|
|
509
251
|
}
|
|
510
252
|
```
|
|
511
253
|
|
|
512
|
-
##
|
|
254
|
+
## Debug & Monitoring
|
|
513
255
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
256
|
+
### Enable Debug Mode
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"debug": true,
|
|
261
|
+
"verbose": false,
|
|
262
|
+
"maxLogEntries": 1000
|
|
263
|
+
}
|
|
521
264
|
```
|
|
522
265
|
|
|
266
|
+
### Gateway Methods
|
|
267
|
+
|
|
268
|
+
| Method | Purpose | Example |
|
|
269
|
+
|--------|---------|---------|
|
|
270
|
+
| `memoryrelay.logs` | View debug logs | `openclaw gateway-call memoryrelay.logs '{"limit": 50}'` |
|
|
271
|
+
| `memoryrelay.health` | Run health check | `openclaw gateway-call memoryrelay.health` |
|
|
272
|
+
| `memoryrelay.test` | Test individual tools | `openclaw gateway-call memoryrelay.test '{"tool": "memory_store"}'` |
|
|
273
|
+
| `memoryrelay.metrics` | View performance stats | `openclaw gateway-call memoryrelay.metrics` |
|
|
274
|
+
| `memoryrelay.heartbeat` | Daily stats check | `openclaw gateway-call memoryrelay.heartbeat` |
|
|
275
|
+
| `memoryrelay.stats` | CLI stats command | `openclaw gateway-call memoryrelay.stats '{"format": "json"}'` |
|
|
276
|
+
| `memoryrelay.onboarding` | Show onboarding | `openclaw gateway-call memoryrelay.onboarding` |
|
|
277
|
+
| `memory.status` | Plugin status report | `openclaw gateway-call memory.status` |
|
|
278
|
+
|
|
279
|
+
### Debug Log Format
|
|
280
|
+
|
|
281
|
+
When debug mode is enabled, each API call is logged with timestamp, tool name, duration, and status. Verbose mode additionally captures request/response bodies for deep troubleshooting.
|
|
282
|
+
|
|
523
283
|
## Privacy & Security
|
|
524
284
|
|
|
525
285
|
- **Cloud-Backed** — Memories stored on MemoryRelay servers (HTTPS-encrypted in transit)
|
|
526
286
|
- **API Key Auth** — Bearer token authentication
|
|
527
287
|
- **Agent Isolation** — Memories scoped per agent ID
|
|
528
288
|
- **Channel Filtering** — Exclude sensitive channels from auto-recall
|
|
529
|
-
- **
|
|
530
|
-
- **
|
|
289
|
+
- **Privacy Blocklist** — Auto-capture filters sensitive data (passwords, SSNs, credit cards, API keys)
|
|
290
|
+
- **Privacy Redaction Hooks** — Sensitive data is also redacted from messages (`before_message_write`) and tool results (`tool_result_persist`) before persistence
|
|
291
|
+
- **Sender Identity** — `memory_store`, `memory_batch_store`, and `decision_record` auto-inject `sender_id` from tool context into metadata for multi-agent traceability
|
|
292
|
+
- **Never store secrets** — Do not store API keys, passwords, or tokens as memories
|
|
531
293
|
|
|
532
294
|
## Troubleshooting
|
|
533
295
|
|
|
534
296
|
### Plugin Not Loading
|
|
535
297
|
|
|
536
|
-
**Symptoms**: Plugin doesn't appear in `openclaw plugins list` or shows as "unavailable"
|
|
537
|
-
|
|
538
|
-
**Solutions**:
|
|
539
298
|
```bash
|
|
540
299
|
# Check if installed
|
|
541
300
|
npm list -g @memoryrelay/plugin-memoryrelay-ai
|
|
@@ -543,9 +302,6 @@ npm list -g @memoryrelay/plugin-memoryrelay-ai
|
|
|
543
302
|
# Reinstall if needed
|
|
544
303
|
openclaw plugins install @memoryrelay/plugin-memoryrelay-ai --force
|
|
545
304
|
|
|
546
|
-
# Check config syntax
|
|
547
|
-
cat ~/.openclaw/openclaw.json | jq '.plugins.entries."plugin-memoryrelay-ai"'
|
|
548
|
-
|
|
549
305
|
# Restart gateway
|
|
550
306
|
openclaw gateway restart
|
|
551
307
|
|
|
@@ -555,265 +311,34 @@ openclaw gateway logs | grep memoryrelay
|
|
|
555
311
|
|
|
556
312
|
### API Connection Issues
|
|
557
313
|
|
|
558
|
-
**Symptoms**: "Failed to connect" errors, timeouts, or "unhealthy" status
|
|
559
|
-
|
|
560
|
-
**Solutions**:
|
|
561
314
|
```bash
|
|
562
315
|
# Test API directly
|
|
563
316
|
curl -H "X-API-Key: YOUR_KEY" https://api.memoryrelay.net/v1/health
|
|
564
317
|
|
|
565
318
|
# Check gateway logs
|
|
566
319
|
openclaw gateway logs -f | grep memory-memoryrelay
|
|
567
|
-
|
|
568
|
-
# Verify API key format (should be mem_prod_xxxxx with 32 chars after prefix)
|
|
569
|
-
openclaw config get plugins.entries.plugin-memoryrelay-ai.config.apiKey
|
|
570
|
-
|
|
571
|
-
# Run health check
|
|
572
|
-
memoryrelay-health
|
|
573
320
|
```
|
|
574
321
|
|
|
575
322
|
### Auto-Recall Not Working
|
|
576
323
|
|
|
577
|
-
**Symptoms**: Memories not appearing in agent context
|
|
578
|
-
|
|
579
|
-
**Checks**:
|
|
580
324
|
1. Verify `autoRecall: true` in config
|
|
581
|
-
2. Check memories exist: `openclaw gateway
|
|
325
|
+
2. Check memories exist: `openclaw gateway-call memory_list '{"limit": 10}'`
|
|
582
326
|
3. Lower `recallThreshold` (try 0.1) for more results
|
|
583
|
-
4.
|
|
584
|
-
5. Check channel not in `excludeChannels`
|
|
585
|
-
|
|
586
|
-
### Debug Mode Not Working
|
|
587
|
-
|
|
588
|
-
**Symptoms**: `memoryrelay-logs` shows "No logs" or debug commands fail
|
|
589
|
-
|
|
590
|
-
**Solutions**:
|
|
591
|
-
1. Verify `debug: true` in config
|
|
592
|
-
2. Restart gateway after config change: `openclaw gateway restart`
|
|
593
|
-
3. Use the plugin to generate logs
|
|
594
|
-
4. Check `maxLogEntries` isn't set too low (default: 100)
|
|
595
|
-
|
|
596
|
-
### Tool Not Found Errors
|
|
597
|
-
|
|
598
|
-
**Symptoms**: "Tool xxx not found" or "Tool not enabled"
|
|
599
|
-
|
|
600
|
-
**Solutions**:
|
|
601
|
-
1. Check `enabledTools` config (should be `"all"` or include the tool's group)
|
|
602
|
-
2. Verify tool name spelling matches exactly (e.g., `memory_store` not `memoryStore`)
|
|
603
|
-
3. Check plugin version: `npm list -g @memoryrelay/plugin-memoryrelay-ai`
|
|
604
|
-
4. Update to latest: `openclaw plugins install @memoryrelay/plugin-memoryrelay-ai@latest`
|
|
605
|
-
|
|
606
|
-
### Performance Issues
|
|
607
|
-
|
|
608
|
-
**Symptoms**: Slow API calls, timeouts, high latency
|
|
609
|
-
|
|
610
|
-
**Diagnosis**:
|
|
611
|
-
```bash
|
|
612
|
-
# Enable debug mode
|
|
613
|
-
openclaw config set plugins.entries.plugin-memoryrelay-ai.config.debug true
|
|
614
|
-
openclaw gateway restart
|
|
615
|
-
|
|
616
|
-
# View metrics
|
|
617
|
-
memoryrelay-metrics
|
|
618
|
-
|
|
619
|
-
# Check for slow tools (high avgDuration or p99)
|
|
620
|
-
# Check for failures (low successRate)
|
|
621
|
-
```
|
|
622
|
-
|
|
623
|
-
**Solutions**:
|
|
624
|
-
1. Check network latency to api.memoryrelay.net
|
|
625
|
-
2. Reduce `recallLimit` (fewer memories = faster)
|
|
626
|
-
3. Lower `recallThreshold` (fewer vector comparisons)
|
|
627
|
-
4. Check MemoryRelay API status at status.memoryrelay.ai
|
|
628
|
-
|
|
629
|
-
### Memory Storage Failures
|
|
630
|
-
|
|
631
|
-
**Symptoms**: `memory_store` returns 422 validation errors or 500 errors
|
|
632
|
-
|
|
633
|
-
**Common Causes**:
|
|
634
|
-
1. Content too long (max 50,000 characters)
|
|
635
|
-
2. Metadata too large (max 10KB when serialized)
|
|
636
|
-
3. Invalid project slug (use `project_list` to verify)
|
|
637
|
-
4. API rate limits exceeded (30 req/min for memory_store)
|
|
638
|
-
|
|
639
|
-
**Solutions**:
|
|
640
|
-
```bash
|
|
641
|
-
# Test with minimal memory
|
|
642
|
-
openclaw gateway call memory_store '{"content": "Test memory"}'
|
|
643
|
-
|
|
644
|
-
# Check recent errors
|
|
645
|
-
memoryrelay-logs --errors-only --limit=10
|
|
646
|
-
|
|
647
|
-
# Verify API key has write permissions
|
|
648
|
-
curl -X POST https://api.memoryrelay.net/v1/memories \
|
|
649
|
-
-H "X-API-Key: YOUR_KEY" \
|
|
650
|
-
-H "Content-Type: application/json" \
|
|
651
|
-
-d '{"content": "Test"}'
|
|
652
|
-
```
|
|
653
|
-
|
|
654
|
-
### Session Tracking Issues
|
|
655
|
-
|
|
656
|
-
**Symptoms**: `session_start` fails or `session_end` can't find session
|
|
657
|
-
|
|
658
|
-
**Solutions**:
|
|
659
|
-
1. Save session ID from `session_start` response
|
|
660
|
-
2. Verify project exists: `openclaw gateway call project_list`
|
|
661
|
-
3. Check for API validation errors in logs
|
|
662
|
-
4. Use `session_list` to find active sessions
|
|
327
|
+
4. Check channel not in `excludeChannels`
|
|
663
328
|
|
|
664
329
|
### Known Limitations
|
|
665
330
|
|
|
666
|
-
**API Issues** (reported to MemoryRelay team):
|
|
667
331
|
- `memory_batch_store`: May return 500 errors (use individual `memory_store` as workaround)
|
|
668
332
|
- `memory_context`: Returns 405 Method Not Allowed (use `memory_recall` instead)
|
|
669
|
-
- `entity_create`: May fail with 422 validation errors
|
|
670
|
-
- `decision_record`: May fail with 422 validation errors
|
|
671
|
-
- `session_start`: May fail with 422 validation errors
|
|
672
|
-
|
|
673
|
-
**Workarounds**:
|
|
674
|
-
- Use alternative tools where available
|
|
675
|
-
- Check GitHub Issues for latest status
|
|
676
|
-
- Enable debug mode to capture full error details
|
|
677
|
-
|
|
678
|
-
## Changelog
|
|
679
|
-
|
|
680
|
-
### v0.12.7 (2026-03-06)
|
|
681
|
-
|
|
682
|
-
**🎯 Tool Factory Pattern Fix - Session Tracking Now Works!**
|
|
683
|
-
|
|
684
|
-
- **FIX**: Converted all 39 tools from direct registration to factory pattern for context access
|
|
685
|
-
- **FIX**: Session tracking now works - `ctx.sessionId` properly captured via factory closure
|
|
686
|
-
- **CHANGE**: Tools now registered via `api.registerTool((ctx) => tool)` instead of direct objects
|
|
687
|
-
- **CHANGE**: Removed unused `context?` parameter from execute functions
|
|
688
|
-
- **ROOT CAUSE**: OpenClaw passes context to tool factories at registration time, NOT to execute functions
|
|
689
|
-
- **EVIDENCE**: Examined OpenClaw core source code (`src/plugins/types.ts`, `OpenClawPluginToolFactory`)
|
|
690
|
-
- **AUTOMATION**: Python script converted all 39 tools automatically
|
|
691
|
-
- **IMPACT**: Session-memory linking finally works end-to-end
|
|
692
|
-
- **BACKWARD COMPAT**: Fully compatible, no breaking changes, graceful degradation
|
|
693
|
-
- **RELATED**: Closes #26, part of session tracking fix chain (#24, #25, #226)
|
|
694
|
-
|
|
695
|
-
**Files changed**: 7 files, 5,176 insertions(+), 246 deletions(-)
|
|
696
|
-
**Implementation time**: 1.5 hours
|
|
697
|
-
**Total investigation**: ~7 hours across 6 sessions
|
|
698
|
-
|
|
699
|
-
### v0.12.6 (2026-03-06)
|
|
700
|
-
|
|
701
|
-
**⚠️ Wrong Approach - Superseded by v0.12.7**
|
|
702
|
-
|
|
703
|
-
- **ATTEMPT**: Added context parameter to execute functions
|
|
704
|
-
- **ISSUE**: OpenClaw doesn't pass context to execute - wrong pattern
|
|
705
|
-
- **LESSON**: Should have checked OpenClaw source code first
|
|
706
|
-
|
|
707
|
-
### v0.12.5 (2026-03-06)
|
|
708
|
-
|
|
709
|
-
**🔧 Version String Sync**
|
|
710
|
-
|
|
711
|
-
- **FIX**: Synchronized all version strings across package.json, openclaw.plugin.json, and index.ts
|
|
712
|
-
- **IMPACT**: Gateway now displays correct version (v0.12.5)
|
|
713
|
-
|
|
714
|
-
### v0.12.4 (2026-03-06)
|
|
715
|
-
|
|
716
|
-
**❌ Failed Release**
|
|
717
|
-
|
|
718
|
-
- **ISSUE**: Created git tag before pushing version bump commit
|
|
719
|
-
- **RESULT**: Published to npm without version string updates
|
|
720
|
-
- **LESSON**: Always push commits before tagging releases
|
|
721
|
-
|
|
722
|
-
### v0.12.3 (2026-03-06)
|
|
723
|
-
|
|
724
|
-
**🔗 Session Tracking - Plugin Fix**
|
|
725
|
-
|
|
726
|
-
- **FIX**: Extract session_id from metadata and pass as top-level parameter to API
|
|
727
|
-
- **CHANGE**: Backend expects `{ session_id, content, metadata }`, not `{ content, metadata: { session_id } }`
|
|
728
|
-
- **IMPACT**: Memories now correctly link to sessions in database
|
|
729
|
-
- **RELATED**: Backend fixed in PR #225, plugin integration fixed here
|
|
730
|
-
|
|
731
|
-
### v0.12.2 (2026-03-06)
|
|
732
|
-
|
|
733
|
-
**📚 Documentation & Maintenance Release**
|
|
734
|
-
|
|
735
|
-
- **FIX**: Corrected Node.js requirement from >=18.0.0 to >=20.0.0 (CI uses Node 20, dependencies require 20+)
|
|
736
|
-
- **FIX**: Version string in plugin load message now shows correct version (was hardcoded to 0.12.0)
|
|
737
|
-
- **DOCS**: Complete Phase 1 features documentation added
|
|
738
|
-
- **DOCS**: Updated `autoCapture` configuration with tier system details
|
|
739
|
-
- **DOCS**: Added v0.12.0 and v0.12.1 changelog entries (were missing)
|
|
740
|
-
- **DOCS**: Clarified gateway methods vs CLI commands
|
|
741
|
-
- **DOCS**: Added troubleshooting for Phase 1 features
|
|
742
|
-
|
|
743
|
-
### v0.12.1 (2026-03-06)
|
|
744
|
-
|
|
745
|
-
**🐛 Bugfix Release**
|
|
746
|
-
|
|
747
|
-
- **FIX**: Include `src/` directory in npm package (Phase 1 modules were missing)
|
|
748
|
-
- **FIX**: Package.json `files` array now includes `src/` for heartbeat, cli, and onboarding modules
|
|
749
|
-
- **IMPACT**: Critical fix - v0.12.0 was non-functional without src/ directory
|
|
750
|
-
|
|
751
|
-
### v0.12.0 (2026-03-06)
|
|
752
|
-
|
|
753
|
-
**🎉 Phase 1: Zero-Friction Adoption Framework**
|
|
754
|
-
|
|
755
|
-
- **NEW**: Smart auto-capture with 4 privacy tiers (off/conservative/smart/aggressive)
|
|
756
|
-
- **NEW**: Privacy blocklist for sensitive data (passwords, SSN, credit cards, API keys)
|
|
757
|
-
- **NEW**: Daily memory stats in heartbeat (morning 9 AM, evening 8 PM)
|
|
758
|
-
- **NEW**: CLI stats command with text/JSON output (`memoryrelay:stats`)
|
|
759
|
-
- **NEW**: First-run onboarding wizard with welcome memory
|
|
760
|
-
- **NEW**: Three gateway methods: `memoryrelay:heartbeat`, `memoryrelay:stats`, `memoryrelay:onboarding`
|
|
761
|
-
- **NEW**: Auto-capture default changed from `false` to `smart` tier
|
|
762
|
-
- **NEW**: Modular architecture with `src/` directory (heartbeat, cli, onboarding modules)
|
|
763
|
-
- **CHANGE**: `autoCapture` config accepts boolean (backward compat) or object with tier system
|
|
764
|
-
- **DOCS**: PHASE1_CHANGELOG.md with complete implementation details
|
|
765
|
-
- **TESTS**: All existing tests pass, Phase 1 features validated
|
|
766
|
-
|
|
767
|
-
**Implementation**: 820 lines across 3 new modules
|
|
768
|
-
**Time**: 50 minutes (38% faster than 80-minute estimate)
|
|
769
|
-
**Backward Compatibility**: Fully compatible, no breaking changes
|
|
770
|
-
|
|
771
|
-
### v0.8.0 (2026-03-05)
|
|
772
|
-
|
|
773
|
-
**🚀 Debug & Monitoring Release**
|
|
774
|
-
|
|
775
|
-
- **NEW**: Debug logging system with circular buffer (configurable maxLogEntries)
|
|
776
|
-
- **NEW**: DebugLogger class tracks all API calls with timing, status, errors
|
|
777
|
-
- **NEW**: StatusReporter class provides enhanced status reports
|
|
778
|
-
- **NEW**: 4 CLI commands: `memoryrelay-logs`, `memoryrelay-health`, `memoryrelay-test`, `memoryrelay-metrics`
|
|
779
|
-
- **NEW**: 4 gateway methods: `memoryrelay.logs`, `memoryrelay.health`, `memoryrelay.test`, `memoryrelay.metrics`
|
|
780
|
-
- **NEW**: Performance metrics with p95/p99 latency tracking
|
|
781
|
-
- **NEW**: Enhanced `memory.status` handler with comprehensive reports
|
|
782
|
-
- **NEW**: Debug config options: `debug`, `verbose`, `logFile`, `maxLogEntries`
|
|
783
|
-
- **NEW**: Tool failure tracking and recovery monitoring
|
|
784
|
-
- **NEW**: Request/response capture in verbose mode
|
|
785
|
-
- **NEW**: Persistent file logging option
|
|
786
|
-
- **TESTS**: 92 tests total (73 existing + 19 new for DebugLogger and StatusReporter)
|
|
787
|
-
- **DOCS**: CLI_COMMANDS.md with complete usage guide
|
|
788
|
-
- **DOCS**: Enhanced README with Debug & Monitoring section
|
|
789
|
-
- **DOCS**: Comprehensive troubleshooting guide
|
|
790
|
-
|
|
791
|
-
**Performance**: Minimal overhead when disabled (~0ms), 1-2ms when enabled, 2-5ms in verbose mode
|
|
792
|
-
|
|
793
|
-
### v0.7.0 (2026-03-05)
|
|
794
|
-
|
|
795
|
-
- **NEW**: 39 tools (up from 3) covering full MemoryRelay API surface
|
|
796
|
-
- **NEW**: Session tracking — `session_start`, `session_end`, `session_recall`, `session_list`
|
|
797
|
-
- **NEW**: Decision records — `decision_record`, `decision_list`, `decision_supersede`, `decision_check`
|
|
798
|
-
- **NEW**: Pattern library — `pattern_create`, `pattern_search`, `pattern_adopt`, `pattern_suggest`
|
|
799
|
-
- **NEW**: Project management — `project_register`, `project_list`, `project_info`, relationships, impact analysis, shared patterns, full context loading
|
|
800
|
-
- **NEW**: Enhanced memory tools — project scoping, deduplication, importance scores, three-tier storage, batch store, context building, promotion
|
|
801
|
-
- **NEW**: Agent workflow instructions injected via `before_agent_start` hook
|
|
802
|
-
- **NEW**: Tool group filtering via `enabledTools` config
|
|
803
|
-
- **NEW**: `defaultProject` config for automatic project scoping
|
|
804
|
-
- **FIX**: Workflow instructions now injected regardless of autoRecall setting
|
|
805
333
|
|
|
806
|
-
|
|
334
|
+
## Skills
|
|
807
335
|
|
|
808
|
-
|
|
809
|
-
- **DOCS**: Added comprehensive README and migration guide
|
|
336
|
+
The plugin ships with 8 skills in `skills/` — 5 agent-facing and 3 developer-facing:
|
|
810
337
|
|
|
811
|
-
|
|
338
|
+
- **Agent-facing**: `memory-workflow`, `decision-tracking`, `pattern-management`, `project-orchestration`, `entity-and-context`
|
|
339
|
+
- **Developer-facing**: `codebase-navigation`, `testing-memoryrelay`, `release-process`
|
|
812
340
|
|
|
813
|
-
|
|
814
|
-
- **NEW**: Request timeout (30 seconds)
|
|
815
|
-
- **NEW**: Environment variable fallback support
|
|
816
|
-
- **NEW**: Channel filtering (`excludeChannels` config)
|
|
341
|
+
Skills are loaded via OpenClaw's skill system and provide guided workflows on top of the raw tools.
|
|
817
342
|
|
|
818
343
|
## Development
|
|
819
344
|
|
|
@@ -821,9 +346,9 @@ curl -X POST https://api.memoryrelay.net/v1/memories \
|
|
|
821
346
|
git clone https://github.com/memoryrelay/openclaw-plugin.git
|
|
822
347
|
cd openclaw-plugin
|
|
823
348
|
npm install
|
|
824
|
-
npm test
|
|
825
|
-
npm run test:watch
|
|
826
|
-
npm run test:coverage
|
|
349
|
+
npm test
|
|
350
|
+
npm run test:watch
|
|
351
|
+
npm run test:coverage
|
|
827
352
|
```
|
|
828
353
|
|
|
829
354
|
## License
|