@icex-labs/openclaw-memory-engine 5.0.1 → 5.0.2
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 +38 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -210,6 +210,38 @@ Falls back to keyword-only without OpenAI key. Cost: ~$0.001/session.
|
|
|
210
210
|
|
|
211
211
|
---
|
|
212
212
|
|
|
213
|
+
## Classification (v5.0)
|
|
214
|
+
|
|
215
|
+
Entity and importance classification is **embedding-based** — no hardcoded keywords, works with any language.
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
With OPENAI_API_KEY (recommended):
|
|
219
|
+
15 entity anchors (health, finance, immigration, legal, vehicles, ...)
|
|
220
|
+
4 importance anchors (critical / high / medium / low)
|
|
221
|
+
Anchor embeddings computed once, cached to classifier-anchors.json
|
|
222
|
+
→ Language-agnostic: Japanese, French, Korean, Chinese, English all work
|
|
223
|
+
|
|
224
|
+
Without OPENAI_API_KEY (fallback):
|
|
225
|
+
Format-based heuristics:
|
|
226
|
+
$amounts → finance (importance 7)
|
|
227
|
+
URLs/code → technology
|
|
228
|
+
Dates → importance 6
|
|
229
|
+
Short messages → low importance
|
|
230
|
+
Long messages → high importance
|
|
231
|
+
→ Basic but functional, no API cost
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Real results on 2,751 records:
|
|
235
|
+
|
|
236
|
+
| Metric | Before (regex v4) | After (embedding v5) |
|
|
237
|
+
|--------|-------------------|---------------------|
|
|
238
|
+
| "general" entities | 45% | **29%** |
|
|
239
|
+
| flat importance=5 | 71% | **39%** |
|
|
240
|
+
| Languages supported | English + Chinese | **any** |
|
|
241
|
+
| Hardcoded keywords | 100+ | **zero** |
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
213
245
|
## Self-Healing
|
|
214
246
|
|
|
215
247
|
| Issue | Auto-fix |
|
|
@@ -217,8 +249,9 @@ Falls back to keyword-only without OpenAI key. Cost: ~$0.001/session.
|
|
|
217
249
|
| Missing embeddings | Batch backfill on restart (all workspaces) |
|
|
218
250
|
| Agent forgets to save | Hooks capture everything passively |
|
|
219
251
|
| Duplicate facts | 60s dedup + keyword overlap + weekly cron |
|
|
220
|
-
| Flat importance scores | `memory_quality`
|
|
221
|
-
| General entity labels |
|
|
252
|
+
| Flat importance scores | Embedding-based re-rating via `memory_quality` |
|
|
253
|
+
| General entity labels | Embedding-based re-classification via `memory_quality` |
|
|
254
|
+
| No API key | Format-based fallback classifier (basic but functional) |
|
|
222
255
|
|
|
223
256
|
---
|
|
224
257
|
|
|
@@ -284,8 +317,9 @@ memory-engine/
|
|
|
284
317
|
│ ├── backup.js # Export / import
|
|
285
318
|
│ ├── store-sqlite.js # SQLite backend (FTS5)
|
|
286
319
|
│ ├── dashboard.js # HTML dashboard generator
|
|
287
|
-
│ ├──
|
|
288
|
-
│
|
|
320
|
+
│ ├── classifier.js # Embedding-based entity + importance classification
|
|
321
|
+
│ ├── quality.js # Data quality pass (uses classifier)
|
|
322
|
+
│ └── auto-capture.js # Passive hooks: message → archival (uses classifier)
|
|
289
323
|
├── extras/
|
|
290
324
|
│ ├── memory-maintenance.sh
|
|
291
325
|
│ ├── migrate-legacy.mjs
|
package/package.json
CHANGED