mentedb 0.8.0 → 0.8.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
CHANGED
|
@@ -25,6 +25,20 @@ import { MenteDB, MemoryType, EdgeType } from 'mentedb';
|
|
|
25
25
|
|
|
26
26
|
const db = new MenteDB('./my-agent-memory');
|
|
27
27
|
|
|
28
|
+
// Primary API — one call does everything
|
|
29
|
+
const result = await db.processTurn(
|
|
30
|
+
"I prefer using TypeScript for backend services",
|
|
31
|
+
"Noted! TypeScript is great for type-safe backends.",
|
|
32
|
+
0 // turn_id
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
console.log(result.context); // relevant memories
|
|
36
|
+
console.log(result.stored); // number of new memories
|
|
37
|
+
// Enrichment runs automatically — builds semantic facts,
|
|
38
|
+
// entity graphs, and user profile over time
|
|
39
|
+
|
|
40
|
+
// Low-level APIs:
|
|
41
|
+
|
|
28
42
|
// Store a memory
|
|
29
43
|
const id = db.store({
|
|
30
44
|
content: 'The deploy key rotates every 90 days',
|
|
@@ -85,6 +99,12 @@ const resume = tracker.getResumeContext();
|
|
|
85
99
|
const next = tracker.predictNextTopics();
|
|
86
100
|
```
|
|
87
101
|
|
|
102
|
+
## Sleeptime Enrichment
|
|
103
|
+
|
|
104
|
+
MenteDB automatically enriches memories in the background after `processTurn`. The pipeline extracts semantic facts, links and deduplicates entities, groups them into communities with summaries, and builds a user profile — all feeding back into future `processTurn` context retrieval.
|
|
105
|
+
|
|
106
|
+
Requires an LLM provider: set `MENTEDB_OPENAI_API_KEY` or `MENTEDB_ANTHROPIC_API_KEY`. Without one, the engine works normally — enrichment just doesn't run.
|
|
107
|
+
|
|
88
108
|
## API reference
|
|
89
109
|
|
|
90
110
|
### `MenteDB`
|
|
Binary file
|
package/mentedb.darwin-x64.node
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|