@dangvv/openclaw-mem0 0.3.1 → 0.3.3

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
@@ -136,6 +136,18 @@ To enable graph memory in open-source mode, set `enableGraph: true` and provide
136
136
 
137
137
  When graph memory is enabled in OSS mode, Mem0 search returns normal vector hits plus related entities in a `relations` payload. This plugin includes those relations in `memory_search` output and auto-recall context.
138
138
 
139
+ If your environment cannot load `better-sqlite3` native bindings, disable the default SQLite-backed history store:
140
+
141
+ ```json5
142
+ "config": {
143
+ "mode": "open-source",
144
+ "userId": "your-user-id",
145
+ "oss": {
146
+ "disableHistory": true
147
+ }
148
+ }
149
+ ```
150
+
139
151
  All `oss` fields are optional. See [Mem0 OSS docs](https://docs.mem0.ai/open-source/node-quickstart) for providers.
140
152
 
141
153
  ## Agent tools
@@ -209,6 +221,7 @@ Works with zero extra config. The `oss` block lets you swap out any component:
209
221
  | `oss.vectorStore.config` | `object` | — | Provider config: `host`, `port`, `collectionName`, `dimension` |
210
222
  | `oss.llm.provider` | `string` | `"openai"` | LLM provider (`"openai"`, `"anthropic"`, `"ollama"`, etc.) |
211
223
  | `oss.llm.config` | `object` | — | Provider config: `apiKey`, `model`, `baseURL`, `temperature` |
224
+ | `oss.disableHistory` | `boolean` | `false` | Disable the default SQLite-backed history manager to avoid `better-sqlite3` native bindings |
212
225
  | `oss.graphStore.provider` | `string` | — | Graph backend (`"neo4j"`, `"memgraph"`, `"neptune"`, `"kuzu"`, etc.) |
213
226
  | `oss.graphStore.config` | `object` | — | Provider config: backend connection details such as `url`, `username`, `password`, `database` |
214
227
  | `oss.graphStore.customPrompt` | `string` | — | Optional graph extraction prompt override |
package/index.ts CHANGED
@@ -40,6 +40,7 @@ type Mem0Config = {
40
40
  embedder?: { provider: string; config: Record<string, unknown> };
41
41
  vectorStore?: { provider: string; config: Record<string, unknown> };
42
42
  llm?: { provider: string; config: Record<string, unknown> };
43
+ disableHistory?: boolean;
43
44
  graphStore?: {
44
45
  provider: string;
45
46
  config: Record<string, unknown>;
@@ -255,6 +256,8 @@ class OSSProvider implements Mem0Provider {
255
256
  if (this.ossConfig?.vectorStore)
256
257
  config.vectorStore = this.ossConfig.vectorStore;
257
258
  if (this.ossConfig?.llm) config.llm = this.ossConfig.llm;
259
+ if (this.ossConfig?.disableHistory != null)
260
+ config.disableHistory = this.ossConfig.disableHistory;
258
261
  if (this.ossConfig?.graphStore)
259
262
  config.graphStore = this.ossConfig.graphStore;
260
263
  if (this.enableGraph) config.enableGraph = true;
@@ -67,7 +67,7 @@
67
67
  "oss": {
68
68
  "label": "Open-Source Configuration",
69
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."
70
+ "help": "Optional. Configure custom embedder, vector store, LLM, graph backend, or disable SQLite-backed history for open-source mode."
71
71
  }
72
72
  },
73
73
  "configSchema": {
@@ -157,6 +157,9 @@
157
157
  }
158
158
  }
159
159
  },
160
+ "disableHistory": {
161
+ "type": "boolean"
162
+ },
160
163
  "graphStore": {
161
164
  "type": "object",
162
165
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dangvv/openclaw-mem0",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "description": "Mem0 memory backend for OpenClaw — platform or self-hosted open-source",
6
6
  "license": "Apache-2.0",
@@ -1,5 +1,5 @@
1
1
  diff --git a/node_modules/mem0ai/dist/oss/index.js b/node_modules/mem0ai/dist/oss/index.js
2
- index d8d27d4..6c86b70 100644
2
+ index d8d27d4..ce31af3 100644
3
3
  --- a/node_modules/mem0ai/dist/oss/index.js
4
4
  +++ b/node_modules/mem0ai/dist/oss/index.js
5
5
  @@ -122,7 +122,10 @@ var MemoryConfigSchema = import_zod.z.object({
@@ -14,8 +14,20 @@ index d8d27d4..6c86b70 100644
14
14
  this.model = config.model || "text-embedding-3-small";
15
15
  this.embeddingDims = config.embeddingDims || 1536;
16
16
  }
17
+ @@ -257,7 +260,10 @@ var OpenAILLM = class {
18
+ var import_openai3 = __toESM(require("openai"));
19
+ var OpenAIStructuredLLM = class {
20
+ constructor(config) {
21
+ - this.openai = new import_openai3.default({ apiKey: config.apiKey });
22
+ + this.openai = new import_openai3.default({
23
+ + apiKey: config.apiKey,
24
+ + baseURL: config.baseURL
25
+ + });
26
+ this.model = config.model || "gpt-4-turbo-preview";
27
+ }
28
+ async generateResponse(messages, responseFormat, tools) {
17
29
  diff --git a/node_modules/mem0ai/dist/oss/index.mjs b/node_modules/mem0ai/dist/oss/index.mjs
18
- index 9e2c8be..7a8f0c5 100644
30
+ index 9e2c8be..fa8e8c2 100644
19
31
  --- a/node_modules/mem0ai/dist/oss/index.mjs
20
32
  +++ b/node_modules/mem0ai/dist/oss/index.mjs
21
33
  @@ -61,7 +61,10 @@ var MemoryConfigSchema = z.object({
@@ -30,3 +42,15 @@ index 9e2c8be..7a8f0c5 100644
30
42
  this.model = config.model || "text-embedding-3-small";
31
43
  this.embeddingDims = config.embeddingDims || 1536;
32
44
  }
45
+ @@ -196,7 +199,10 @@ var OpenAILLM = class {
46
+ import OpenAI3 from "openai";
47
+ var OpenAIStructuredLLM = class {
48
+ constructor(config) {
49
+ - this.openai = new OpenAI3({ apiKey: config.apiKey });
50
+ + this.openai = new OpenAI3({
51
+ + apiKey: config.apiKey,
52
+ + baseURL: config.baseURL
53
+ + });
54
+ this.model = config.model || "gpt-4-turbo-preview";
55
+ }
56
+ async generateResponse(messages, responseFormat, tools) {