@memoryrelay/plugin-memoryrelay-ai 0.15.5 → 0.15.7
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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Persistent memory, architectural decisions, reusable patterns, and project orchestration for AI agents.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@memoryrelay/plugin-memoryrelay-ai)
|
|
8
|
-
[](https://openclaw.ai)
|
|
9
9
|
|
|
10
10
|
## Why MemoryRelay?
|
|
11
11
|
|
|
@@ -23,7 +23,7 @@ MemoryRelay is designed for engineering teams managing complex, long-running pro
|
|
|
23
23
|
| Auto-capture with privacy tiers | Yes (off/conservative/smart/aggressive) | Basic | No |
|
|
24
24
|
| V2 Async Storage | Yes | No | No |
|
|
25
25
|
| Direct commands | 17 | ~5 | 0 |
|
|
26
|
-
| Lifecycle hooks |
|
|
26
|
+
| Lifecycle hooks | 14 | 0 | 0 |
|
|
27
27
|
| Tools | 42 | ~10 | 0 |
|
|
28
28
|
|
|
29
29
|
## Quick Start
|
|
@@ -382,7 +382,6 @@ Then inspect with `/memory-logs` or `/memory-metrics` to identify slow or failin
|
|
|
382
382
|
### Known Limitations
|
|
383
383
|
|
|
384
384
|
- `memory_batch_store`: May return 500 errors on large batches (use individual `memory_store` as workaround)
|
|
385
|
-
- `memory_context`: Returns 405 Method Not Allowed on some API versions (use `memory_recall` instead)
|
|
386
385
|
|
|
387
386
|
## Development
|
|
388
387
|
|
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OpenClaw Memory Plugin - MemoryRelay
|
|
3
|
-
* Version: 0.15.
|
|
3
|
+
* Version: 0.15.6
|
|
4
4
|
*
|
|
5
5
|
* Long-term memory with vector search using MemoryRelay API.
|
|
6
6
|
* Provides auto-recall and auto-capture via lifecycle hooks.
|
|
@@ -711,7 +711,7 @@ class MemoryRelayClient {
|
|
|
711
711
|
headers: {
|
|
712
712
|
"Content-Type": "application/json",
|
|
713
713
|
Authorization: `Bearer ${this.apiKey}`,
|
|
714
|
-
"User-Agent": "openclaw-memory-memoryrelay/0.15.
|
|
714
|
+
"User-Agent": "openclaw-memory-memoryrelay/0.15.6",
|
|
715
715
|
},
|
|
716
716
|
body: body ? JSON.stringify(body) : undefined,
|
|
717
717
|
},
|
|
@@ -883,9 +883,10 @@ class MemoryRelayClient {
|
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
async list(limit: number = 20, offset: number = 0): Promise<Memory[]> {
|
|
886
|
+
const cappedLimit = Math.min(limit, 100);
|
|
886
887
|
const response = await this.request<{ data: Memory[] }>(
|
|
887
888
|
"GET",
|
|
888
|
-
`/v1/memories?limit=${
|
|
889
|
+
`/v1/memories?limit=${cappedLimit}&offset=${offset}&agent_id=${encodeURIComponent(this.agentId)}`,
|
|
889
890
|
);
|
|
890
891
|
return response.data || [];
|
|
891
892
|
}
|
|
@@ -1624,7 +1625,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
1624
1625
|
// Helper to check if a tool is enabled (by group)
|
|
1625
1626
|
// ========================================================================
|
|
1626
1627
|
|
|
1627
|
-
//
|
|
1628
|
+
// Plugin tool group mapping
|
|
1628
1629
|
const TOOL_GROUPS: Record<string, string[]> = {
|
|
1629
1630
|
memory: [
|
|
1630
1631
|
"memory_store", "memory_recall", "memory_forget", "memory_list",
|
|
@@ -1700,7 +1701,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
1700
1701
|
},
|
|
1701
1702
|
dedup_threshold: {
|
|
1702
1703
|
type: "number",
|
|
1703
|
-
description: "Similarity threshold for deduplication (0-1). Default 0.
|
|
1704
|
+
description: "Similarity threshold for deduplication (0-1). Default 0.95.",
|
|
1704
1705
|
},
|
|
1705
1706
|
project: {
|
|
1706
1707
|
type: "string",
|
|
@@ -2996,6 +2997,11 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
2996
2997
|
description: "Tags for the new decision.",
|
|
2997
2998
|
items: { type: "string" },
|
|
2998
2999
|
},
|
|
3000
|
+
metadata: {
|
|
3001
|
+
type: "object",
|
|
3002
|
+
description: "Optional key-value metadata to attach to the new decision.",
|
|
3003
|
+
additionalProperties: { type: "string" },
|
|
3004
|
+
},
|
|
2999
3005
|
},
|
|
3000
3006
|
required: ["id", "title", "rationale"],
|
|
3001
3007
|
},
|
|
@@ -3007,6 +3013,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3007
3013
|
rationale: string;
|
|
3008
3014
|
alternatives?: string;
|
|
3009
3015
|
tags?: string[];
|
|
3016
|
+
metadata?: Record<string, string>;
|
|
3010
3017
|
},
|
|
3011
3018
|
) => {
|
|
3012
3019
|
try {
|
|
@@ -3016,6 +3023,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3016
3023
|
args.rationale,
|
|
3017
3024
|
args.alternatives,
|
|
3018
3025
|
args.tags,
|
|
3026
|
+
args.metadata,
|
|
3019
3027
|
);
|
|
3020
3028
|
return {
|
|
3021
3029
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
@@ -3842,6 +3850,10 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3842
3850
|
description: "Memory tier: hot, warm, or cold.",
|
|
3843
3851
|
enum: ["hot", "warm", "cold"],
|
|
3844
3852
|
},
|
|
3853
|
+
webhook_url: {
|
|
3854
|
+
type: "string",
|
|
3855
|
+
description: "Optional webhook URL to notify when async storage completes.",
|
|
3856
|
+
},
|
|
3845
3857
|
},
|
|
3846
3858
|
required: ["content"],
|
|
3847
3859
|
},
|
|
@@ -3853,13 +3865,14 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3853
3865
|
project?: string;
|
|
3854
3866
|
importance?: number;
|
|
3855
3867
|
tier?: string;
|
|
3868
|
+
webhook_url?: string;
|
|
3856
3869
|
},
|
|
3857
3870
|
) => {
|
|
3858
3871
|
try {
|
|
3859
|
-
const { content, metadata, importance, tier } = args;
|
|
3872
|
+
const { content, metadata, importance, tier, webhook_url } = args;
|
|
3860
3873
|
let project = args.project;
|
|
3861
3874
|
if (!project && defaultProject) project = defaultProject;
|
|
3862
|
-
const result = await client.storeAsync(content, metadata, project, importance, tier);
|
|
3875
|
+
const result = await client.storeAsync(content, metadata, project, importance, tier, webhook_url);
|
|
3863
3876
|
return {
|
|
3864
3877
|
content: [
|
|
3865
3878
|
{
|
|
@@ -3961,6 +3974,14 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3961
3974
|
description: "Memory IDs to exclude from results.",
|
|
3962
3975
|
items: { type: "string" },
|
|
3963
3976
|
},
|
|
3977
|
+
llm_api_url: {
|
|
3978
|
+
type: "string",
|
|
3979
|
+
description: "Optional custom LLM API URL for AI summarization.",
|
|
3980
|
+
},
|
|
3981
|
+
llm_model: {
|
|
3982
|
+
type: "string",
|
|
3983
|
+
description: "Optional LLM model name for AI summarization.",
|
|
3984
|
+
},
|
|
3964
3985
|
},
|
|
3965
3986
|
required: ["query"],
|
|
3966
3987
|
},
|
|
@@ -3973,6 +3994,8 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3973
3994
|
ai_enhanced?: boolean;
|
|
3974
3995
|
search_mode?: "semantic" | "hybrid" | "keyword";
|
|
3975
3996
|
exclude_memory_ids?: string[];
|
|
3997
|
+
llm_api_url?: string;
|
|
3998
|
+
llm_model?: string;
|
|
3976
3999
|
},
|
|
3977
4000
|
) => {
|
|
3978
4001
|
try {
|
|
@@ -3982,6 +4005,8 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
3982
4005
|
aiEnhanced: args.ai_enhanced,
|
|
3983
4006
|
searchMode: args.search_mode,
|
|
3984
4007
|
excludeMemoryIds: args.exclude_memory_ids,
|
|
4008
|
+
llmApiUrl: args.llm_api_url,
|
|
4009
|
+
llmModel: args.llm_model,
|
|
3985
4010
|
});
|
|
3986
4011
|
return {
|
|
3987
4012
|
content: [
|
|
@@ -4508,7 +4533,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
4508
4533
|
});
|
|
4509
4534
|
|
|
4510
4535
|
api.logger.info?.(
|
|
4511
|
-
`memory-memoryrelay: plugin v0.15.
|
|
4536
|
+
`memory-memoryrelay: plugin v0.15.6 loaded (${Object.values(TOOL_GROUPS).flat().length} tools, autoRecall: ${cfg?.autoRecall}, autoCapture: ${autoCaptureConfig.enabled ? autoCaptureConfig.tier : 'off'}, debug: ${debugEnabled})`,
|
|
4512
4537
|
);
|
|
4513
4538
|
|
|
4514
4539
|
// ========================================================================
|
|
@@ -5604,7 +5629,7 @@ export default async function plugin(api: OpenClawPluginApi): Promise<void> {
|
|
|
5604
5629
|
description: "Show how to update the MemoryRelay plugin to the latest version",
|
|
5605
5630
|
requireAuth: true,
|
|
5606
5631
|
handler: async (_ctx) => {
|
|
5607
|
-
const currentVersion = "0.15.
|
|
5632
|
+
const currentVersion = "0.15.6";
|
|
5608
5633
|
const lines: string[] = [
|
|
5609
5634
|
"MemoryRelay Plugin Update",
|
|
5610
5635
|
"━".repeat(50),
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"id": "plugin-memoryrelay-ai",
|
|
3
3
|
"kind": "memory",
|
|
4
4
|
"name": "MemoryRelay AI",
|
|
5
|
-
"description": "MemoryRelay v0.15.
|
|
6
|
-
"version": "0.15.
|
|
5
|
+
"description": "MemoryRelay v0.15.7 - Long-term memory with 42 tools, 17 commands, V2 async, sessions, decisions, patterns & projects (api.memoryrelay.net)",
|
|
6
|
+
"version": "0.15.7",
|
|
7
7
|
"uiHints": {
|
|
8
8
|
"apiKey": {
|
|
9
9
|
"label": "MemoryRelay API Key",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memoryrelay/plugin-memoryrelay-ai",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.7",
|
|
4
4
|
"description": "OpenClaw memory plugin for MemoryRelay API - 42 tools, 17 commands, V2 async, sessions, decisions, patterns, projects & semantic search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -13,7 +13,7 @@ Decisions are **choices with rationale and alternatives considered**. Plain fact
|
|
|
13
13
|
|------|-----------|---------|
|
|
14
14
|
| `decision_record` | `decision_record(title, rationale, alternatives?, project?, tags?, status?)` | Record a new decision with reasoning |
|
|
15
15
|
| `decision_list` | `decision_list(project?, status?, tags?, limit?)` | List decisions, optionally filtered |
|
|
16
|
-
| `decision_supersede` | `decision_supersede(
|
|
16
|
+
| `decision_supersede` | `decision_supersede(id, new_title, new_rationale, tags?)` | Replace an outdated decision |
|
|
17
17
|
| `decision_check` | `decision_check(query, project?, limit?, threshold?)` | Semantic search for conflicting decisions |
|
|
18
18
|
|
|
19
19
|
## Workflow
|
|
@@ -15,7 +15,7 @@ Entities turn flat memory storage into a connected knowledge graph. Create entit
|
|
|
15
15
|
| `entity_link` | `entity_link(entity_id, memory_id, relationship?)` | Connect an entity to a memory |
|
|
16
16
|
| `entity_list` | `entity_list(limit?, offset?)` | List entities with pagination |
|
|
17
17
|
| `entity_graph` | `entity_graph(entity_id, depth?, max_neighbors?)` | Explore an entity's neighborhood |
|
|
18
|
-
| `memory_context` | `memory_context(query,
|
|
18
|
+
| `memory_context` | `memory_context(query, max_tokens?)` | Enriched recall with entity connections (see `memory-workflow` skill) |
|
|
19
19
|
|
|
20
20
|
## Entity Types
|
|
21
21
|
|
|
@@ -40,7 +40,7 @@ Call `session_end(session_id, summary)` with a meaningful summary. This becomes
|
|
|
40
40
|
|
|
41
41
|
## Deduplication
|
|
42
42
|
|
|
43
|
-
Always pass `deduplicate=true` on `memory_store` and `memory_batch_store`. The default threshold is 0.
|
|
43
|
+
Always pass `deduplicate=true` on `memory_store` and `memory_batch_store`. The default threshold is 0.95 similarity. Skipping this clutters search results with near-duplicates.
|
|
44
44
|
|
|
45
45
|
## Metadata Best Practices
|
|
46
46
|
|