nodedb-lite

Library Listed

Embedded edge client for NodeDB — offline vector search, graph traversal, and CRDT sync

Checked · Sources

Downloads
41
Dependents
0
Stars
8
Forks
4
Contributors
4
Commits
254
Latest release
0.1.0 ·

About

From the project README ·

NodeDB

The embedded memory engine for AI agents and local-first apps.

Durable, queryable memory that lives in your app — vector, graph, document, full-text, timeseries, and key-value NodeDB engines in-process, offline by default, syncing conflict-free to NodeDB Origin when connectivity returns. One API, no server required.

Release Status · Platforms · CRDT Sync · Performance · NodeDB Origin

Join the NodeDB Discord

Agent memory and local-first data usually mean a pile of files, or a SQLite database with a vector sidecar, an ad-hoc cache, and a hand-written sync layer. NodeDB Lite is one embedded engine instead: durable, queryable memory in-process, available offline, with conflict-free sync to NodeDB Origin when you want it — and no rewrite to move from edge to cloud.

It's the engine behind ma8e, an in-development memory-and-knowledge layer for coding agents — deterministic capture, hybrid retrieval, and path-level access guards, all on embedded NodeDB Lite.

Read the full README

Release Status

NodeDB Lite is in public beta as of v0.1.0 (2026-10-16). All engines listed in docs/lite-support-matrix.md are feature-complete and covered by tests. The public surface — the NodeDb trait, the supported SQL plan variants, the C FFI ABI, and the WASM / npm bindings — is stable; clients written against 0.1.0 will keep working through 1.0.

v0.1.0 — Beta (today). Use it for embedded workloads and for piloting Lite ↔ Origin sync. The public surface is stable; expect internal changes (pagedb layout, on-disk index format, sync-protocol internals) between minor releases. Patch and minor bumps will land as needed.

v1.0.0 — Production-ready. What 1.0 guarantees:

  • API & SQL stability — semver from 1.0 onward. No breaking changes to the NodeDb trait, the supported SQL plan variants, or the C FFI / WASM ABIs within a major.
  • Sync protocol stability — the Lite ↔ Origin WebSocket wire frames frozen at the version Origin ships in its 1.0.
  • On-disk format stability — no breaking migrations within 1.x. Forward-compatible upgrades only.
  • Platform parity — iOS FFI built and tested against a macOS environment; Android JNI packaging fully gated.
  • Performance SLAs — published p99 targets per engine, regression-gated in CI.
  • Security audit — third-party audit completed and findings remediated before 1.0 ships.

Pre-1.0 versions may change internals between releases — that work is critical-path hardening (persistence layouts, sync coordination, platform packaging) that has to be exercised in real production conditions before we put a stability stamp on it. The public API, SQL surface, and sync wire frames won't break; everything underneath is fair game until 1.0.

Note: This release track applies to NodeDB Lite only. NodeDB Origin, ndb CLI, and NodeDB Studio are versioned independently on their own tracks.

Why NodeDB Lite

  • One embedded engine, not a stitched-together client stack. Vectors, graph, documents, full-text, timeseries, key-value, and other NodeDB data models run in one runtime with shared storage and one query surface.
  • Built for offline-first. Every write is captured as a CRDT delta locally, then merged to Origin when the network comes back.
  • Same API as Origin. The NodeDb trait is identical across Lite and server deployments, so moving from on-device to remote is a connection decision, not an architecture rewrite.
  • Edge-ready. Linux, macOS, Windows, Android, and browser/WASM in 0.1.0; iOS lands before 1.0.

When to Use

  • Mobile apps that need to work offline
  • AI agents that need local memory (vectors + graph + documents)
  • Browser-based apps (WASM, target: < 10 MB)
  • Desktop applications with local-first data
  • IoT gateways with intermittent connectivity

Platforms

PlatformCrateBackendSize
Linuxnodedb-litepagedb (file-backed)Native
macOSnodedb-litepagedb (file-backed)Native
Windowsnodedb-litepagedb (file-backed)Native
Androidnodedb-lite-ffipagedb + C FFI + Kotlin/JNINative
iOS (in progress — not in 0.1.0)nodedb-lite-ffipagedb + C FFI (cbindgen)Native (requires macOS build environment — not yet built/tested)
Browsernodedb-lite-wasmpagedb (in-memory + OPFS)Target: < 10 MB

Packages

# Rust
cargo add nodedb-lite

# JavaScript / TypeScript (browser + Node)
npm install @nodedb-lab/nodedb-lite

Quick Start

The Rust crate API in 0.1.0:

use nodedb_lite::{NodeDbLite, PagedbStorageMem};
use nodedb_client::NodeDb;

// Open an in-memory database. The constructor returns an Arc.
// Background flushing uses auto_flush_ms as an interval, without a deadline guarantee.
// In-memory storage remains volatile after flush().
let storage = PagedbStorageMem::open_in_memory().await?;
let db = NodeDbLite::open(storage).await?;

// Insert a document
db.execute_sql("CREATE COLLECTION notes", &[]).await?;

// Put a document via the typed API
use nodedb_types::document::Document;
let mut doc = Document::new("n1");
doc.set("title", "Hello".into());
db.document_put("notes", doc).await?;

// Vector search
let embedding = vec![1.0_f32, 0.0, 0.0];
db.vector_insert("articles", "a1", &embedding, None).await?;
// vector_search(collection, query, k, filter, allowed_ids)
let results = db.vector_search("articles", &embedding, 10, None, None).await?;

// Graph traversal
use nodedb_types::{graph::Direction, id::NodeId};
let start = NodeId::try_new("alice")?;
let subgraph = db.graph_traverse("social", &start, 3, Direction::Out, None).await?;

Same API, Any Runtime

The NodeDb trait is identical across Lite and Origin. Application code doesn't change for the operations both implementations expose — Origin offers more (full SQL, Array DDL/DML, vector quantization, distributed search); see docs/lite-support-matrix.md for the exact Lite surface.

// Works with both NodeDbLite (in-process) and NodeDbRemote (over network)
async fn search(
    db: &dyn NodeDb,
    query: &[f32],
) -> nodedb_types::error::NodeDbResult<Vec<nodedb_types::result::SearchResult>> {
    db.vector_search("articles", query, 10, None, None).await
}

Moving from embedded to server is a connection string change, not a rewrite.

CRDT Sync

Every write produces a delta. Deltas sync to Origin over WebSocket when online. Multiple devices converge regardless of operation order.

Offline:    App writes locally -> Loro generates delta -> delta persisted to pagedb
Reconnect:  Device opens WebSocket -> sends vector clock + accumulated deltas
Cloud:      Origin validates (RLS, UNIQUE, FK) -> merges -> pushes back missed changes
Conflict:   Rejected deltas -> dead-letter queue + CompensationHint -> device handles
Converged:  Device and cloud share identical Loro state hash
  • Shape subscriptions -- Control what data each device holds: WHERE user_id = $me, not the entire database
  • Conflict resolution -- Declarative per-collection policies. SQL constraints (UNIQUE, FK) enforced on Origin at sync time with typed compensation hints back to the device.
  • ACK-based flow control (AIMD), CRC32C delta integrity, JWT token refresh, replay dedup

The sync Cargo feature gates the WebSocket client and is on by default. Build with --no-default-features to ship a native binary with no network code. That build links no WebSocket client and has no start_sync. Local change capture still compiles.

nodedb-lite = { version = "0.1", default-features = false }

Key Features

  • Multi-model locally -- Vector, graph, document, full-text, timeseries, key-value, and more, all in-process with no network
  • Sub-millisecond reads -- Hot data lives in memory indexes (HNSW, CSR, Loro)
  • SQL -- Supports a documented subset of NodeDB's SQL surface; see SQL support below.
  • Encryption at rest -- AES-256-GCM + Argon2id key derivation
  • Memory governance -- Per-engine budgets, pressure levels, LRU eviction

SQL support

NodeDB Lite parses SQL via nodedb-sql and executes supported plans against local engines. SQL coverage includes document mutations, joins, aggregates, CTEs, and search index declarations. Unsupported plans return LiteError::Unsupported. The regression gates include tests/sql_matrix.rs and tests/sql_parity.rs.

See docs/lite-support-matrix.md for the full engine, SQL, and sync support matrix.

Performance

MetricTarget
Vector search (1K vectors, 384d, k=5)< 1ms p99
Graph BFS (10K edges, 2 hops)< 1ms p99
Document get< 0.1ms
Cold start (10K vectors + 100K edges)< 500ms
Sync round-trip (single delta)< 200ms
WASM bundle< 10 MB
Mobile memory< 100 MB

Workspace

This repository contains three crates:

CrateDescription
nodedb-liteCore embedded database library
nodedb-lite-ffiC FFI bindings for Android (cbindgen, Kotlin/JNI); iOS lands before 1.0
nodedb-lite-wasmJavaScript/TypeScript bindings via wasm-bindgen

Building from Source

git clone https://github.com/NodeDB-Lab/nodedb-lite.git
cd nodedb-lite

# Build all crates
cargo build --release

# Build WASM
cargo build -p nodedb-lite-wasm --target wasm32-unknown-unknown --release

# Run tests
cargo test

For local development against the NodeDB workspace, create .cargo/config.toml:

[patch.crates-io]
nodedb-types = { path = "../nodedb/nodedb-types" }
nodedb-client = { path = "../nodedb/nodedb-client" }
nodedb-codec = { path = "../nodedb/nodedb-codec" }
nodedb-crdt = { path = "../nodedb/nodedb-crdt" }
nodedb-query = { path = "../nodedb/nodedb-query" }
nodedb-spatial = { path = "../nodedb/nodedb-spatial" }
nodedb-graph = { path = "../nodedb/nodedb-graph" }
nodedb-vector = { path = "../nodedb/nodedb-vector" }
nodedb-fts = { path = "../nodedb/nodedb-fts" }
nodedb-strict = { path = "../nodedb/nodedb-strict" }
nodedb-columnar = { path = "../nodedb/nodedb-columnar" }
nodedb-array = { path = "../nodedb/nodedb-array" }
nodedb-sql = { path = "../nodedb/nodedb-sql" }
nodedb-physical = { path = "../nodedb/nodedb-physical" }

License

Apache-2.0 — see LICENSE. NodeDB Lite is fully open source, with no BSL anywhere in its dependency tree: it builds only on NodeDB's Apache-2.0 engine and foundation crates. The Business Source License applies only to the NodeDB Origin server — never to Lite. Embed it anywhere: apps, browsers (WASM/OPFS), mobile, desktop, edge.

Runs on
GPU support unknown
What shows it
  • no dependency or feature matches a backend row
Native code
Required
  • Binds native code: zstd-sys
Python bindings
No Python binding crate found
License
Apache-2.0

Compare with similar projects

Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.

nodedb-lite beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
nodedb-lite This page Listed

Embedded edge client for NodeDB — offline vector search, graph traversal, and CRDT sync

41 downloads over 30 days 0 8 0.1.0 GPU support unknown Binds native code: zstd-sys Apache-2.0
qdrant App Featured

Qdrant - High-performance, massive-scale Vector Database and Vector Search Engine for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/

Also in Text, embeddings and search.

34,017 binary downloads per release Not applicable 35,478 Not measured Not measured Apache-2.0
ruvector Listed

High-performance Rust vector database core with HNSW indexing

Also in Build LLM apps and agents.

39,411 downloads over 30 days 51 4,675 2.5.0 CUDA, WebGPU, Metal Binds native code: libsqlite3-sys, napi-sys, ort-sys, pgrx-pg-sys, pqcrypto-internals and 5 more MIT
nodedb Listed

Local-first, real-time, edge-to-cloud hybrid database for multi-modal workloads

Also in Build LLM apps and agents.

35 downloads over 30 days 3 246 0.6.2 GPU support unknown Binds native code: libz-sys, rdkafka-sys, ring, tikv-jemalloc-sys, zstd-sys BUSL-1.1
edgevec Listed

High-performance embedded vector database for Browser, Node, and Edge

Also in Text, embeddings and search.

14 downloads over 30 days 1 100 0.9.0 GPU support unknown No native code found Apache-2.0 OR MIT
blazr App Listed

Inference server for LLMs, speech and embeddings: OpenAI-compatible routes with streaming, plus speech synthesis (TTS) and transcription (ASR). Serves Llama, Mistral, Qwen, Mamba2, MLA+MoE and hybrid models from SafeTensors, AWQ, GPTQ and GGUF.

Also in Build LLM apps and agents.

8 binary downloads per release Not applicable 7 0.7.1 CUDA, WebGPU Binds native code: ring (feature distributed) Apache-2.0
satoriDB App Listed

High performance embedded vector database

Also in Build LLM apps and agents.

0 binary downloads per release Not applicable 245 Not measured Not measured MIT
Why ListedNo archive, New or Featured rule places it, so it is Listed.

What it lacks for Featured

  • It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 8 stars, 4 forks and 4 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.

What else the check found

  • The last activity is on 16 Oct 2026, 24 days ago. The rules expect an update within 365 days. Dormancy rule

Exact rules: Listed, Featured library. The check on applied thresholds version 9.

Every rule outcome, as the check records it
  • expected-interval: version 0.1.0 base 80, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2026-10-16, 24 days ago, E = 365: active
  • featured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 8 (needs 4539), forks 4 (needs 434), contributors 4 (needs 79)
  • listed: listed: no archive, new or featured rule applies
Crates3 crates

Measurements and sources

Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.

Sources6 sources
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents0crates.io database dumpYes
New dependents (365 days)0crates.io database dumpYes
Peak active dependents0crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 24 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-10-16GitHub repositoryYes
Latest release2026-10-16crates.io database dumpYes
First release2026-03-29crates.io database dumpYes
Latest version0.1.0crates.io database dumpYes
Days the oldest outside issue waits for a reply0GitHub repositoryYes
Maintainer replies over 365 days25GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution2 releases, 41 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases2crates.io database dumpYes
Downloads over 30 days41crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository8 stars, 4 forks, 4 contributors, 254 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars8GitHub repositoryYes — one part of the repository route
GitHub forks4GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account4GitHub contributorsYes — one part of the repository route
Commits on the default branch254GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0crates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: zstd-syscrates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly0crates.io database dumpNo

Corrections and review history

Report a correction

No correction applies to this entry.

Judgments

A judgment enters only through an approved issue and a merged pull request.

No judgment applies to this entry.