Repository navigation
v0.1.7 — Smarter Memory
What's new in v0.1.7
🧠 Vault deduplication
Serenity was writing the same memory as 2–3 separate vault files — once during the conversation, again during reflection, sometimes again in a follow-up session. vault_write now checks existing notes for ≥60% title word overlap before creating anything new. If a similar note already exists, new content is appended under a dated section instead of spawning a duplicate file. Your vault stays clean and searchable.
🔁 NNN duplicate entries eliminated
The vector memory store (NNN) was receiving the same facts 2–3 times per session:
- Once from
_auto_nnn_encode_direct(runs immediately after anyvault_write) - Again from
SESSION_REFLECTIONStep 3 (re-encoding the same conversation content)
SESSION_REFLECTION now only stores insights that are novel to the reflection pass — patterns and causal lessons surfaced by looking back at the session, not re-encoding what was already written to vault mid-conversation.
⚡ Context window auto-tunes per model
The hardcoded contextWindowTokens override was bypassing Serenity's built-in model-aware auto-detection. Now removed — context size is set automatically at startup:
| Model size | Context window |
|---|---|
| ≤ 4b | 20,480 tokens |
| ≤ 9b | 28,672 tokens |
| ≤ 20b | 40,960 tokens |
| Cloud | 80,000 tokens |
No more OOM crashes from over-allocation on small models, no more cramped responses from under-allocation.
Full changelog: CHANGELOG.md