MemVector Knowledge Engine

by Kevin Mike Kaupert
5
4
3
2
1
Score: 49/100

Description

2D thinking workspace for Obsidian: map concepts by intentional weighted relations, not WikiLinks. Local-first, typed SQLite graph, hybrid GraphRAG synthesis.

Reviews

No reviews yet.

Stats

1
stars
180
downloads
0
forks
23
days
2
days
2
days
103
total PRs
0
open PRs
0
closed PRs
103
merged PRs
121
total issues
14
open issues
107
closed issues
219
commits

Latest Version

2 days ago

Changelog

Release 0.2.3 — Layout Stability, Retrieval Hardening & Determinism

Release Version: 0.2.3
Release Date: 2026-10-02
Target Obsidian Version: >= 1.11.4 (Desktop)
Assets: main.js, manifest.json, styles.css


Overview

Release 0.2.3 delivers comprehensive hardening across 2D vector scatter layout stability, camera bounds tracking, retrieval channel error handling, radar unindexed heuristics, and cross-platform deterministic sorting.

It addresses vectorless note edge cases where un-embedded notes previously distorted rescale bounds or collapsed onto the origin, guarantees that deleting relations triggers a clean scratch rearrangement with automatic camera refitting, centrally prunes deleted notes before all layout passes, surfaces unindexed SQLite graph database states with localized UI warnings, and standardizes all string comparisons to explicit "en" locale ordering.

The automated test suite grows to 775 tests across 68 test files, all passing.


Highlights

1. Vector Scatter Layout Integrity (#224)

  • Protected Rescale Bounds: rescaleSimilarityMatrix now derives similarity bounds strictly from pairs of notes with valid embeddings when >= 2 exist, preventing un-embedded notes from distorting global matrix scaling or causing notes to collapse onto the origin. When 0 or 1 embedded note exists, bounds default safely without injecting artificial zero-similarity pairs.
  • Embedded Centroid Preference: Cluster centroid selection (assignClusters) now explicitly prefers notes with genuine vector embeddings even for small note counts (n <= numClouds), preventing un-embedded notes from anchoring clusters.
  • Deterministic Sort Tiebreaks: In layoutEngine.mobileSet, note ID comparison serves as an explicit tiebreak when similarity scores match.
  • Centralized Deleted-Note Pruning: Added pruneDeletedNodes(), executed systematically prior to applyLayout(), rearrangeLayout(), onVectorsCalculated(), reloadEmbeddings(), and refreshRelationEdges(), preventing deleted notes from remaining as ghost nodes.

2. Camera Refitting on Relation Removal (#218)

  • Viewport Tracking on Edge Deletion: Removing a relation in the relation builder executes a deterministic global rearrangement. The camera now automatically calls fitToView() with viewport adjustment tracking (hasFittedView), ensuring the rearranged graph remains centered and never drifts out of the visible pane.
  • ADR-0006 Documentation Clarification: Updated ADR-0006 to accurately describe that removing a relation computes a canonical scratch layout rather than preserving evolved local positions, while un-embedded notes participate in repulsion and text-based link forces without hijacking rescale bounds.

3. Retrieval Channel Status & Radar Fallback (#192, #193)

  • Graph Retrieval Unindexed State: The SQLite graph store now exposes an isIndexed() check. When the graph has not yet been synced, context enrichment marks the channel as unindexed instead of falsely reporting ready, and surfaces the localized warning retrievalGraphUnindexed in context previews and synthesis results.
  • Consistent Radar Fallback: When an active note has no vector neighbors but candidate markdown files exist in the vault, radar returns { status: "unindexed", data: [] }, transparently falling back to word/formula heuristic ranking (rankCandidates) and displaying the radarUnindexed warning banner.
  • Degraded Channel Resilience: Previews and synthesis gracefully handle individual channel failures or unindexed states while preserving valid context from operational channels.

4. Reasoning Token Preservation & Provider Resilience (#198, #200)

  • Truncated Reasoning Recovery: Incomplete reasoning blocks lacking a closing </think> tag are retained and displayed within the collapsible callout rather than discarded or crashing parsing. Empty response bodies trigger clear errors.
  • Workspace State Restoration: Saved scatter filters are restored smoothly on startup without redundant re-scans (#194).

5. Cross-Machine Determinism (#195)

  • Explicit Locale Ordering: Standardized all string comparisons, path orderings, and SQLite search tiebreaks across the codebase to localeCompare(..., "en"), eliminating machine-dependent sorting variances across platforms and locales.

Changelog

Fixed

  • Vectorless notes distorting similarity rescale bounds and collapsing to origin stacks (#224).
  • Rescale bounds computation failing when 0 or 1 embedded note exists.
  • Centroid selection choosing un-embedded notes as cluster anchors for note sets where n <= numClouds.
  • Missing camera refit (fitToView) after deleting relations in refreshRelationEdges.
  • Deleted notes lingering across layout passes (rearrangeLayout, onVectorsCalculated, reloadEmbeddings, spacing sliders).
  • Graph store falsely reporting ready when graph database was never indexed.
  • Radar reporting ready instead of unindexed when active note has embeddings but vault neighbors are unindexed.
  • Platform- and locale-dependent sorting discrepancies across systems.
  • Incomplete reasoning blocks failing to parse or dropping thinking tokens (#198).
  • Redundant vault rescans when restoring saved workspace scatter filters (#194).

Changed

  • Standardized all localeCompare calls to explicit "en" locale.
  • ADR-0006 updated to clarify scratch global rearrangement upon relation deletion and hybrid force modeling.
  • Added localized retrievalGraphUnindexed warning for unindexed graph database in English and German.

Upgrade Notes

  • Camera Auto-Fit: Deleting a relation now automatically refocuses the camera view on the resulting node layout.
  • Graph Status: If you see a warning indicating the graph database is unindexed, run "Jetzt Vault lokal indizieren" / "Index vault locally now" in Settings -> MemVector.

Installation & Upgrade

Community Plugins (Automatic)

Search for MemVector Knowledge Engine in Obsidian Community Plugins and click Update (or Install).

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the release assets on GitHub.
  2. Copy all three files into your vault's plugin directory: <vault>/.obsidian/plugins/memvector-knowledge-engine/
  3. Reload Obsidian or toggle the plugin off and on under Settings → Community Plugins.

README file from

Github

MemVector Knowledge Engine

Version License Obsidian Platform TypeScript Tests

A 2D thinking workspace for Obsidian.

Not a graph viewer. Not a replacement for Obsidian Graph. A space where you map what you believe connects your concepts — and why — and the map becomes a navigable, queryable artifact of your thinking.


The core idea

Obsidian Graph shows you what you linked. MemVector shows you what you believe is connected — and how strongly, and why.

You select two or more notes and declare a typed relation:

Concept A  →  IMPLIES  →  Concept B
Theorem X  →  REQUIRES  →  Definition Y
Claim P    →  CONFLICTS_WITH  →  Claim Q

That declaration does three things at once:

  1. Moves them in the 2D canvas. EQUIVALENT_TO pulls notes closer than a generic relation. CONFLICTS_WITH actively pushes them apart. The spatial layout is a direct expression of your declared structure.

  2. Creates a Markdown file in your vault. The relation lives in the relations folder (wiki/relations/ by default, configurable) as a normal .md file with type: relation in its frontmatter — readable, editable, version-controlled, searchable. You can write a reason in plain text. Nothing is hidden in a database you cannot inspect.

  3. Persists to a local SQLite graph. Relations are traversable at query time: multi-hop neighbor lookups, AI synthesis context, radar sidebar — all read this graph.

Semantic embeddings run underneath as a second force: notes with similar content are pulled together even without an explicit relation. Your declared relations win when they are stronger. The vector similarity fills the gaps.


What it is not

  • Not a WikiLink visualizer. WikiLinks are opt-in and carry the weakest graph weight (0.7) — weaker than any typed relation. The default is off.
  • Not a replacement for Obsidian Graph. Both coexist. Obsidian Graph shows your link structure. MemVector shows your declared conceptual structure.
  • Not automated knowledge extraction. No LLM reads your notes and builds the graph for you. You build it. The AI assists when you ask it to synthesize.
  • Not classical GraphRAG. Classical GraphRAG traverses an automatically generated topology and feeds it to an LLM. MemVector's graph is an intentional artifact — the LLM gets your thinking as context, not a machine-generated one.

Relation types

Thirteen canonical types ship as a starting vocabulary. All are customizable via wiki/relation-types.json in your vault — nothing is hardcoded.

Type Meaning Force in canvas
EQUIVALENT_TO Same concept, different formulation Strongest pull (×1.3)
ANALOGOUS_TO Structurally similar Strong pull (×1.1)
IMPLIES A makes B necessary Standard (×1.0)
REQUIRES A presupposes B Standard (×1.0)
GENERALIZES A is the broader case Standard (×1.0)
SPECIALIZES A is a special case Standard (×1.0)
EXTENDS A builds on B Standard (×1.0)
CONSTRUCTS A constructs B Standard (×1.0)
EMBEDS_IN A is embedded in B Standard (×1.0)
REDUCES_TO A reduces to B Standard (×1.0)
REFUTES A refutes B Standard (×1.0)
CONFLICTS_WITH Active contradiction Active repulsion
INDEPENDENT_OF No connection Neutral (×0.05)

Each type has a dedicated color on the canvas. Custom types get a deterministic color from a hash — no manual color assignment needed.

Force and repulsion are per-type data, not code: edit the weight / repels columns in Settings → Relation types, or the vocabulary JSON directly. Add your own types there, or switch the whole vocabulary to a bundled preset (STEM, Law, Medicine, Philosophy) — existing edges keep working, since edge labels are stored as plain strings.


Key features

  • Intentional 2D layout. A force simulation combines your typed relations and semantic embeddings. Position is meaning.
  • Relations as Markdown. Every relation is a .md file in your vault with a type, an optional reason, and WikiLinks to both notes. Not a black box.
  • Three topology modes. Hub (Focal → Rest), convergence (Rest → Focal), or sequence (Chain: A → B → C → ...) — for structuring how a set of selected notes relate to each other.
  • Mini-Radar sidebar. A polar view centered on your active note. Radial distance = true cosine distance (1 − similarity). Updates as you switch notes.
  • Hybrid GraphRAG synthesis. When you ask the AI to synthesize, it enriches your selection with two independent lookups: vector-similar notes (finds semantic neighbors with no graph path) and graph-hop neighbors (finds structurally linked notes with different vocabulary). Neither alone covers both.
  • 100% local-first, zero setup. All embeddings and graph edges live in a bundled SQLite database (memvector-local.sqlite) inside your vault. No Docker, no server, no network call for storage.
  • Flexible AI providers. Ollama (local), Anthropic Claude, OpenAI, DeepSeek, OpenRouter, or any custom OpenAI-compatible endpoint. API keys are stored in Obsidian's secure Secret Storage — never in plain text.

Status: Early-Stage (Pre-1.0)

This plugin is at version 0.1.x and under active development. The version number stays below 1.0.0 on purpose — it has not yet reached the stability that number implies. Expect rough edges, and check the open issues before relying on it for anything critical.


Documentation


Installation & Quickstart

  1. Copy main.js, manifest.json, styles.css, and sql-wasm.wasm into <your-vault>/.obsidian/plugins/memvector-knowledge-engine/.
  2. Enable MemVector Knowledge Engine in Settings → Community Plugins.
  3. Choose your embedding and LLM provider — Ollama with bge-m3 works out of the box with no API key.
  4. Click "Index entire vault" to compute embeddings.
  5. Open the 2D canvas from the ribbon icon or command palette.
  6. Select two notes, Cmd-click a second one or lasso them (Shift + drag), then open the Relation Builder to declare your first typed relation.

License

Distributed under the MIT License.