@dangvv/openclaw-mem0 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.
@@ -0,0 +1,188 @@
1
+ {
2
+ "id": "openclaw-mem0",
3
+ "kind": "memory",
4
+ "uiHints": {
5
+ "mode": {
6
+ "label": "Mode",
7
+ "help": "\"platform\" for Mem0 cloud, \"open-source\" for self-hosted"
8
+ },
9
+ "apiKey": {
10
+ "label": "Mem0 API Key",
11
+ "sensitive": true,
12
+ "placeholder": "m0-...",
13
+ "help": "API key from app.mem0.ai (or use ${MEM0_API_KEY}). Only needed for platform mode."
14
+ },
15
+ "userId": {
16
+ "label": "Default User ID",
17
+ "placeholder": "default",
18
+ "help": "User ID for scoping memories"
19
+ },
20
+ "orgId": {
21
+ "label": "Organization ID",
22
+ "placeholder": "org-...",
23
+ "advanced": true
24
+ },
25
+ "projectId": {
26
+ "label": "Project ID",
27
+ "placeholder": "proj-...",
28
+ "advanced": true
29
+ },
30
+ "autoCapture": {
31
+ "label": "Auto-Capture",
32
+ "help": "Automatically store conversation context after each agent turn"
33
+ },
34
+ "autoRecall": {
35
+ "label": "Auto-Recall",
36
+ "help": "Automatically inject relevant memories before each agent turn"
37
+ },
38
+ "customInstructions": {
39
+ "label": "Custom Instructions",
40
+ "placeholder": "Only store user preferences and important facts...",
41
+ "help": "Natural language rules for what Mem0 should store or exclude (platform mode)"
42
+ },
43
+ "customCategories": {
44
+ "label": "Custom Categories",
45
+ "advanced": true,
46
+ "help": "Map of category names to descriptions for memory tagging (platform mode only). Sensible defaults are built in."
47
+ },
48
+ "customPrompt": {
49
+ "label": "Custom Prompt (Open-Source)",
50
+ "advanced": true,
51
+ "help": "Custom prompt for open-source mode memory extraction."
52
+ },
53
+ "enableGraph": {
54
+ "label": "Enable Graph Memory",
55
+ "help": "Enable Mem0 graph memory for entity relationships. In open-source mode, also configure oss.graphStore."
56
+ },
57
+ "searchThreshold": {
58
+ "label": "Search Threshold",
59
+ "placeholder": "0.5",
60
+ "help": "Minimum similarity score for search results (0-1). Default: 0.5"
61
+ },
62
+ "topK": {
63
+ "label": "Top K Results",
64
+ "placeholder": "5",
65
+ "help": "Maximum number of memories to retrieve"
66
+ },
67
+ "oss": {
68
+ "label": "Open-Source Configuration",
69
+ "advanced": true,
70
+ "help": "Optional. Configure custom embedder, vector store, LLM, or history DB for open-source mode. Has sensible defaults — only override what you need."
71
+ }
72
+ },
73
+ "configSchema": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "properties": {
77
+ "mode": {
78
+ "type": "string",
79
+ "enum": [
80
+ "platform",
81
+ "open-source",
82
+ "oss"
83
+ ]
84
+ },
85
+ "apiKey": {
86
+ "type": "string"
87
+ },
88
+ "userId": {
89
+ "type": "string"
90
+ },
91
+ "orgId": {
92
+ "type": "string"
93
+ },
94
+ "projectId": {
95
+ "type": "string"
96
+ },
97
+ "autoCapture": {
98
+ "type": "boolean"
99
+ },
100
+ "autoRecall": {
101
+ "type": "boolean"
102
+ },
103
+ "customInstructions": {
104
+ "type": "string"
105
+ },
106
+ "customCategories": {
107
+ "type": "object",
108
+ "additionalProperties": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "customPrompt": {
113
+ "type": "string"
114
+ },
115
+ "enableGraph": {
116
+ "type": "boolean"
117
+ },
118
+ "searchThreshold": {
119
+ "type": "number"
120
+ },
121
+ "topK": {
122
+ "type": "number"
123
+ },
124
+ "oss": {
125
+ "type": "object",
126
+ "properties": {
127
+ "embedder": {
128
+ "type": "object",
129
+ "properties": {
130
+ "provider": {
131
+ "type": "string"
132
+ },
133
+ "config": {
134
+ "type": "object"
135
+ }
136
+ }
137
+ },
138
+ "vectorStore": {
139
+ "type": "object",
140
+ "properties": {
141
+ "provider": {
142
+ "type": "string"
143
+ },
144
+ "config": {
145
+ "type": "object"
146
+ }
147
+ }
148
+ },
149
+ "llm": {
150
+ "type": "object",
151
+ "properties": {
152
+ "provider": {
153
+ "type": "string"
154
+ },
155
+ "config": {
156
+ "type": "object"
157
+ }
158
+ }
159
+ },
160
+ "graphStore": {
161
+ "type": "object",
162
+ "properties": {
163
+ "provider": {
164
+ "type": "string"
165
+ },
166
+ "config": {
167
+ "type": "object"
168
+ },
169
+ "customPrompt": {
170
+ "type": "string"
171
+ },
172
+ "custom_prompt": {
173
+ "type": "string"
174
+ },
175
+ "threshold": {
176
+ "type": "number"
177
+ }
178
+ }
179
+ },
180
+ "historyDbPath": {
181
+ "type": "string"
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "required": []
187
+ }
188
+ }
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@dangvv/openclaw-mem0",
3
+ "version": "0.3.0",
4
+ "type": "module",
5
+ "description": "Mem0 memory backend for OpenClaw — platform or self-hosted open-source",
6
+ "license": "Apache-2.0",
7
+ "files": [
8
+ "index.ts",
9
+ "openclaw.plugin.json",
10
+ "README.md",
11
+ "CHANGELOG.md",
12
+ "patches"
13
+ ],
14
+ "keywords": [
15
+ "openclaw",
16
+ "plugin",
17
+ "memory",
18
+ "mem0",
19
+ "long-term-memory"
20
+ ],
21
+ "scripts": {
22
+ "postinstall": "patch-package",
23
+ "test": "vitest run"
24
+ },
25
+ "dependencies": {
26
+ "@sinclair/typebox": "0.34.47",
27
+ "mem0ai": "^2.2.1"
28
+ },
29
+ "openclaw": {
30
+ "extensions": [
31
+ "./index.ts"
32
+ ]
33
+ },
34
+ "devDependencies": {
35
+ "patch-package": "^8.0.1",
36
+ "vitest": "^4.0.18"
37
+ }
38
+ }
@@ -0,0 +1,32 @@
1
+ diff --git a/node_modules/mem0ai/dist/oss/index.js b/node_modules/mem0ai/dist/oss/index.js
2
+ index d8d27d4..6c86b70 100644
3
+ --- a/node_modules/mem0ai/dist/oss/index.js
4
+ +++ b/node_modules/mem0ai/dist/oss/index.js
5
+ @@ -122,7 +122,10 @@ var MemoryConfigSchema = import_zod.z.object({
6
+ var import_openai = __toESM(require("openai"));
7
+ var OpenAIEmbedder = class {
8
+ constructor(config) {
9
+ - this.openai = new import_openai.default({ apiKey: config.apiKey });
10
+ + this.openai = new import_openai.default({
11
+ + apiKey: config.apiKey,
12
+ + baseURL: config.baseURL
13
+ + });
14
+ this.model = config.model || "text-embedding-3-small";
15
+ this.embeddingDims = config.embeddingDims || 1536;
16
+ }
17
+ diff --git a/node_modules/mem0ai/dist/oss/index.mjs b/node_modules/mem0ai/dist/oss/index.mjs
18
+ index 9e2c8be..7a8f0c5 100644
19
+ --- a/node_modules/mem0ai/dist/oss/index.mjs
20
+ +++ b/node_modules/mem0ai/dist/oss/index.mjs
21
+ @@ -61,7 +61,10 @@ var MemoryConfigSchema = z.object({
22
+ import OpenAI from "openai";
23
+ var OpenAIEmbedder = class {
24
+ constructor(config) {
25
+ - this.openai = new OpenAI({ apiKey: config.apiKey });
26
+ + this.openai = new OpenAI({
27
+ + apiKey: config.apiKey,
28
+ + baseURL: config.baseURL
29
+ + });
30
+ this.model = config.model || "text-embedding-3-small";
31
+ this.embeddingDims = config.embeddingDims || 1536;
32
+ }