// architecture

The session log is the database’s write-ahead log.

VHDB reads the ledger that smart-workbench already writes and the log the plugin keeps itself. Everything else — segments, indexes, the manifest — is derived, and can be deleted and rebuilt from the logs alone.

01

The log is the WAL

Reads sessions/*.jsonl as written by smart-workbench, read-only. Derived files can be deleted and rebuilt from the log; the result is identical.

02

Immutable files, atomic swap

Checksummed segments are written first; replacing MANIFEST atomically is what makes new state visible. Crash at any point, re-read the same bytes, reach the same result.

03

Indexed search, exhaustive truth

The fast path is continuously checked against scoring every candidate one by one — same documents, same order, same score bits — on random data.

04

One engine, three places

The same engine crate runs as WASM inside the Claude Code plugin, as a personal daemon, and as a team server.

smart-workbench sessions/*.jsonl · WAL, read-only Claude Code plugin vhdb/log/*.jsonl · its own log ingest (incremental, idempotent) vhdb-core — the engine, no OS I/O data/seg-*.vdb record segments index/idx-*.sst terms · files · commits MANIFEST list of valid files vhdb-wasm personalWASM inside the plugin vhdbd personallocal daemon · unix socket vhdb-server team · HTTP + tokensper-project isolation
CrateRoleShips as
vhdb-coreThe engine: segments, index SSTs with bloom filters, MANIFEST, ingest, compaction, search (VQL, BM25), recovery, partitions, tiers, vectors, history logic.Library
vhdb-cliThe vhdb command: stat, ingest, search, history, verify, compact, rebuild, dump, archive.Installed as vhdbctl in server packages
vhdb-wasmThe engine as a single WASM file with a Node host for file access.Bundled in vhdb-plugin as engine/vhdb.wasm
vhdbdOne local daemon per project directory. Holds the write lock, follows the log tail, answers over a unix socket.cargo build --release -p vhdbd
vhdb-serverTeam server: ingest and compaction, /v1/* API, accounts, projects and tokens, audit log..deb, .rpm, tar.gz (x86_64, aarch64)

The core depends only on serde, serde_json, regex-lite and miniz_oxide. The server adds TLS and hashing. Minimum Rust is 1.85.

What gets stored

A record is one line of the ledger: session id, turn, time, a kind, a body, and optional fields such as file or commit.

promptreplytool.starttool.endeditcommitdecisionerrorcheckcontractguard.*anchorrollup

Give your sessions a memory.

MIT licensed. Source on GitHub.