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