Engram 0.2.0
Engram 0.2.0
First substantial release after the 0.1.0 initial drop. Highlights:
- Per-project state layout — DB and socket move from
~/.engram/to<project>/.engram/; useengram migrateto import an existing global database. - HyDE is now opt-in via the new
embedding.hyde_thresholdconfig field (default0= disabled). - engram-tui — terminal dashboard with five tabs and an interactive init wizard.
- Tag-based filtering on
memory_search. - Concurrency hardening — parallel searches no longer serialize on the index or the embedder.
- Bilingual EN/RU documentation site deployed to GitHub Pages.
Breaking changes
- Per-project state layout (ADR 2026-04-22). Database and unix socket moved from
~/.engram/{engram.db, engram.sock}to<project>/.engram/{engram.db, engram.sock}. Discovery walks up from cwd looking for.engram/, like.git.~/.engram/now holds onlyengram.toml(API keys, defaults) andmodels/(ONNX artifacts shared across projects).engram serveraborts on startup when it finds a legacy~/.engram/engram.dbbut no per-project database — seeengram migrateto import. - HyDE is now opt-in (ADR 2026-05-05). The new
embedding.hyde_thresholdconfig field defaults to0(disabled). Set it to a positive integerNto enable HyDE for queries shorter thanNwords. The embedding cache is now keyed by the original query (not the generated hypothesis), so repeated identical queries hit the cache without an extra LLM call.
New features
- engram-tui — terminal dashboard built on ratatui with five tabs (Status, Memories, Search, Q-Learning, Models), interactive init wizard, and contextual hints. Connects to the server via unix socket and reads SQLite directly.
engram migrateCLI — import memories from a legacy global~/.engram/engram.dbinto the current project's.engram/engram.db. Default filter: rows whoseprojectfield matches the cwd basename (--allincludes NULL/mismatched rows;--dry-runpreviews only).- Tag-based filtering on
memory_search— new optionaltagsarray parameter restricts results to memories carrying all specified tags. - Documentation site — bilingual EN/RU docs scaffolded with Next.js + Fumadocs, deployed to GitHub Pages with a 3D landing page.
Improvements
- Concurrency hardening (ADR 2026-04-24). Replaced
Mutex<IndexSet>withRwLock<IndexSet>so parallelmemory_searchcalls no longer serialize on the index. RemovedMutex<Embedder>for the same reason. LLM clients are cached inServerStateto reuse HTTP connections instead of rebuilding per request. - Schema migrations are idempotent at startup (ADR 2026-05-01). Introduced
schema_metatable withtags_format = json_array_v1flag;memories.tagsare normalized to canonical JSON array on first run. - Reliability — added 10s HTTP timeout to OpenAI and Voyage clients; bumped socket request timeout to 30s; sanitized FTS5 queries to prevent syntax errors on special characters; added
max_tokensto OpenAI HyDE requests to prevent runaway responses. - Hardened MCP server lifecycle with socket-client tests and CI coverage.
- Opt-in latency harness for diagnosing search latency under reindex.
Fixes
- Vector search results were silently discarded in hybrid scoring under some conditions — now correctly merged.
engram-tuiper-project discovery now matches the server's discovery rules (ADR 2026-04-22).- Init wizard correctly detects API keys on the status screen.
init_handler::execute_with_dirsno longer triggers the interactiveengram-tui initwizard; the TTY-attached check moved up toexecute(). Previously the wizard ran insideexecute_with_dirs, which made every init test hang under any TTY-attached test runner (e.g.lefthook pre-push) by spawning an interactive subprocess.
Documentation
- README, AGENT.md, and
website/content/docs/{en,ru}brought into sync with current code (per-project layout,engram migrate, HyDE opt-in,embedding.hyde_threshold,tagsfilter). - Landing page hero stats updated (9 crates, 470+ tests) and a TUI Dashboard feature card added.
- Default
engram.tomltemplate (written byengram init) now documents fallback semantics fordatabase.path/server.socket_pathand includeshyde_threshold = 0.
Tooling / build
- Added lefthook for pre-commit (
cargo fmt,clippy, typecheck) and pre-push (cargo test, vitest,npm run build) hooks. - All Rust sources formatted with
cargo fmt. - Internal crate dependencies now declare
versionalongsidepathso the workspace is publishable to crates.io. - Bumped CI Node to 22; fixed tailwind native binding error in deploy.
Upgrade notes
If you used 0.1.0 with the global ~/.engram/engram.db:
cd /path/to/your/project
engram init # creates per-project .engram/
engram migrate --dry-run # preview what would be imported
engram migrate # import rows tagged for this project
engram migrate --all # also import NULL-project / mismatched rowsIf you relied on HyDE for short queries, set embedding.hyde_threshold in ~/.engram/engram.toml to a positive integer (e.g. 5 to enable HyDE for queries shorter than 5 words).
Full changelog: CHANGELOG.md