Skip to content

YantrikDB

v0.7.0 Breaking

This release includes 1 breaking change for platform teams planning a safe upgrade.

✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

agent-memory ai-agents anthropic claude-code cognitive-memory database
+12 more
embeddings hnsw knowledge-graph llm llm-memory mcp memory persistent-memory python rust semantic-memory vector-db

Summary

AI summary

SQL writes are off‑foreground in Phase 4.3 and a bundled potion-base-2M embedder provides out‑of‑the‑box semantic embeddings.

Full changelog

The v0.7.0 milestone bundles 10 commits since v0.6.7 into the engine release that closes the wedge fix structurally (Phase 4.3 = SQL writes off foreground) and ships a real out-of-the-box embedding story (bundled potion-base-2M static embedder, ~7.9MB).

yantrikdb-server can now bump its yantrikdb dep to "0.7" — the cluster API surface (issue #9 primitives + Phase 6 RYW) and the wedge-fix architecture (Phases 1-5 in v0.6.6, 4.3 in this release) are both production-shaped.

Highlights

Phase 4.3 — SQL writes off foreground

Foreground record() / record_with_rid() now do only fixed-cost SQL (memories INSERT + session UPDATE) before returning. The unbounded entity / memory_entities / claims / graph_index loops that previously scaled with extracted_entities.len() run on the materializer thread.

  • Wedge primitive #2 closed at the engine layer
  • Composes with yantrikdb-server v0.8.14's read pool for the full multi-process story
  • Synchronous read-after-write of entity-graph queries shifts from instant to ms-scale; delta-recall stays synchronous

Bundled default embedder (Slices A + B)

pip install yantrikdb now works with real semantic embeddings out of the box. No pip install sentence-transformers. No first-run HuggingFace download. No ONNX, no candle, no GPU.

db = yantrikdb.YantrikDB.with_default("memory.db")
db.record_text("Alice is the engineering lead", ...)
results = db.recall_text("who leads the team?", top_k=3)

The bundled default is potion-base-2M — a model2vec distillation of bge-base-en-v1.5. Token lookup → mean-pool → L2-normalize, ~500× faster than transformer inference, ~10× smaller than MiniLM.

Empirical quality on yantrikdb-shaped memories (eval at scratch/eval_potion_2m.py):

| Embedder | R@5 | R@10 | MRR | Size |
|---|---|---|---|---|
| hash-trick (Slice A foundation) | 0.75 | 0.85 | 0.71 | 0 |
| potion-base-2M (default) | 0.90 | 0.90 | 0.78 | ~8 MB |
| all-MiniLM-L6-v2 (gold) | 0.95 | 1.00 | 0.90 | ~80 MB |

Slim deployments: yantrikdb = { version = "0.7", default-features = false } drops the embedder + its deps.

Compactor cycle 1s → 250ms

Smaller per-cycle pauses for sustained-load p99. Same total clone work, 4× more cycles. Idle deployments still pay near-zero CPU — should_compact() short-circuits when the delta is empty. Options 3/4 (LSM-style CoW, adaptive cadence) deferred to v0.7.x pending Phase 7 soak empirical signal.

Engine pressure surface (cross-stack rule)

New public getters: db.delta_max(), db.delta_len(), db.cold_len(). yantrikdb-server's tick loop uses these to scale its enrichment_pause_threshold proportionally to engine capacity. CONCURRENCY.md documents the cross-stack rule: engine pressure suppresses enrichment, NEVER decay (memory aging is wall-clock-dependent; pausing creates timeline divergence on the same logical clock = correctness bug).

Architecture diagrams

README.md gains two Mermaid diagrams covering the decoupled write path and cluster RYW.

What's in this release (commits 11aa937..45e11e2 on main)

9182526 release: v0.7.0
45e11e2 feat(embedder): Slice B — bundled potion-base-2M static embedder
dd94ace feat(embedder): bundled default embedder (Slice A foundation)
876cecb feat(record_with_rid): Phase 4.3 Commit C — flip cluster path
d289063 feat(record): Phase 4.3 Commit B — flip record() to enqueue
cf45e12 perf(compactor): COMPACTOR_INTERVAL 1s -> 250ms
a7c1f0a feat(materializer): Phase 4.3 dispatch arm
93126c3 docs(readme): Mermaid fix + crate version bump
99f943f docs(readme): architecture diagrams
9077e05 ops(wedge_repro): RSS + delta-pressure instrumentation
bcf1c78 feat(engine): public delta_max/delta_len/cold_len getters

Migration notes

  • Existing dim=384 deployments using db.set_embedder(MiniLM) are unaffected — that path stays. Only YantrikDB::new(path, dim) auto-attach behavior changes.
  • Use YantrikDB::with_default(path) to stay bundle-dim agnostic.
  • Schema unchanged from v0.6.7 (still v25). No migration needed.
  • Slim builds (--no-default-features) lose the bundled embedder; must set_embedder() explicitly.

Tests

1416 lib tests pass. Slim build (--no-default-features) clean.

Still pending (post-v0.7.0)

  • Phase 7 long-duration soak — runs on Linux homelab; validates v0.7.0's read p99 fix empirically against the CT 168 production load profile.
  • Compactor scaling Options 3/4 — LSM-style CoW or adaptive cadence; wait on soak data.
  • Slice C (db.set_embedder_named("potion-base-8M") runtime download from yantrikos/yantrikdb-models) — additive feature, queued for v0.7.x.
  • Per-namespace fairness scoring — blocked on Phase 4.x multi-namespace HNSW.

Anti-goals respected

  • No ort / ONNX runtime (retired class of bugs from runtime version-mismatch hell).
  • No candle dep — pure Rust static-embedding inference via model2vec-rs.
  • No first-run model download — files committed to repo, baked via include_bytes!.
  • No mandatory pip install sentence-transformers for record_text to work.

Breaking Changes

  • Auto‑attach behavior of `YantrikDB::new(path, dim)` changes; use `YantrikDB::with_default(path)` for bundle‑dim agnostic initialization.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track YantrikDB

Get notified when new releases ship.

Sign up free

About YantrikDB

All releases →

Related context

Earlier breaking changes

  • v0.7.20 `correct()` now mutates in place, preserving rid and adding revision history (BREAKING CHANGE).
  • v0.7.9 Pure-additive; existing engines keep English models on v0.1.0.

Beta — feedback welcome: [email protected]