@memoryrelay/plugin-memoryrelay-ai 0.2.4 → 0.3.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 +63 -0
- package/index.ts +15 -13
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,51 @@ npm install -g @memoryrelay/plugin-memoryrelay-ai
|
|
|
28
28
|
|
|
29
29
|
## Quick Start
|
|
30
30
|
|
|
31
|
+
### 1. Install the plugin
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Configure API credentials
|
|
38
|
+
|
|
39
|
+
**Option A: Config file** (recommended)
|
|
40
|
+
```bash
|
|
41
|
+
cat ~/.openclaw/openclaw.json | jq '.plugins.entries."plugin-memoryrelay-ai".config = {
|
|
42
|
+
"apiKey": "YOUR_API_KEY",
|
|
43
|
+
"agentId": "YOUR_AGENT_ID",
|
|
44
|
+
"autoRecall": true,
|
|
45
|
+
"autoCapture": false
|
|
46
|
+
}' > /tmp/config.json && \
|
|
47
|
+
mv /tmp/config.json ~/.openclaw/openclaw.json && \
|
|
48
|
+
chmod 600 ~/.openclaw/openclaw.json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Option B: Environment variables**
|
|
52
|
+
```bash
|
|
53
|
+
export MEMORYRELAY_API_KEY="YOUR_API_KEY"
|
|
54
|
+
export MEMORYRELAY_AGENT_ID="YOUR_AGENT_ID"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 3. Restart the gateway
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
openclaw gateway restart
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 4. Verify it's working
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
openclaw status
|
|
67
|
+
# Should show: Memory | enabled (plugin plugin-memoryrelay-ai)
|
|
68
|
+
|
|
69
|
+
# Check logs
|
|
70
|
+
journalctl -u openclaw-gateway --since '1 minute ago' | grep memory-memoryrelay
|
|
71
|
+
# Should show: "connected to api.memoryrelay.net"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Get your API key from [memoryrelay.ai](https://memoryrelay.ai).
|
|
75
|
+
|
|
31
76
|
### 1. Get API Key
|
|
32
77
|
|
|
33
78
|
Sign up at [memoryrelay.io](https://memoryrelay.io) or use the public demo API.
|
|
@@ -396,6 +441,24 @@ MIT © 2026 MemoryRelay
|
|
|
396
441
|
|
|
397
442
|
## Changelog
|
|
398
443
|
|
|
444
|
+
### v0.3.0 (2026-02-13) - Better Installation UX
|
|
445
|
+
|
|
446
|
+
**Improved Installation Experience:**
|
|
447
|
+
- ✅ API key can now come from `MEMORYRELAY_API_KEY` env var
|
|
448
|
+
- ✅ Agent ID can come from `MEMORYRELAY_AGENT_ID` env var or defaults to "default"
|
|
449
|
+
- ✅ Clear error message with setup instructions when config is missing
|
|
450
|
+
- ✅ Comprehensive installation guide in README
|
|
451
|
+
- ✅ No more silent failures - helpful error messages
|
|
452
|
+
|
|
453
|
+
**Breaking Change:**
|
|
454
|
+
- Debug logging removed (replaced with helpful error messages)
|
|
455
|
+
|
|
456
|
+
**Migration:**
|
|
457
|
+
Works out of the box with env vars, or add config after install:
|
|
458
|
+
```bash
|
|
459
|
+
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
|
|
460
|
+
```
|
|
461
|
+
|
|
399
462
|
### v0.2.4 (2026-02-13)
|
|
400
463
|
|
|
401
464
|
**Debug Logging:**
|
package/index.ts
CHANGED
|
@@ -159,25 +159,27 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
159
159
|
|
|
160
160
|
const cfg = api.pluginConfig as MemoryRelayConfig | undefined;
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
162
|
+
// Try to get config from multiple sources
|
|
163
|
+
const apiKey = cfg?.apiKey || process.env.MEMORYRELAY_API_KEY;
|
|
164
|
+
const agentId = cfg?.agentId || process.env.MEMORYRELAY_AGENT_ID || "default";
|
|
166
165
|
|
|
167
|
-
if (!
|
|
168
|
-
api.logger.error(
|
|
166
|
+
if (!apiKey) {
|
|
167
|
+
api.logger.error(
|
|
168
|
+
"memory-memoryrelay: missing API key. Configure in one of these ways:\n" +
|
|
169
|
+
" 1. Add to config: plugins.entries.\"plugin-memoryrelay-ai\".config.apiKey\n" +
|
|
170
|
+
" 2. Set environment variable: MEMORYRELAY_API_KEY\n" +
|
|
171
|
+
" 3. Run: 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\n" +
|
|
172
|
+
"Get your API key from: https://memoryrelay.ai"
|
|
173
|
+
);
|
|
169
174
|
return;
|
|
170
175
|
}
|
|
171
176
|
|
|
172
|
-
|
|
173
|
-
api.logger.error(`memory-memoryrelay: missing agentId in config. Config keys: ${Object.keys(cfg).join(', ')}`);
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
177
|
+
api.logger.info(`memory-memoryrelay: using agentId: ${agentId}`);
|
|
176
178
|
|
|
177
179
|
const client = new MemoryRelayClient(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
cfg
|
|
180
|
+
apiKey,
|
|
181
|
+
agentId,
|
|
182
|
+
cfg?.apiUrl || "https://api.memoryrelay.net",
|
|
181
183
|
);
|
|
182
184
|
|
|
183
185
|
// Verify connection on startup
|
package/openclaw.plugin.json
CHANGED