It learns as it runs
The index adapts to your traffic. The package literally ships as a “self-learning vector database.”
ruvector is a toolkit — written in Rust (a systems programming language built for speed and safety) and shipped through npm (JavaScript's standard package installer) — for storing huge numbers of short numeric fingerprints, the compressed stand-ins computers use for the meaning of a photo, a sentence, or a product, and finding the closest ones in a crowd of millions, in milliseconds.
278 components sharing one dependency structure, reachable from a command-line tool or called directly from code.
An independent explainer for rUv (ruvnet)'s ruvector — built to take you from "never seen it" to "ready to implement".
Say you're building something that has to remember a lot — every product a shopper looked at, every support ticket ever filed, every paragraph in a document library — and instantly bring back the handful of items relevant to what someone just asked. A plain list won't do that. Comparing a new question against a million old records one at a time gets slower every day the pile grows, until a search that should take a blink takes seconds, then minutes.
Now say the app also can't go down. If it runs on one machine and that machine dies, every user waiting on it waits with it. Keeping a second, third, or tenth copy of the same data — all correct, all in agreement, even when the network between them is unreliable — is a different kind of hard problem than search. It's the kind where two machines can each believe they hold the truth, disagree, and quietly corrupt the data if nobody catches it.
And say part of the job is better done by more than one worker at once — one piece reviewing code for problems, another piece deciding how the system should fit together, a third piece checking the result before it ships. Coordinating several AI helpers so they don't duplicate work, forget what the others found, or overwrite each other's output is a third problem again, with its own ways to fail.
None of these three problems shares an off-the-shelf answer. Most teams solve them with three or four different open-source projects, glued together by hand, built by people who never talked to each other and never tested their seams under real failure.
ruvector is what's usually called a vector search engine: a system built to compare those numeric fingerprints and return the closest matches, fast, out of collections that can run into the millions. That's its core.
Around that core, the same project ships a distributed database layer — the part that spreads a copy of your data across more than one machine, so one machine going offline doesn't take your search down with it — built from the same underlying pieces as the search engine itself, not bolted on afterward.
It also ships a set of AI agents: small, specialized AI programs with a defined job, ready to be assigned work and report back — one reviews code for quality problems, another designs how a system should fit together — instead of leaving one assistant to do everything in sequence.
All of it lives in one repository: 278 components, individually buildable pieces in Rust or as npm packages, sharing one dependency structure — so the search engine, the reliability layer, and the agents are built to expect each other, not discovered as compatible by accident.
| Layer | What it does |
|---|---|
| Search core | Stores fingerprints, finds the closest matches fast — ruvector-core, ruvector-cli, ruvector-node, ruvector-wasm |
| Reliability layer | Spreads and keeps copies of data in agreement across machines — ruvector-cluster, ruvector-raft, ruvector-replication, ruvector-graph |
| Reasoning layer | Re-ranks and reasons over results — ruvector-gnn, ruvector-gnn-rerank, ruvector-attention, ruvllm |
| AI workforce | Ready-made specialist agent roles, e.g. a code-quality reviewer and a system architect |
Look at how the pieces connect, and a pattern falls out: nearly everything else in the repo — the layer that spreads data across machines, even the layer that double-checks an answer — is built directly on the same core module that runs the basic search.
That's not a coincidence of naming. The same underlying structure that lets the search core jump toward close matches without checking everything is reused to let the reliability layer decide who agrees with whom, and reused again by the layer that re-checks results before they're returned. One fix or speed-up in that shared core lifts every layer built on it, instead of three separate projects each needing their own tuning.
It also explains why the AI agents aren't bolted onto the database as an afterthought — they're built to read and write against the same store the search engine uses, so what an agent finds becomes searchable data immediately, not a note left in a separate system.
The search engine and the reliability engine aren't cousins — they're the same engine, doing two different jobs.
A handful of specific mechanisms carry most of the weight. Each is defined here, once, in plain words, at first use.
The search core is a graph-shaped index — imagine a map where every fingerprint is a landmark linked to its nearest neighbors, so a query starts at one landmark and hops toward closer and closer matches instead of checking the whole map. That shape has a name, HNSW (hierarchical navigable small world), and it's what lets a match come back out of millions of records without scanning all of them; the component is named directly in the repo, ruvector-coherence-hnsw.
Keeping copies of data in agreement uses two strategies depending on how much trust you can assume. Raft is a consensus protocol — a set of rules that lets a group of machines agree on one order of updates by electing a leader and following it (ruvector-raft). CRDTs — conflict-free replicated data types — take the opposite approach: structures built so two machines can each update their own copy independently and always merge back to the same result automatically, without asking permission first; the repo's own synchronizer implements the standard shapes, including a counter that only ever grows, a set that tracks additions and removals separately, and a register that resolves conflicting writes by timestamp [16][17][18][19][20]. For the harder case — some machines not just slow but actively wrong — there's Byzantine fault-tolerant consensus, built to keep a decision correct even when part of the group is lying [14].
The AI agent layer ships as role definitions, not one general-purpose assistant: a code-quality reviewer with a defined job description and trigger conditions [2], a system architect explicitly marked as needing human sign-off on major decisions [9], and others. Above the raw search results, a graph neural network — a model that reasons by passing information along the connections between related items — re-ranks matches (ruvector-gnn-rerank), and an attention layer (ruvector-attention, feeding an inference runtime called ruvllm) weighs which parts of a result matter most before anything is returned.
Most vector stores find nearest neighbours and stop there. RuVector folds a learning index, a nervous-system memory, a graph engine and a transformer into one Rust core — here's the arsenal, each piece shipped in the source.
The index adapts to your traffic. The package literally ships as a “self-learning vector database.”
Recall a whole record from a partial cue, and learn a new pattern in a single shot — biological memory, not a flat store.
Walk relationships and search by similarity in the same query — no second database bolted on.
It reasons over your vectors instead of only fetching them — differentiable, attention-guided search.
Far past nearest-neighbour — seven retrieval strategies built into the core.
From a 64 KB browser tile to a petabyte hub — one portable .rvf, post-quantum signed, with a tamper-evident witness chain.
No server to pay for. It runs in the browser and on devices you already own — trusted or open swarms.
~16,400 queries/sec at sub-100-microsecond latency, with memory squeezed up to 32×.
And on the research bench: learned index structures, neural hashing, topological data analysis, conformal prediction, and per-vector capability-gated security — experimental modules already sitting in the tree.
Three shapes of problem, one project underneath each.
If you're building a product search box, a support-ticket lookup, or a 'find similar' feature, the CLI alone gets you a working prototype: create a store, insert your fingerprints, query it, and see ranked matches before you've written a line of application code.
From there, @ruvector/wasm calls the same index from inside a browser, and the Node.js bindings pulled in by the ruvector package call it from a server — the same store, two ways to reach it.
Once search is load-bearing — a production feature real users depend on — a single machine holding the only copy of the index is a risk. The cluster, replication, and Raft components exist to spread that index across machines that stay in agreement, so one machine going down doesn't take the feature with it.
The bundled agent roles — a code-quality reviewer, a system architect, others — are built to read and write against the same store the search engine uses. Paired with the project's MCP (Model Context Protocol — the standard way tools like Claude connect to outside systems) support, that means several AI assistants can share one fast, queryable memory instead of each starting from a blank context.
There's a real CLI here, not just a library — every command below comes straight from the project's own listed commands.
npm install -g ruvector-cliEverything above was grounded in a full pass over ruvector's source: 37,600 passages across 278 components, indexed so it can be searched and cited rather than guessed at.