@memoryrelay/plugin-memoryrelay-ai 0.13.0 → 0.15.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 CHANGED
@@ -1,125 +1,84 @@
1
- # MemoryRelay AI - OpenClaw Memory Plugin
1
+ # MemoryRelay AI
2
2
 
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)
3
+ **Engineering Knowledge Platform for OpenClaw**
5
4
 
6
- AI-powered long-term memory for OpenClaw agents. Gives your AI assistant persistent memory, project context, architectural decision records, reusable patterns, and session tracking across conversations.
5
+ Persistent memory, architectural decisions, reusable patterns, and project orchestration for AI agents.
7
6
 
8
- ## Features
7
+ [![npm version](https://img.shields.io/npm/v/@memoryrelay/plugin-memoryrelay-ai.svg)](https://www.npmjs.com/package/@memoryrelay/plugin-memoryrelay-ai)
8
+ [![OpenClaw Compatible](https://img.shields.io/badge/OpenClaw-2026.2.26+-blue.svg)](https://openclaw.ai)
9
9
 
10
- - **39 Tools** covering memories, entities, sessions, decisions, patterns, and projects
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
- - **Semantic Search** - Vector-based retrieval finds relevant context by meaning
16
- - **Auto-Recall** - Automatically injects relevant memories into agent context
17
- - **Project-First Workflow** - Agents receive workflow instructions to start with project context
18
- - **Decision Records** - Track and check architectural decisions before making new ones
19
- - **Pattern Library** - Create, search, and adopt reusable conventions across projects
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
24
- - **Tool Group Filtering** - Enable only the tool groups you need
10
+ ## Why MemoryRelay?
25
11
 
26
- ## Installation
12
+ MemoryRelay is designed for engineering teams managing complex, long-running projects. It is not general-purpose Q&A memory.
27
13
 
28
- ### Requirements
14
+ | Feature | MemoryRelay | Mem0 | OpenClaw-Projects |
15
+ |---------|------------|------|-------------------|
16
+ | Semantic search | Yes (pgvector) | Yes | No |
17
+ | Sessions | Yes (auto-sync with OpenClaw sessions) | No | No |
18
+ | Architectural Decision Records | Yes (record, check, supersede) | No | No |
19
+ | Reusable patterns | Yes (create, adopt, suggest) | No | No |
20
+ | Project orchestration | Yes (10 tools, dependency graphs) | No | Basic |
21
+ | Entities / knowledge graph | Yes (create, link, graph) | Yes | No |
22
+ | Multi-agent collaboration | Yes (agent scoping, subagent tracking) | Limited | No |
23
+ | Auto-capture with privacy tiers | Yes (off/conservative/smart/aggressive) | Basic | No |
24
+ | V2 Async Storage | Yes | No | No |
25
+ | Direct commands | 16 | ~5 | 0 |
26
+ | Lifecycle hooks | 13 | 0 | 0 |
27
+ | Tools | 42 | ~10 | 0 |
29
28
 
30
- - OpenClaw >= 2026.2.26
31
- - Node.js >= 20.0.0
32
- - MemoryRelay API key ([get one at memoryrelay.ai](https://memoryrelay.ai))
29
+ ## Quick Start
33
30
 
34
- ### Install via OpenClaw CLI
31
+ **1. Install the plugin**
35
32
 
36
33
  ```bash
37
34
  openclaw plugins install @memoryrelay/plugin-memoryrelay-ai
38
35
  ```
39
36
 
40
- ### Configuration
37
+ **2. Set your API key**
41
38
 
42
39
  ```bash
43
- openclaw config set plugins.entries.plugin-memoryrelay-ai.config '{
44
- "apiKey": "mem_prod_your_key_here",
45
- "agentId": "your-agent-name",
46
- "defaultProject": "my-project",
47
- "autoRecall": true,
48
- "autoCapture": false
49
- }'
50
-
51
- # Or use environment variables
52
40
  export MEMORYRELAY_API_KEY="mem_prod_your_key_here"
53
- export MEMORYRELAY_AGENT_ID="your-agent-name"
54
- export MEMORYRELAY_DEFAULT_PROJECT="my-project"
55
-
56
- # Restart gateway
57
- openclaw gateway restart
58
41
  ```
59
42
 
60
- ## Configuration Options
61
-
62
- | Option | Type | Default | Description |
63
- |--------|------|---------|-------------|
64
- | `apiKey` | string | — | MemoryRelay API key (or `MEMORYRELAY_API_KEY` env var) |
65
- | `agentId` | string | — | Unique agent identifier (or `MEMORYRELAY_AGENT_ID` env var, or agent name) |
66
- | `apiUrl` | string | `https://api.memoryrelay.net` | API endpoint (or `MEMORYRELAY_API_URL` env var) |
67
- | `defaultProject` | string | — | Default project slug applied to sessions, decisions, and memories |
68
- | `enabledTools` | string | `all` | Comma-separated tool groups: `memory`, `entity`, `agent`, `session`, `decision`, `pattern`, `project`, `health` |
69
- | `autoRecall` | boolean | `true` | Inject relevant memories into context each turn |
70
- | `autoCapture` | boolean\|object | `false` | Auto-capture config. Boolean for backward compat, object for tier system: `{enabled, tier, confirmFirst}`. Tiers: `off`, `conservative`, `smart`, `aggressive`. |
71
- | `recallLimit` | number | `5` | Max memories to inject per turn (1-20) |
72
- | `recallThreshold` | number | `0.3` | Minimum similarity score for recall (0-1) |
73
- | `excludeChannels` | string[] | `[]` | Channel IDs to skip auto-recall |
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 |
80
-
81
- ## Smart Auto-Capture
82
-
83
- Four capture modes with built-in privacy protection:
43
+ Or configure inline:
84
44
 
85
- | Tier | When to Use | Privacy Level |
86
- |------|-------------|---------------|
87
- | `off` | Manual storage only | N/A |
88
- | `conservative` | Low-risk conversations only | High (blocks most patterns) |
89
- | `smart` | Balanced automation | Medium (blocks sensitive data) |
90
- | `aggressive` | Maximum capture | Low (minimal blocking) |
45
+ ```bash
46
+ openclaw config set plugins.entries.plugin-memoryrelay-ai.config '{"apiKey": "mem_prod_..."}'
47
+ ```
91
48
 
92
- **Privacy Blocklist** — Automatically filters passwords, API keys, credit card numbers, SSNs, and other sensitive data.
49
+ **3. Verify**
93
50
 
94
- ```json
95
- {
96
- "autoCapture": {
97
- "enabled": true,
98
- "tier": "smart",
99
- "confirmFirst": 5
100
- }
101
- }
102
51
  ```
52
+ /memory-health
53
+ ```
54
+
55
+ Auto-recall and smart auto-capture are enabled by default. The plugin injects relevant memories into context every turn and captures important information automatically.
103
56
 
104
- With `confirmFirst`, the first N captures show confirmation prompts before running silently.
57
+ ## Use Cases
105
58
 
106
- ## Agent Workflow
59
+ **Tech Lead** managing 3+ projects:
60
+ - Record architectural decisions with `decision_record` so future agents (and teammates) check before re-deciding
61
+ - Create reusable patterns (`pattern_create`) and adopt them across projects
62
+ - Use `project_impact` to understand blast radius before cross-cutting changes
107
63
 
108
- The plugin injects workflow instructions into every agent conversation via the `before_agent_start` hook, guiding the AI to follow a project-first approach:
64
+ **DevOps Engineer**:
65
+ - Store infrastructure decisions as ADRs: "Why we chose Fargate over ECS on EC2"
66
+ - Capture runbooks and operational procedures as patterns
67
+ - Track dependencies between services with `project_add_relationship`
109
68
 
110
- 1. **Load context** — `project_context(project)` loads hot-tier memories, active decisions, and adopted patterns
111
- 2. **Start session** `session_start(title, project)` begins tracking work
112
- 3. **Check decisions** `decision_check(query, project)` before architectural choices
113
- 4. **Find patterns** `pattern_search(query)` to find established conventions
114
- 5. **Store findings** — `memory_store(content)` for important information
115
- 6. **Record decisions** — `decision_record(title, rationale)` for significant choices
116
- 7. **End session** — `session_end(session_id, summary)` with accomplishment summary
69
+ **Solo Developer**:
70
+ - Build a personal knowledge base of memories, entities, and decisions
71
+ - Use `memory_recall` for semantic search across everything you have stored
72
+ - Link entities to memories for a navigable knowledge graph
117
73
 
118
- For new projects, the agent is guided to call `project_register()` first.
74
+ **Coding Agent**:
75
+ - Auto-capture learns from conversations without explicit tool calls
76
+ - Pattern adoption ensures consistent code style across sessions
77
+ - Session tracking provides continuity when context windows reset
119
78
 
120
- ## Tool Reference
79
+ ## Features -- 42 Tools by Category
121
80
 
122
- ### Memory Tools (9 tools) group: `memory`
81
+ ### Memory (9 tools) -- group: `memory`
123
82
 
124
83
  | Tool | Description |
125
84
  |------|-------------|
@@ -133,7 +92,7 @@ For new projects, the agent is guided to call `project_register()` first.
133
92
  | `memory_context` | Build a token-budget-aware context window from relevant memories |
134
93
  | `memory_promote` | Update a memory's importance score and tier |
135
94
 
136
- ### Entity Tools (4 tools) group: `entity`
95
+ ### Entity (4 tools) -- group: `entity`
137
96
 
138
97
  | Tool | Description |
139
98
  |------|-------------|
@@ -142,7 +101,7 @@ For new projects, the agent is guided to call `project_register()` first.
142
101
  | `entity_list` | List entities with pagination |
143
102
  | `entity_graph` | Explore an entity's neighborhood in the knowledge graph |
144
103
 
145
- ### Agent Tools (3 tools) group: `agent`
104
+ ### Agent (3 tools) -- group: `agent`
146
105
 
147
106
  | Tool | Description |
148
107
  |------|-------------|
@@ -150,7 +109,7 @@ For new projects, the agent is guided to call `project_register()` first.
150
109
  | `agent_create` | Create a new agent (memory namespace) |
151
110
  | `agent_get` | Get agent details by ID |
152
111
 
153
- ### Session Tools (4 tools) group: `session`
112
+ ### Session (4 tools) -- group: `session`
154
113
 
155
114
  | Tool | Description |
156
115
  |------|-------------|
@@ -159,7 +118,7 @@ For new projects, the agent is guided to call `project_register()` first.
159
118
  | `session_recall` | Get session details and timeline |
160
119
  | `session_list` | List sessions filtered by project or status |
161
120
 
162
- ### Decision Tools (4 tools) group: `decision`
121
+ ### Decision (4 tools) -- group: `decision`
163
122
 
164
123
  | Tool | Description |
165
124
  |------|-------------|
@@ -168,7 +127,7 @@ For new projects, the agent is guided to call `project_register()` first.
168
127
  | `decision_supersede` | Replace a decision with a new one (old is marked superseded) |
169
128
  | `decision_check` | Semantic search for existing decisions before making new ones |
170
129
 
171
- ### Pattern Tools (4 tools) group: `pattern`
130
+ ### Pattern (4 tools) -- group: `pattern`
172
131
 
173
132
  | Tool | Description |
174
133
  |------|-------------|
@@ -177,7 +136,7 @@ For new projects, the agent is guided to call `project_register()` first.
177
136
  | `pattern_adopt` | Adopt an existing pattern for a project |
178
137
  | `pattern_suggest` | Get pattern suggestions based on project stack |
179
138
 
180
- ### Project Tools (10 tools) group: `project`
139
+ ### Project (10 tools) -- group: `project`
181
140
 
182
141
  | Tool | Description |
183
142
  |------|-------------|
@@ -192,7 +151,15 @@ For new projects, the agent is guided to call `project_register()` first.
192
151
  | `project_shared_patterns` | Find patterns shared between two projects |
193
152
  | `project_context` | Load full project context (memories, decisions, patterns, sessions) |
194
153
 
195
- ### Health Tools (1 tool) group: `health`
154
+ ### V2 Async (3 tools) -- group: `v2`
155
+
156
+ | Tool | Description |
157
+ |------|-------------|
158
+ | `memory_store_async` | Store a memory asynchronously and return a job ID |
159
+ | `memory_status` | Check the processing status of an async memory job |
160
+ | `context_build` | Build a ranked context bundle from relevant memories |
161
+
162
+ ### Health (1 tool) -- group: `health`
196
163
 
197
164
  | Tool | Description |
198
165
  |------|-------------|
@@ -200,145 +167,201 @@ For new projects, the agent is guided to call `project_register()` first.
200
167
 
201
168
  ## Direct Commands
202
169
 
203
- These slash commands bypass the LLM and execute immediately in the CLI:
170
+ These slash commands bypass the LLM and execute immediately.
171
+
172
+ ### Inspection Commands
204
173
 
205
174
  | Command | Description |
206
175
  |---------|-------------|
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) |
176
+ | `/memory-search <query>` | Semantic search across stored memories |
177
+ | `/memory-context` | Build ranked context bundle from memories |
178
+ | `/memory-sessions` | List sessions (optional: `active`, `closed`, or project slug) |
179
+ | `/memory-decisions` | List architectural decisions (optional: project slug) |
180
+ | `/memory-patterns` | List or search patterns (optional: search query) |
181
+ | `/memory-entities` | List entities (optional: entity type filter) |
182
+ | `/memory-projects` | List registered projects |
183
+ | `/memory-agents` | List registered agents |
212
184
 
213
- ## Tool Group Filtering
185
+ ### Diagnostic Commands
214
186
 
215
- Only enable the groups you need:
187
+ | Command | Description |
188
+ |---------|-------------|
189
+ | `/memory-status` | Connection status, tool counts, and memory stats |
190
+ | `/memory-stats` | Daily statistics (total, growth, top categories) |
191
+ | `/memory-health` | API health check with response time |
192
+ | `/memory-logs` | Recent debug log entries (optional: limit, tool filter) |
193
+ | `/memory-metrics` | Per-tool call counts, success rates, and latency |
194
+ | `/memory-validate` | Production readiness checks |
195
+ | `/memory-config` | Display current plugin configuration |
216
196
 
217
- ```json
218
- {
219
- "enabledTools": "memory,session,decision"
220
- }
221
- ```
197
+ ### Management Commands
222
198
 
223
- This enables only the memory (9), session (4), and decision (4) tools — 17 tools instead of 39. Useful for reducing tool clutter when you don't need project graphs or pattern management.
199
+ | Command | Description |
200
+ |---------|-------------|
201
+ | `/memory-forget <id>` | Delete a specific memory by ID |
224
202
 
225
- Available groups: `memory`, `entity`, `agent`, `session`, `decision`, `pattern`, `project`, `health`
203
+ ## Configuration Reference
226
204
 
227
- Set to `all` (or omit) to enable everything.
205
+ ```bash
206
+ openclaw config set plugins.entries.plugin-memoryrelay-ai.config '{
207
+ "apiKey": "mem_prod_...",
208
+ "agentId": "iris",
209
+ "defaultProject": "my-api",
210
+ "autoRecall": true,
211
+ "autoCapture": { "enabled": true, "tier": "smart", "confirmFirst": 5 }
212
+ }'
213
+ ```
228
214
 
229
- ## Auto-Recall
215
+ | Key | Type | Default | Description |
216
+ |-----|------|---------|-------------|
217
+ | `apiKey` | string | -- | MemoryRelay API key |
218
+ | `agentId` | string | -- | Unique agent identifier |
219
+ | `apiUrl` | string | `https://api.memoryrelay.net` | API endpoint |
220
+ | `defaultProject` | string | -- | Default project slug for sessions, decisions, and memories |
221
+ | `enabledTools` | string | `all` | Comma-separated tool groups to enable |
222
+ | `autoRecall` | boolean | `true` | Inject relevant memories into context each turn |
223
+ | `autoCapture` | boolean \| object | `true` | Auto-capture config (see tiers below) |
224
+ | `recallLimit` | number | `5` | Max memories injected per turn (1-20) |
225
+ | `recallThreshold` | number | `0.3` | Minimum similarity score for recall (0-1) |
226
+ | `excludeChannels` | string[] | `[]` | Channel IDs to skip auto-recall |
227
+ | `sessionTimeoutMinutes` | number | `120` | Idle time before session auto-close (10-1440) |
228
+ | `sessionCleanupIntervalMinutes` | number | `30` | Stale session check interval (5-360) |
229
+ | `debug` | boolean | `false` | Enable debug logging of API calls |
230
+ | `verbose` | boolean | `false` | Include request/response bodies in logs |
231
+ | `maxLogEntries` | number | `100` | Circular buffer size for in-memory logs (10-10000) |
230
232
 
231
- When `autoRecall: true`, relevant memories are automatically injected into agent context each turn:
233
+ ### Environment Variables
232
234
 
233
- ```
234
- User: "How should I handle authentication in this project?"
235
+ | Variable | Maps to |
236
+ |----------|---------|
237
+ | `MEMORYRELAY_API_KEY` | `apiKey` |
238
+ | `MEMORYRELAY_AGENT_ID` | `agentId` |
239
+ | `MEMORYRELAY_API_URL` | `apiUrl` |
240
+ | `MEMORYRELAY_DEFAULT_PROJECT` | `defaultProject` |
235
241
 
236
- [Plugin searches memories for "authentication"]
237
- [Injects workflow instructions + top 5 relevant memories into context]
238
- Agent uses past decisions and patterns to inform its response
239
- ```
242
+ ### Auto-Capture Tiers
240
243
 
241
- ## Channel Exclusions
244
+ | Tier | Behavior | Use When |
245
+ |------|----------|----------|
246
+ | `off` | Manual `memory_store` only | Full control, no surprises |
247
+ | `conservative` | Captures only low-risk technical facts | Sensitive environments |
248
+ | `smart` (default) | Balanced automation with privacy blocklist | Most teams |
249
+ | `aggressive` | Maximum capture, minimal filtering | Solo prototyping |
242
250
 
243
- Exclude specific channels from auto-recall and workflow injection:
251
+ The `confirmFirst` setting (default: `5`) prompts for confirmation on the first N captures before running silently. The `blocklist` array accepts regex patterns for content that should never be captured.
244
252
 
245
253
  ```json
246
254
  {
247
- "excludeChannels": [
248
- "telegram:group_123456",
249
- "discord:channel_789012"
250
- ]
255
+ "autoCapture": {
256
+ "enabled": true,
257
+ "tier": "smart",
258
+ "confirmFirst": 5,
259
+ "blocklist": ["password", "secret", "Bearer\\s+\\S+"],
260
+ "categories": {
261
+ "credentials": true,
262
+ "preferences": true,
263
+ "technical": true,
264
+ "personal": false
265
+ }
266
+ }
251
267
  }
252
268
  ```
253
269
 
254
- ## Debug & Monitoring
270
+ ## Architecture & Privacy
255
271
 
256
- ### Enable Debug Mode
272
+ ### Data Flow
257
273
 
258
- ```json
259
- {
260
- "debug": true,
261
- "verbose": false,
262
- "maxLogEntries": 1000
263
- }
274
+ ```
275
+ Agent <-> Plugin <-> MemoryRelay API (HTTPS) <-> PostgreSQL + pgvector
264
276
  ```
265
277
 
266
- ### Gateway Methods
278
+ All data in transit is encrypted via HTTPS. The plugin communicates with `api.memoryrelay.net` using bearer token authentication.
267
279
 
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` |
280
+ ### Privacy Controls
278
281
 
279
- ### Debug Log Format
282
+ - **Blocklist regex patterns** in auto-capture config filter passwords, API keys, credit card numbers, SSNs, and other sensitive data before storage
283
+ - **Redaction hooks** on `before_message_write` and `tool_result_persist` apply blocklist patterns to messages and tool results before persistence
284
+ - **No credential storage** by default -- the `personal` category requires explicit opt-in
285
+ - **Channel exclusions** prevent auto-recall on sensitive channels
280
286
 
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.
287
+ ### Multi-Agent Support
282
288
 
283
- ## Privacy & Security
289
+ - Each agent has its own memory namespace via `agentId`
290
+ - Projects, decisions, and patterns are shared across agents
291
+ - Subagent spawning and completion are tracked via lifecycle hooks (`subagent_spawned`, `subagent_ended`)
292
+ - Sender identity is auto-injected into memory metadata for traceability
284
293
 
285
- - **Cloud-Backed** — Memories stored on MemoryRelay servers (HTTPS-encrypted in transit)
286
- - **API Key Auth** — Bearer token authentication
287
- - **Agent Isolation** — Memories scoped per agent ID
288
- - **Channel Filtering** — Exclude sensitive channels from auto-recall
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
294
+ ### Lifecycle Hooks
293
295
 
294
- ## Troubleshooting
296
+ The plugin registers 14 lifecycle hooks:
295
297
 
296
- ### Plugin Not Loading
298
+ | Hook | Purpose |
299
+ |------|---------|
300
+ | `before_agent_start` | Auto-recall and workflow injection |
301
+ | `agent_end` | Auto-capture from completed conversations |
302
+ | `session_start` | Auto-create MemoryRelay session from OpenClaw session |
303
+ | `session_end` | Auto-end MemoryRelay session |
304
+ | `before_tool_call` | Reserved for future tool blocking/audit |
305
+ | `after_tool_call` | Session activity tracking and metrics |
306
+ | `before_compaction` | Save key context before compaction |
307
+ | `before_reset` | Save key context before session reset |
308
+ | `message_received` | Activity timestamp updates |
309
+ | `message_sending` | Reserved for future extensibility |
310
+ | `before_message_write` | Privacy redaction |
311
+ | `subagent_spawned` | Track multi-agent collaboration |
312
+ | `subagent_ended` | Store subagent completion summaries |
313
+ | `tool_result_persist` | Privacy redaction on tool results |
297
314
 
298
- ```bash
299
- # Check if installed
300
- npm list -g @memoryrelay/plugin-memoryrelay-ai
315
+ ### Skills
301
316
 
302
- # Reinstall if needed
303
- openclaw plugins install @memoryrelay/plugin-memoryrelay-ai --force
317
+ The plugin ships with 9 skills providing guided workflows on top of the raw tools:
304
318
 
305
- # Restart gateway
306
- openclaw gateway restart
319
+ - **Agent-facing**: `memory-workflow`, `decision-tracking`, `pattern-management`, `project-orchestration`, `entity-and-context`
320
+ - **Developer-facing**: `codebase-navigation`, `testing-memoryrelay`, `release-process`
307
321
 
308
- # Check logs for errors
309
- openclaw gateway logs | grep memoryrelay
310
- ```
322
+ ## Troubleshooting
311
323
 
312
- ### API Connection Issues
324
+ ### Connection refused / API key issues
313
325
 
314
326
  ```bash
315
- # Test API directly
316
- curl -H "X-API-Key: YOUR_KEY" https://api.memoryrelay.net/v1/health
327
+ # Test the API directly
328
+ curl -H "X-API-Key: $MEMORYRELAY_API_KEY" https://api.memoryrelay.net/v1/health
317
329
 
318
- # Check gateway logs
319
- openclaw gateway logs -f | grep memory-memoryrelay
330
+ # Check plugin status
331
+ /memory-health
332
+
333
+ # Run full validation
334
+ /memory-validate
320
335
  ```
321
336
 
322
- ### Auto-Recall Not Working
337
+ If `/memory-health` shows `connected: false`, verify your API key is set correctly via environment variable or config. Keys start with `mem_prod_`.
323
338
 
324
- 1. Verify `autoRecall: true` in config
325
- 2. Check memories exist: `openclaw gateway-call memory_list '{"limit": 10}'`
326
- 3. Lower `recallThreshold` (try 0.1) for more results
327
- 4. Check channel not in `excludeChannels`
339
+ ### Auto-recall not working
328
340
 
329
- ### Known Limitations
341
+ 1. Confirm `autoRecall` is `true` (it is by default)
342
+ 2. Verify memories exist: run `/memory-search test` to check
343
+ 3. Lower `recallThreshold` to `0.1` for broader matching
344
+ 4. Check your channel is not in `excludeChannels`
345
+ 5. Run `/memory-status` to see the full plugin state
330
346
 
331
- - `memory_batch_store`: May return 500 errors (use individual `memory_store` as workaround)
332
- - `memory_context`: Returns 405 Method Not Allowed (use `memory_recall` instead)
347
+ ### Debug logging
333
348
 
334
- ## Skills
349
+ Enable debug mode to see all API calls:
335
350
 
336
- The plugin ships with 8 skills in `skills/` — 5 agent-facing and 3 developer-facing:
351
+ ```json
352
+ {
353
+ "debug": true,
354
+ "verbose": true,
355
+ "maxLogEntries": 1000
356
+ }
357
+ ```
337
358
 
338
- - **Agent-facing**: `memory-workflow`, `decision-tracking`, `pattern-management`, `project-orchestration`, `entity-and-context`
339
- - **Developer-facing**: `codebase-navigation`, `testing-memoryrelay`, `release-process`
359
+ Then inspect with `/memory-logs` or `/memory-metrics` to identify slow or failing calls.
340
360
 
341
- Skills are loaded via OpenClaw's skill system and provide guided workflows on top of the raw tools.
361
+ ### Known Limitations
362
+
363
+ - `memory_batch_store`: May return 500 errors on large batches (use individual `memory_store` as workaround)
364
+ - `memory_context`: Returns 405 Method Not Allowed on some API versions (use `memory_recall` instead)
342
365
 
343
366
  ## Development
344
367
 
@@ -347,17 +370,14 @@ git clone https://github.com/memoryrelay/openclaw-plugin.git
347
370
  cd openclaw-plugin
348
371
  npm install
349
372
  npm test
350
- npm run test:watch
351
- npm run test:coverage
352
373
  ```
353
374
 
354
- ## License
355
-
356
- MIT License - see [LICENSE](./LICENSE) file
357
-
358
375
  ## Links
359
376
 
360
377
  - **MemoryRelay**: https://memoryrelay.ai
361
378
  - **OpenClaw**: https://docs.openclaw.ai
362
379
  - **Repository**: https://github.com/memoryrelay/openclaw-plugin
363
- - **Issues**: https://github.com/memoryrelay/openclaw-plugin/issues
380
+
381
+ ## License
382
+
383
+ MIT