@memoryrelay/plugin-memoryrelay-ai 0.6.0 → 0.6.2

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,634 +1,305 @@
1
- # OpenClaw Plugin for MemoryRelay AI
1
+ # MemoryRelay AI - OpenClaw Memory Plugin
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@memoryrelay/plugin-memoryrelay-ai)](https://www.npmjs.com/package/@memoryrelay/plugin-memoryrelay-ai)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
3
+ [![npm version](https://img.shields.io/npm/v/@memoryrelay/plugin-memoryrelay-ai.svg)](https://www.npmjs.com/package/@memoryrelay/plugin-memoryrelay-ai)
4
+ [![OpenClaw Compatible](https://img.shields.io/badge/OpenClaw-2026.2.26+-blue.svg)](https://openclaw.ai)
5
5
 
6
- Long-term memory plugin for OpenClaw agents using [MemoryRelay API](https://api.memoryrelay.net).
6
+ AI-powered long-term memory with semantic search for OpenClaw agents. Store memories, recall relevant context automatically, and give your AI assistant true continuity across sessions.
7
7
 
8
8
  ## Features
9
9
 
10
- - 🧠 **Semantic Search** Natural language memory retrieval with vector embeddings
11
- - 🔄 **Auto-Recall** Automatically inject relevant memories into agent context
12
- - 📝 **Auto-Capture** Intelligently detect and store important information
13
- - 🤖 **Multi-Agent** Isolated memory namespaces per agent
14
- - 🛠️ **CLI Tools** Manage memories via `openclaw memoryrelay` commands
15
- - 🔌 **Tool Integration** Three memory tools for AI agents
16
- - 🔗 **Works Alongside Built-in Memory** Extends OpenClaw's local memory with cloud-backed persistence
10
+ - 🧠 **Semantic Search** - Vector-based memory retrieval finds relevant context by meaning, not keywords
11
+ - 🔄 **Auto-Recall** - Automatically injects relevant memories into context on every turn
12
+ - 📝 **Manual Storage** - Store important facts, preferences, and context via `memory_store` tool
13
+ - 🔍 **Smart Filtering** - Channel exclusions to keep memories private (skip group chats)
14
+ - 🛡️ **Retry Logic** - Exponential backoff with 3 attempts for network resilience
15
+ - **Fast** - 50-150ms latency for semantic search
16
+ - 🌐 **Cloud-Backed** - Memories persist across devices and sessions
17
17
 
18
18
  ## Installation
19
19
 
20
- ```bash
21
- openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
22
- ```
20
+ ### Requirements
23
21
 
24
- Or via npm:
22
+ - OpenClaw >= 2026.2.26
23
+ - Node.js >= 18.0.0
24
+ - MemoryRelay API key ([get one at memoryrelay.ai](https://memoryrelay.ai))
25
25
 
26
- ```bash
27
- npm install -g @memoryrelay/plugin-memoryrelay-ai
28
- ```
29
-
30
- ## Quick Start
31
-
32
- ### 1. Install the plugin
26
+ ### Install via OpenClaw CLI
33
27
 
34
28
  ```bash
29
+ # Install from npm
35
30
  openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
36
- ```
37
-
38
- ### 2. Configure API credentials
39
31
 
40
- **Option A: Config file** (recommended)
41
- ```bash
42
- cat ~/.openclaw/openclaw.json | jq '.plugins.entries."plugin-memoryrelay-ai".config = {
43
- "apiKey": "YOUR_API_KEY",
44
- "agentId": "YOUR_AGENT_ID",
45
- "autoRecall": true,
46
- "autoCapture": false
47
- }' > /tmp/config.json && \
48
- mv /tmp/config.json ~/.openclaw/openclaw.json && \
49
- chmod 600 ~/.openclaw/openclaw.json
50
- ```
51
-
52
- **Option B: Environment variables**
53
- ```bash
54
- export MEMORYRELAY_API_KEY="YOUR_API_KEY"
55
- export MEMORYRELAY_AGENT_ID="YOUR_AGENT_ID"
56
- ```
57
-
58
- ### 3. Restart the gateway
59
-
60
- ```bash
61
- openclaw gateway restart
32
+ # Or install from local directory (development)
33
+ openclaw plugins install --link /path/to/plugin-improvements
62
34
  ```
63
35
 
64
- ### 4. Verify it's working
36
+ ### Configuration
65
37
 
66
38
  ```bash
67
- # Test memory storage
68
- openclaw agents <your-agent> --one-shot "Store a test memory: Plugin verification successful"
69
-
70
- # Search for it
71
- openclaw memoryrelay search "plugin verification"
72
-
73
- # Check plugin status
74
- openclaw plugins info plugin-memoryrelay-ai
75
- # Should show: Status: loaded
76
-
77
- # Check logs
78
- journalctl -u openclaw-gateway --since '1 minute ago' | grep memory-memoryrelay
79
- # Should show: "memory-memoryrelay: connected to https://api.memoryrelay.net"
80
- ```
81
-
82
- **Note**: `openclaw status` may show "unavailable" due to an OpenClaw display bug (see [Known Limitations](#known-limitations)). This is cosmetic only - if the plugin shows "loaded" and logs show "connected", the plugin is working correctly.
83
-
84
- ### 1. Get API Key
85
-
86
- Sign up at [memoryrelay.io](https://memoryrelay.io) or use the public demo API.
87
-
88
- ### 2. Configure
89
-
90
- Add to your `~/.openclaw/openclaw.json`:
91
-
92
- ```json
93
- {
94
- "plugins": {
95
- "slots": {
96
- "memory": "plugin-memoryrelay-ai"
97
- },
98
- "entries": {
99
- "plugin-memoryrelay-ai": {
100
- "enabled": true,
101
- "config": {
102
- "apiKey": "mem_prod_...",
103
- "agentId": "my-agent",
104
- "apiUrl": "https://api.memoryrelay.net",
105
- "autoRecall": true,
106
- "autoCapture": false
107
- }
108
- }
109
- }
110
- }
111
- }
112
- ```
39
+ # Set configuration
40
+ openclaw config set plugins.entries.plugin-memoryrelay-ai.config '{
41
+ "apiKey": "mem_prod_your_key_here",
42
+ "agentId": "your-agent-name",
43
+ "autoRecall": true,
44
+ "autoCapture": false,
45
+ "recallLimit": 5
46
+ }'
113
47
 
114
- ### 3. Restart Gateway
48
+ # Or use environment variables
49
+ export MEMORYRELAY_API_KEY="mem_prod_your_key_here"
50
+ export MEMORYRELAY_AGENT_ID="your-agent-name"
115
51
 
116
- ```bash
52
+ # Restart gateway
117
53
  openclaw gateway restart
118
54
  ```
119
55
 
120
- ### 4. Test Connection
56
+ ## Configuration Options
121
57
 
122
- ```bash
123
- openclaw memoryrelay status
124
- ```
58
+ | Option | Type | Default | Description |
59
+ |--------|------|---------|-------------|
60
+ | `apiKey` | string | (required) | MemoryRelay API key (or use `MEMORYRELAY_API_KEY` env var) |
61
+ | `agentId` | string | (required) | Unique agent identifier (or use `MEMORYRELAY_AGENT_ID` env var) |
62
+ | `apiUrl` | string | `https://api.memoryrelay.net` | MemoryRelay API endpoint |
63
+ | `autoRecall` | boolean | `true` | Automatically inject relevant memories into context |
64
+ | `autoCapture` | boolean | `false` | Automatically capture important information (privacy sensitive) |
65
+ | `recallLimit` | number | `5` | Maximum memories to inject per turn (1-20) |
66
+ | `recallThreshold` | number | `0.3` | Minimum similarity score for recall (0-1) |
67
+ | `excludeChannels` | string[] | `[]` | Channel IDs to skip auto-recall (e.g., `["telegram:group_123"]`) |
125
68
 
126
69
  ## Usage
127
70
 
128
- ### AI Agent Tools
129
-
130
- The plugin provides three tools your AI agent can use:
71
+ ### Memory Tools (Manual Storage)
131
72
 
132
- #### `memory_store`
73
+ When auto-capture is disabled (recommended), use these tools to store memories:
133
74
 
134
- Store a new memory with optional metadata.
135
-
136
- > **Note**: The `agent_id` parameter is automatically injected from your config. You don't need to include it.
137
-
138
- **Parameters:**
139
- - `content` (string, required) - Memory content (1-50,000 characters)
140
- - `metadata` (object, optional) - Key-value metadata (max 10KB when serialized)
141
-
142
- **Example:**
143
75
  ```typescript
76
+ // Store a memory
144
77
  memory_store({
145
- content: "User prefers concise bullet-point responses",
146
- metadata: { category: "preferences", importance: "high" }
78
+ content: "User prefers concise responses over long explanations",
79
+ metadata: { category: "preference", topic: "communication" }
147
80
  })
148
- ```
149
81
 
150
- **Returns:** Memory object with `id`, `content`, `agent_id`, `metadata`, `created_at`, `updated_at`
151
-
152
- **Rate Limit**: 30 requests per minute
153
-
154
- #### `memory_recall`
155
-
156
- Search memories using semantic similarity.
157
-
158
- **Parameters:**
159
- - `query` (string, required) - Natural language search query
160
- - `limit` (number, optional, default: 10) - Maximum results (1-50)
161
- - `threshold` (number, optional, default: 0.5) - Minimum similarity score (0-1)
162
-
163
- **Example:**
164
- ```typescript
82
+ // Search memories
165
83
  memory_recall({
166
- query: "user communication preferences",
167
- limit: 5,
168
- threshold: 0.7
84
+ query: "communication preferences",
85
+ limit: 5
169
86
  })
170
- ```
171
87
 
172
- **Returns:** Array of search results with `memory` object and `score` (0-1):
173
- ```json
174
- {
175
- "results": [
176
- {
177
- "memory": {
178
- "id": "550e8400-...",
179
- "content": "User prefers concise bullet-point responses",
180
- "metadata": { "category": "preferences" },
181
- "created_at": 1707649200
182
- },
183
- "score": 0.89
184
- }
185
- ]
186
- }
88
+ // Delete a memory
89
+ memory_forget({
90
+ memoryId: "mem_abc123"
91
+ })
187
92
  ```
188
93
 
189
- #### `memory_forget`
94
+ ### Auto-Recall (Automatic Context Injection)
190
95
 
191
- Delete a memory by ID or search query.
96
+ When `autoRecall: true`, the plugin automatically searches and injects relevant memories on every turn:
192
97
 
193
- **Parameters:**
194
- - `memoryId` (string, optional) - Memory UUID to delete
195
- - `query` (string, optional) - Search query (shows candidates if multiple matches)
196
-
197
- **Examples:**
198
- ```typescript
199
- // By ID
200
- memory_forget({ memoryId: "550e8400-..." })
201
-
202
- // By query (interactive if multiple matches)
203
- memory_forget({ query: "outdated preference" })
204
98
  ```
99
+ User: "What's my API key for NorthRelay?"
205
100
 
206
- **Returns:** Success confirmation
207
-
208
- ### Status Monitoring
209
-
210
- Check plugin status directly (don't rely on `openclaw status` - see [Known Limitations](#known-limitations)):
211
-
212
- ```bash
213
- # Check plugin loaded
214
- openclaw plugins info plugin-memoryrelay-ai
215
-
216
- # Check connection via logs
217
- journalctl -u openclaw-gateway -f | grep memory-memoryrelay
218
-
219
- # Test tools directly
220
- openclaw memoryrelay search "test query"
101
+ [Plugin searches memories for "API key NorthRelay"]
102
+ [Injects top 5 relevant memories into context]
103
+ Agent: "Your NorthRelay API key is nr_live_..."
221
104
  ```
222
105
 
223
- ### CLI Commands
224
-
225
- ```bash
226
- # Check status
227
- openclaw memoryrelay status
228
-
229
- # List recent memories
230
- openclaw memoryrelay list --limit 10
231
-
232
- # Search memories
233
- openclaw memoryrelay search "API configuration"
234
- ```
106
+ ### Channel Exclusions (Privacy)
235
107
 
236
- ### Auto-Recall
108
+ Exclude specific channels from auto-recall to keep memories private:
237
109
 
238
- When `autoRecall: true`, relevant memories are automatically injected before each agent turn:
239
-
240
- ```xml
241
- <relevant-memories>
242
- The following memories from MemoryRelay may be relevant:
243
- - User prefers concise responses
244
- - Project uses TypeScript with strict mode
245
- - ...
246
- </relevant-memories>
110
+ ```json
111
+ {
112
+ "excludeChannels": [
113
+ "telegram:group_123456",
114
+ "discord:channel_789012",
115
+ "whatsapp:group_345678@g.us"
116
+ ]
117
+ }
247
118
  ```
248
119
 
249
- **Config:**
250
- - `recallLimit`: Max memories (default: 5)
251
- - `recallThreshold`: Min similarity score (default: 0.3)
252
-
253
- ### Auto-Capture
254
-
255
- When `autoCapture: true`, the plugin detects and stores important information automatically.
256
-
257
- **Patterns detected:**
258
- - "remember that..."
259
- - "my name/email/phone is..."
260
- - "important: ..."
261
- - API keys, SSH configs, preferences
262
-
263
- **Note:** Disabled by default for privacy.
120
+ ## What to Store
264
121
 
265
- ## Configuration
122
+ ### ✅ Good Candidates for Memory Storage
266
123
 
267
- | Field | Type | Required | Default | Description |
268
- |-------|------|----------|---------|-------------|
269
- | `apiKey` | string | | - | MemoryRelay API key |
270
- | `agentId` | string | | - | Unique agent identifier |
271
- | `apiUrl` | string | No | `api.memoryrelay.net` | API endpoint |
272
- | `autoRecall` | boolean | No | `true` | Auto-inject memories |
273
- | `autoCapture` | boolean | No | `false` | Auto-store information |
274
- | `recallLimit` | number | No | `5` | Max memories to inject |
275
- | `recallThreshold` | number | No | `0.3` | Similarity threshold (0-1) |
124
+ - **API Keys & Credentials** - `"NorthRelay API key: nr_live_..."`
125
+ - **Infrastructure** - `"Production server: 51.161.10.58, SSH port 2222"`
126
+ - **Commands** - `"Deploy command: cd /opt/app && docker compose up -d"`
127
+ - **Preferences** - `"User prefers Python over JavaScript for data analysis"`
128
+ - **Project Context** - `"NorthRelay uses Next.js 16, Prisma 6, PostgreSQL 15"`
129
+ - **Lessons Learned** - `"Always run git pull before deploying to avoid conflicts"`
276
130
 
277
- ### Environment Variables
131
+ ### Don't Store
278
132
 
279
- Alternatively, use environment variables:
133
+ - Routine conversation (`"how are you?"`)
134
+ - Temporary context (one-time questions)
135
+ - Already well-documented info (in README, docs)
136
+ - Personal secrets user explicitly says not to store
280
137
 
281
- ```bash
282
- export MEMORYRELAY_API_KEY="mem_prod_..."
283
- export MEMORYRELAY_AGENT_ID="my-agent"
284
- ```
138
+ ## Memory Lifecycle
285
139
 
286
- Then reference in config:
287
- ```json
288
- {
289
- "apiKey": "${MEMORYRELAY_API_KEY}",
290
- "agentId": "${MEMORYRELAY_AGENT_ID}"
291
- }
292
- ```
140
+ 1. **Store** - Call `memory_store` with content + metadata
141
+ 2. **Recall** - MemoryRelay auto-injects on relevant turns (or manual `memory_recall`)
142
+ 3. **Update** - Store again with same key to update
143
+ 4. **Forget** - Call `memory_forget` to delete
293
144
 
294
145
  ## Architecture
295
146
 
296
- MemoryRelay works **alongside** OpenClaw's built-in memory system (not as a replacement):
297
-
298
- **OpenClaw Built-in Memory** (local):
299
- - Workspace files (`MEMORY.md`, `memory/*.md`)
300
- - Fast local access, version control friendly
301
- - Tools: `memory_search`, `memory_get`
302
- - Scope: Per-agent, stays on disk
303
-
304
- **MemoryRelay Plugin** (cloud):
305
- - Cloud-backed API storage
306
- - Cross-agent sharing, persistent
307
- - Tools: `memory_store`, `memory_recall`, `memory_forget`
308
- - Scope: Shared across agents, 900+ memories
309
-
310
- **Both systems run together** - use built-in for local context, MemoryRelay for long-term cross-agent knowledge.
311
-
312
147
  ```
313
- ┌─────────────────────┐ ┌─────────────────────┐
314
- Built-in Memory │ MemoryRelay Plugin │
315
- (Local Files) │ │ (Cloud API)
316
- ├─────────────────────┤ ├─────────────────────┤
317
- memory_search │ │ memory_store │
318
- │ memory_get │ │ memory_recall │
319
- memory_forget │
320
- └──────────┬──────────┘ └──────────┬──────────┘
321
-
322
- └─────────────┬───────────────┘
323
-
324
-
325
- ┌─────────────────┐
326
- OpenClaw Agent
327
- └─────────────────┘
148
+ ┌─────────────────┐
149
+ OpenClaw
150
+ Agent
151
+ └────────┬────────┘
152
+
153
+ ┌────┴─────┐
154
+ Plugin ← This plugin
155
+ └────┬─────┘
156
+
157
+ │ HTTPS (Bearer auth)
158
+
159
+ ┌─────────────────┐
160
+ │ MemoryRelay │
161
+ API
162
+ │ (Vector Search) │
163
+ └─────────────────┘
328
164
  ```
329
165
 
330
- ## Known Limitations
331
-
332
- ### Status Display Issue
333
-
334
- **Symptom**: `openclaw status` shows "Memory: unavailable" even when plugin is working.
166
+ ## Privacy & Security
335
167
 
336
- **Root Cause**: OpenClaw's status command checks the built-in MemoryIndexManager, not plugin tools. This is an OpenClaw architecture limitation, not a bug in this plugin.
168
+ - **Cloud-Backed** - Memories stored on MemoryRelay servers (HTTPS-encrypted)
169
+ - **API Key Auth** - Bearer token authentication
170
+ - **Agent Isolation** - Memories scoped per agent ID
171
+ - **Channel Filtering** - Exclude sensitive channels from auto-recall
172
+ - **No Auto-Capture by Default** - Manual storage gives you full control
337
173
 
338
- **Impact**: Cosmetic only - all plugin functionality works perfectly:
339
- - ✅ memory_store, memory_recall, memory_forget tools work
340
- - ✅ AutoRecall and AutoCapture work
341
- - ✅ API connectivity works (921 memories stored)
342
- - ❌ Status display shows wrong system
174
+ **Privacy Tip:** For ultra-sensitive data (private keys, passwords), use encrypted local files instead of cloud memory.
343
175
 
344
- **Workaround**: Verify plugin functionality directly instead of relying on status:
176
+ ## CLI Commands
345
177
 
346
178
  ```bash
347
- # 1. Check plugin loaded
179
+ # Check plugin status
348
180
  openclaw plugins info plugin-memoryrelay-ai
349
- # Should show: Status: loaded
350
-
351
- # 2. Check logs for connection
352
- journalctl -u openclaw-gateway --since '1 minute ago' | grep memory-memoryrelay
353
- # Should show: "memory-memoryrelay: connected to https://api.memoryrelay.net"
354
181
 
355
- # 3. Test memory_store tool
356
- openclaw agents <your-agent> --one-shot "Store test: Plugin works"
182
+ # List all plugins
183
+ openclaw plugins list
357
184
 
358
- # 4. Test memory_recall tool
359
- openclaw memoryrelay search "plugin works"
185
+ # Enable/disable
186
+ openclaw plugins enable plugin-memoryrelay-ai
187
+ openclaw plugins disable plugin-memoryrelay-ai
360
188
 
361
- # 5. Check API directly
362
- curl -H "X-API-Key: YOUR_KEY" https://api.memoryrelay.net/v1/memories?agent_id=YOUR_AGENT&limit=1
189
+ # Uninstall
190
+ openclaw plugins uninstall plugin-memoryrelay-ai
363
191
  ```
364
192
 
365
- **Why This Happens**: OpenClaw has two separate memory systems:
366
- 1. `memory.backend` (top-level, status checks this)
367
- 2. `plugins.slots.memory` (plugin tools, status ignores this)
368
-
369
- Our plugin provides tools (#2), but status checks the backend (#1). Fixing this requires OpenClaw core changes to check plugin status when a memory slot is configured.
370
-
371
- **Upstream Issue**: Tracked in [openclaw/openclaw#TBD](https://github.com/openclaw/openclaw/issues) (pending)
372
-
373
193
  ## Troubleshooting
374
194
 
375
195
  ### Plugin Not Loading
376
196
 
377
197
  ```bash
378
- # Check plugin status
198
+ # Check if plugin is discovered
379
199
  openclaw plugins list | grep memoryrelay
380
200
 
381
- # View config validation
382
- openclaw doctor
201
+ # Verify config
202
+ openclaw config get plugins.entries.plugin-memoryrelay-ai
383
203
 
384
204
  # Check logs
385
- journalctl -u openclaw-gateway -f
205
+ openclaw logs --tail 100 | grep memory
386
206
  ```
387
207
 
388
- ### Connection Failed
208
+ ### API Connection Issues
389
209
 
390
210
  ```bash
391
- # Test API directly
392
- curl https://api.memoryrelay.net/v1/health
393
-
394
- # Check API key
395
- openclaw memoryrelay status
211
+ # Test API connection
212
+ curl -H "Authorization: Bearer YOUR_API_KEY" \
213
+ https://api.memoryrelay.net/v1/memories
396
214
  ```
397
215
 
398
- ### No Memories Returned
399
-
400
- - Check `recallThreshold` (lower = more results)
401
- - Verify `agentId` matches your API agent
402
- - Try broader search queries
403
-
404
- ## Security
216
+ ### OpenClaw 2026.2.26 Compatibility
405
217
 
406
- - API keys stored in `openclaw.json` (not committed to git)
407
- - Supports environment variable substitution
408
- - Auto-capture disabled by default (privacy)
409
- - No hardcoded credentials
410
-
411
- **Best Practices:**
412
- - Use environment variables in production
413
- - Never commit `openclaw.json` with real keys
414
- - Rotate API keys regularly
415
- - Review auto-captured memories periodically
416
-
417
- ## Development
418
-
419
- ### File Structure
420
-
421
- ```
422
- openclaw-plugin/
423
- ├── index.ts # Plugin implementation
424
- ├── openclaw.plugin.json # Plugin manifest
425
- ├── package.json # NPM metadata
426
- ├── LICENSE # MIT license
427
- └── README.md # This file
428
- ```
429
-
430
- ### Testing
218
+ If you see `extension entry escapes package directory`, you're using an older plugin version. Update to v0.6.2+:
431
219
 
432
220
  ```bash
433
- # Install locally
434
- openclaw plugins install --link .
435
-
436
- # Test tools
437
- # (via agent conversation or CLI)
438
-
439
- # View logs
440
- tail -f ~/.openclaw/logs/gateway.log
221
+ openclaw plugins uninstall plugin-memoryrelay-ai
222
+ openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
441
223
  ```
442
224
 
443
- ## Related Projects
225
+ See [OPENCLAW-2026.2.26-MIGRATION.md](./OPENCLAW-2026.2.26-MIGRATION.md) for details.
444
226
 
445
- - **MemoryRelay API** — REST API backend (FastAPI + PostgreSQL)
446
- - **MCP Server** — [`memoryrelay-mcp-server`](https://www.npmjs.com/package/memoryrelay-mcp-server) for Claude Desktop
447
- - **Python SDK** — `memoryrelay` on PyPI (coming soon)
227
+ ## Changelog
448
228
 
449
- ## Contributing
229
+ ### v0.6.2 (2026-03-01)
450
230
 
451
- Contributions welcome! Please:
231
+ - **FIX**: OpenClaw 2026.2.26 compatibility - Changed `extensions` from `["./"]` to `["./index.ts"]`
232
+ - **FIX**: Plugin now installs via `openclaw plugins install` (not npm global)
233
+ - **DOCS**: Added comprehensive README and migration guide
452
234
 
453
- 1. Fork the repository
454
- 2. Create a feature branch
455
- 3. Add tests (if applicable)
456
- 4. Update documentation
457
- 5. Submit a pull request
235
+ ### v0.6.1 (2026-02-18)
458
236
 
459
- ## Support
237
+ - Removed `extensions` field (attempted fix) - **FAILED**
460
238
 
461
- - **Issues**: [GitHub Issues](https://github.com/memoryrelay/openclaw-plugin/issues)
462
- - **Docs**: [memoryrelay.io](https://memoryrelay.io)
463
- - **Discord**: [OpenClaw Community](https://discord.gg/clawd)
239
+ ### v0.6.0 (2026-02-18)
464
240
 
465
- ## License
241
+ - **NEW**: Retry logic with exponential backoff (3 attempts)
242
+ - **NEW**: Request timeout (30 seconds)
243
+ - **NEW**: Environment variable fallback support (`MEMORYRELAY_API_KEY`, `MEMORYRELAY_AGENT_ID`)
244
+ - **NEW**: Channel filtering (`excludeChannels` config)
245
+ - **NEW**: Additional error handling and logging
466
246
 
467
- MIT © 2026 MemoryRelay
247
+ See [CHANGELOG-v0.6.0.md](./CHANGELOG-v0.6.0.md) for details.
468
248
 
469
- ---
249
+ ## Development
470
250
 
471
- ## Changelog
251
+ ### Local Testing
472
252
 
473
- ### v0.5.3 (2026-02-14) - Documentation Update
474
-
475
- **Clarifications:**
476
- - ✅ Documented that plugin works ALONGSIDE built-in memory (not as replacement)
477
- - ✅ Added "Known Limitations" section explaining status display issue
478
- - ✅ Provided verification steps for users (don't rely on `openclaw status`)
479
- - ✅ Clarified architecture: two memory systems working together
480
- - ✅ Explained Voyage comparison (embedding provider vs storage provider)
481
-
482
- **No Code Changes:**
483
- - Plugin functionality unchanged (already working perfectly)
484
- - Tools work: memory_store, memory_recall, memory_forget ✅
485
- - AutoRecall/AutoCapture work ✅
486
- - 921 memories stored in production ✅
487
-
488
- **Key Finding:**
489
- - Status shows "unavailable" because OpenClaw checks built-in MemoryIndexManager, not plugin tools
490
- - This is an OpenClaw architecture limitation requiring upstream fix
491
- - All plugin functionality verified working despite status display
492
-
493
- ### v0.4.0 (2026-02-13) - Status Reporting
494
-
495
- **New Features:**
496
- - ✅ Status reporting via `memory.status` gateway RPC method
497
- - ✅ Plugin now reports "available" in `openclaw status` when API is reachable
498
- - ✅ Memory count reporting (via optional `/v1/stats` API endpoint)
499
- - ✅ Vector availability reporting for semantic search
500
- - ✅ Detailed status information: connected state, endpoint, agent ID, memory count
501
-
502
- **Fixes:**
503
- - ✅ Plugin no longer shows as "unavailable" in `openclaw status` when functional
504
- - ✅ Status accurately reflects API connection state
505
-
506
- **Technical Improvements:**
507
- - ✅ Extracted constants for maintainability (`DEFAULT_API_URL`, `VALID_HEALTH_STATUSES`)
508
- - ✅ Case-insensitive health status validation
509
- - ✅ Proper type safety with nullish coalescing operators
510
- - ✅ Graceful handling of missing stats endpoint (backwards compatible)
511
-
512
- **Backwards Compatibility:**
513
- - Fully compatible with older OpenClaw versions (uses optional chaining)
514
- - Gracefully handles missing `/v1/stats` endpoint
515
-
516
- ### v0.3.0 (2026-02-13) - Better Installation UX
517
-
518
- **Improved Installation Experience:**
519
- - ✅ API key can now come from `MEMORYRELAY_API_KEY` env var
520
- - ✅ Agent ID can come from `MEMORYRELAY_AGENT_ID` env var or defaults to "default"
521
- - ✅ Clear error message with setup instructions when config is missing
522
- - ✅ Comprehensive installation guide in README
523
- - ✅ No more silent failures - helpful error messages
524
-
525
- **Breaking Change:**
526
- - Debug logging removed (replaced with helpful error messages)
527
-
528
- **Migration:**
529
- Works out of the box with env vars, or add config after install:
530
253
  ```bash
531
- cat ~/.openclaw/openclaw.json | jq '.plugins.entries."plugin-memoryrelay-ai".config = {"apiKey": "YOUR_KEY", "agentId": "YOUR_AGENT"}' > /tmp/config.json && mv /tmp/config.json ~/.openclaw/openclaw.json
532
- ```
533
-
534
- ### v0.2.4 (2026-02-13)
535
-
536
- **Debug Logging:**
537
- - Added detailed logging to diagnose config loading issues
538
- - Logs pluginConfig type, keys, and specific missing fields
539
- - Helps identify why apiKey/agentId aren't being read
540
- - Better error messages for troubleshooting
254
+ # Clone repository
255
+ git clone https://github.com/memoryrelay/openclaw-plugin.git
256
+ cd openclaw-plugin
541
257
 
542
- ### v0.2.3 (2026-02-13)
258
+ # Install dev dependencies
259
+ npm install
543
260
 
544
- **Critical Fix:**
545
- - Fixed API endpoint paths - removed duplicate `/memories` segment
546
- - Changed `/v1/memories/memories` → `/v1/memories`
547
- - Changed `/v1/memories/memories/{id}` → `/v1/memories/{id}`
548
- - Fixed 405 Method Not Allowed errors
549
- - All CRUD operations now work correctly
261
+ # Run tests
262
+ npm test
550
263
 
551
- ### v0.2.2 (2026-02-13)
552
-
553
- **Critical Fix:**
554
- - Fixed tool registration API - changed `inputSchema` to `parameters`
555
- - Fixed handler signature - changed `handler` to `execute` with `_id` parameter
556
- - Tools now register correctly with OpenClaw
557
- - Memory storage/recall/forget now functional
558
- - Plugin shows as "available" instead of "unavailable"
559
-
560
- ### v0.2.1 (2026-02-13)
561
-
562
- **Bug Fix:**
563
- - Made `apiKey` and `agentId` optional in config schema
564
- - Allows installation without pre-configuring credentials
565
- - Plugin auto-detects agentId and supports MEMORYRELAY_API_KEY env var
566
- - Fixes "must have required property" errors during installation
567
-
568
- ### v0.2.0 (2026-02-13) - BREAKING CHANGE
264
+ # Link for local testing
265
+ openclaw plugins install --link .
266
+ ```
569
267
 
570
- **Package Renamed to Fix Warnings:**
571
- - Old: `@memoryrelay/openclaw-plugin`
572
- - New: `@memoryrelay/plugin-memoryrelay-ai`
573
- - Plugin ID remains: `plugin-memoryrelay-ai`
574
- - **Why**: Package name must match plugin ID to avoid config warnings
575
- - **Impact**: No code changes, just package name alignment
268
+ ### Running Tests
576
269
 
577
- **Migration**:
578
270
  ```bash
579
- # Uninstall old package
580
- openclaw plugins uninstall @memoryrelay/openclaw-plugin
581
- # Install new package
582
- openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
271
+ npm test # Run once
272
+ npm run test:watch # Watch mode
273
+ npm run test:coverage # With coverage
583
274
  ```
584
275
 
585
- ### v0.1.2 (2026-02-13)
276
+ ## Contributing
586
277
 
587
- **Bug Fix:**
588
- - Fixed installation directory mismatch by adding `openclaw.id` to package.json
589
- - Plugin now correctly installs to `plugin-memoryrelay-ai` directory
590
- - Resolves "plugin not found" error during `openclaw plugins install`
278
+ Contributions welcome! Please:
591
279
 
592
- ### v0.1.1 (2026-02-13)
280
+ 1. Fork the repository
281
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
282
+ 3. Commit changes (`git commit -m 'Add amazing feature'`)
283
+ 4. Push to branch (`git push origin feature/amazing-feature`)
284
+ 5. Open a Pull Request
593
285
 
594
- **Breaking Changes:**
595
- - Plugin ID changed: `memory-memoryrelay` → `plugin-memoryrelay-ai`
596
- - Update your `openclaw.json` to use new ID in `plugins.slots.memory` and `plugins.entries`
286
+ ## License
597
287
 
598
- **Documentation Improvements:**
599
- - ✅ Added agent_id auto-injection documentation
600
- - ✅ Added size limits (content 1-50K chars, metadata 10KB)
601
- - ✅ Added rate limit info (30 req/min)
602
- - ✅ Enhanced tool documentation with return formats
603
- - ✅ Added response format examples for memory_recall
288
+ MIT License - see [LICENSE](./LICENSE) file
604
289
 
605
- **Migration Guide:**
606
- ```json
607
- {
608
- "plugins": {
609
- "slots": {
610
- "memory": "plugin-memoryrelay-ai" // Changed
611
- },
612
- "entries": {
613
- "plugin-memoryrelay-ai": { // Changed
614
- "enabled": true,
615
- "config": { ... }
616
- }
617
- }
618
- }
619
- }
620
- ```
290
+ ## Links
621
291
 
622
- ### v0.1.0 (2026-02-12)
292
+ - **MemoryRelay API**: https://memoryrelay.ai
293
+ - **OpenClaw Docs**: https://docs.openclaw.ai
294
+ - **Plugin Repository**: https://github.com/memoryrelay/openclaw-plugin
295
+ - **Issues**: https://github.com/memoryrelay/openclaw-plugin/issues
296
+
297
+ ## Support
623
298
 
624
- - Initial release
625
- - Three tools: memory_store, memory_recall, memory_forget
626
- - Auto-recall and auto-capture features
627
- - CLI commands
628
- - Production deployment on 3 agents
299
+ - **Documentation**: https://docs.memoryrelay.ai
300
+ - **Discord**: https://discord.com/invite/clawd (OpenClaw community)
301
+ - **Email**: support@memoryrelay.ai
629
302
 
630
303
  ---
631
304
 
632
- **Homepage**: https://memoryrelay.io
633
- **API**: https://api.memoryrelay.net
634
- **Source**: https://github.com/memoryrelay/openclaw-plugin
305
+ Built with ❤️ for the OpenClaw community