@joshuaswarren/openclaw-engram 9.1.16 → 9.1.17
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
|
@@ -68,13 +68,18 @@ After installation, add Engram to your `openclaw.json`:
|
|
|
68
68
|
"openclaw-engram": {
|
|
69
69
|
"enabled": true,
|
|
70
70
|
"config": {
|
|
71
|
-
// Use OpenAI for extraction:
|
|
71
|
+
// Option 1: Use OpenAI for extraction:
|
|
72
72
|
"openaiApiKey": "${OPENAI_API_KEY}"
|
|
73
73
|
|
|
74
|
-
//
|
|
74
|
+
// Option 2: Use a local LLM (no API key needed):
|
|
75
75
|
// "localLlmEnabled": true,
|
|
76
76
|
// "localLlmUrl": "http://localhost:1234/v1",
|
|
77
77
|
// "localLlmModel": "qwen2.5-32b-instruct"
|
|
78
|
+
|
|
79
|
+
// Option 3: Use the gateway model chain (multi-provider fallback):
|
|
80
|
+
// "modelSource": "gateway",
|
|
81
|
+
// "gatewayAgentId": "engram-llm",
|
|
82
|
+
// "fastGatewayAgentId": "engram-llm-fast"
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
}
|
|
@@ -82,6 +87,8 @@ After installation, add Engram to your `openclaw.json`:
|
|
|
82
87
|
}
|
|
83
88
|
```
|
|
84
89
|
|
|
90
|
+
> **Gateway model source:** When `modelSource` is `"gateway"`, Engram routes all LLM calls (extraction, consolidation, reranking) through an OpenClaw agent persona's model chain instead of its own config. Define agent personas in `openclaw.json → agents.list[]` with a `primary` model and `fallbacks[]` array — Engram tries each in order until one succeeds. This lets you build multi-provider fallback chains like Fireworks → local LLM → cloud OpenAI. See the [Gateway Model Source](docs/config-reference.md#gateway-model-source) guide for full setup.
|
|
91
|
+
|
|
85
92
|
Restart the gateway:
|
|
86
93
|
|
|
87
94
|
```bash
|
|
@@ -192,9 +199,9 @@ OpenClaw's built-in memory is basic — it works for getting started, but lacks
|
|
|
192
199
|
|
|
193
200
|
Engram uses hybrid search (BM25 + vector + reranking via [QMD](https://github.com/tobilu/qmd)) to find semantically relevant memories. It doesn't just match keywords — it understands what you're working on and surfaces the right context.
|
|
194
201
|
|
|
195
|
-
### OpenAI
|
|
202
|
+
### Flexible LLM routing — OpenAI, local, or gateway model chain
|
|
196
203
|
|
|
197
|
-
Use OpenAI for extraction and reranking,
|
|
204
|
+
Use OpenAI for extraction and reranking, run entirely offline with a local LLM (Ollama, LM Studio), or route through the **gateway model chain** to use any provider with automatic fallback. The `local-llm-heavy` preset is optimized for fully local operation. See the [Local LLM Guide](docs/guides/local-llm.md) and the [Gateway Model Source](docs/config-reference.md#gateway-model-source) section for multi-provider setups.
|
|
198
205
|
|
|
199
206
|
### Progressive complexity
|
|
200
207
|
|
package/dist/access-cli.js
CHANGED
|
@@ -21945,6 +21945,19 @@ var Orchestrator = class _Orchestrator {
|
|
|
21945
21945
|
const result = await this.fastLlm.chatCompletion(messages, options);
|
|
21946
21946
|
return result ? { content: result.content } : null;
|
|
21947
21947
|
}
|
|
21948
|
+
/**
|
|
21949
|
+
* Get a fast-tier LLM client compatible with the rerank interface.
|
|
21950
|
+
* When gateway model source is active, routes through the gateway fast chain.
|
|
21951
|
+
* Otherwise returns the local fast LLM directly.
|
|
21952
|
+
*/
|
|
21953
|
+
get fastLlmForRerank() {
|
|
21954
|
+
if (this.fastGatewayLlm && this.config.modelSource === "gateway") {
|
|
21955
|
+
return {
|
|
21956
|
+
chatCompletion: (messages, options) => this.fastChatCompletion(messages, options ?? {})
|
|
21957
|
+
};
|
|
21958
|
+
}
|
|
21959
|
+
return this.fastLlm;
|
|
21960
|
+
}
|
|
21948
21961
|
async initialize() {
|
|
21949
21962
|
await this.storage.ensureDirectories();
|
|
21950
21963
|
await this.storage.loadAliases();
|
|
@@ -25879,7 +25892,7 @@ ${tmtNode.summary}`
|
|
|
25879
25892
|
id: r.path,
|
|
25880
25893
|
snippet: r.snippet || r.path
|
|
25881
25894
|
})),
|
|
25882
|
-
local: this.
|
|
25895
|
+
local: this.fastLlmForRerank,
|
|
25883
25896
|
enabled: true,
|
|
25884
25897
|
timeoutMs: this.config.rerankTimeoutMs,
|
|
25885
25898
|
maxCandidates: this.config.rerankMaxCandidates,
|
|
@@ -29159,7 +29172,7 @@ ${lines.join("\n\n")}`;
|
|
|
29159
29172
|
id: r.path,
|
|
29160
29173
|
snippet: r.snippet || r.path
|
|
29161
29174
|
})),
|
|
29162
|
-
local: this.
|
|
29175
|
+
local: this.fastLlmForRerank,
|
|
29163
29176
|
enabled: true,
|
|
29164
29177
|
timeoutMs: this.config.rerankTimeoutMs,
|
|
29165
29178
|
maxCandidates: this.config.rerankMaxCandidates,
|
|
@@ -31521,4 +31534,4 @@ export {
|
|
|
31521
31534
|
EngramAccessInputError,
|
|
31522
31535
|
EngramAccessService
|
|
31523
31536
|
};
|
|
31524
|
-
//# sourceMappingURL=chunk-
|
|
31537
|
+
//# sourceMappingURL=chunk-ZZF2FYBV.js.map
|