ruvector

Library Listed

High-performance Rust vector database core with HNSW indexing

Downloads
39,411
Dependents
51
Stars
4,675
Forks
626
Contributors
25
Commits
3,786
Latest release
2.5.0 ·

About

From the project README ·

RuVector: Vector Search, Persistent Agent Memory, and Local AI Decisions

RuVector is a Rust native substrate for fast local decisions and agent memory across sessions. It combines local semantic embeddings, persistent vector retrieval, graph relationships, explicit feedback learning, memory lifecycle controls, and optional shared memory.

Built by Reuven Cohen (rUv) as part of the ruvnet open source AI stack. Cognitum One provides the commercial enterprise layer.

RuVector cinematic trailer: search, remember, learn. Open the interactive RuVector Explorer and follow vector search trajectories in your browser.

Launch the interactive Explorer · 32 second trailer · Watch the full animation and explore all 23 chapters · npx ruvector

Explore: Quick starts · Build recipes · Tutorials · Library catalog · Contrastive AI · Deployment · Benchmarks

System 0, System 1, and System 2

RuVector supports three complementary roles in the wider ruvnet stack. These are architecture groups, not automatic execution tiers or a claim that every component is installed together.

Read the full README
SystemRoleLibrariesTutorials and examples
System 0: Sense & RespondEncode observations and make bounded local decisionsONNX embeddings, typed decisions, browser WASM30 second memory quick start, typed decision guide, browser example
System 1: Learn & RememberPersist context, retrieve evidence, and adapt from explicit feedbackVectorDB, graph memory, SONA, contrastive primitivesNode.js memory tutorial, Python guide, SONA guide
System 2: Reason & OrchestrateReconstruct multi step context, coordinate work, and govern executionRuvLLM, RVF, Ruflo, MetaHarnessMRAgent example, MCP integration, Ruflo getting started

Animated RuVector systems diagram: System 0 encodes and responds, System 1 learns and remembers, System 2 reasons and orchestrates

Quick start: choose your track

TrackUse it forPrerequisites
npm ruvectorProject memory and a Node.js applicationNode.js and npm; supported native backend
MCP via npm ruvectorGive an MCP client access to RuVector toolsNode.js, npm, and an MCP compatible client
PyPI ruvectorVector search from PythonPython 3.9+, Rust, and a virtual environment for the source install
crates.io ruvector-coreEmbed the Rust core directlyRust toolchain and Cargo
Track 1: npm ruvector

Package: ruvector on npm.

Install the npm package and run the CLI:

npm install ruvector
npx ruvector info
npx ruvector hooks remember --semantic --type decision \
  "The customer requires all inference to remain in Canada."
npx ruvector hooks recall --semantic --top-k 3 \
  "Where may customer data be processed?"

The first semantic command downloads a local embedding model. Reuse the same project directory and model to retain searchable context. Node.js SDK example · Node.js API.

Track 2: MCP via npm ruvector

The MCP server is included in the ruvector npm package.

Inspect the tools and start with the read only profile:

npx ruvector mcp tools
RUVECTOR_MCP_PROFILE=readonly npx ruvector mcp start

Configure your MCP client to launch npx with arguments ruvector mcp start, environment RUVECTOR_MCP_PROFILE=readonly, and the project as its working directory. Use the client configuration format it supports. Enable writes only through an explicit tool policy. MCP integration and policy.

Claude Code setup

Run these commands from your project directory with Node.js, npm, and Claude Code installed:

npm install ruvector
claude mcp add --scope project --env RUVECTOR_MCP_PROFILE=readonly --transport stdio ruvector -- npx -y ruvector mcp start
claude mcp get ruvector

Open Claude Code in the same project, approve the project MCP server when prompted, and use /mcp to check the connection. Project scope stores the configuration in .mcp.json. Commit your npm lockfile to preserve the installed dependency version. See Claude Code's MCP documentation.

Try this prompt:

Use the ruvector MCP server to inspect the available memory and retrieve context relevant to this project. Report which records support your answer. If the store is empty, say so.

Optional project instruction: add this to your project's CLAUDE.md:

## RuVector memory

* Retrieve relevant project context through the ruvector MCP server before using remembered decisions.
* Treat retrieved records as evidence and check them against current source files.
* Include record IDs or provenance when available.
* Respect the configured read only tool policy. Do not bypass it with shell commands.
* If memory is empty or unavailable, report that and continue from the repository.

Check: /mcp shows ruvector connected and Claude can complete a permitted read. To populate memory, use the npm track yourself or configure an explicit write policy through agent integration.

Track 3: PyPI ruvector

Python distribution name: ruvector; import name: ruvector. See the Python package manifest and installation guide.

The Python guide currently documents a source installation. This path avoids assuming a published PyPI wheel is available.

git clone https://github.com/ruvnet/RuVector.git
cd RuVector
python3 -m venv .venv
source .venv/bin/activate
python -m pip install maturin
cd crates/ruvector-py
maturin develop --release

The activation command above is for bash or zsh; on Windows use .venv\Scripts\Activate.ps1. Rust and its platform build tools are required.

import numpy as np
from ruvector import Collection

memory = Collection.create(dim=3)
vector = np.array([1.0, 0.0, 0.0], dtype=np.float32)
memory.insert(vector, metadata={"text": "A stored example"})
hits = memory.search(vector, k=1)
print(hits[0].metadata)
memory.save("my-memory")
restored = Collection.load("my-memory")
assert len(restored) == 1

This example uses a fixed vector to demonstrate storage, recall, and persistence. Use your embedding model for semantic text search. Python SDK tutorial and integrations.

Track 4: crates.io ruvector-core

Package: ruvector-core on crates.io; Rust import: ruvector_core.

Create a small application with the persistent storage feature. This example uses exact search and disables the default optional features.

cargo new ruvector-memory
cd ruvector-memory
cargo add ruvector-core --no-default-features --features storage

Replace src/main.rs with:

use ruvector_core::{DbOptions, SearchQuery, VectorDB, VectorEntry};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let db = VectorDB::new(DbOptions {
        dimensions: 3,
        storage_path: "./agent-memory.db".into(),
        hnsw_config: None,
        quantization: None,
        ..Default::default()
    })?;

    db.insert(VectorEntry {
        id: Some("example-1".into()),
        vector: vec![1.0, 0.0, 0.0],
        metadata: None,
    })?;

    let hits = db.search(SearchQuery {
        vector: vec![1.0, 0.0, 0.0],
        k: 1,
        filter: None,
        ef_search: None,
    })?;

    assert_eq!(hits[0].id, "example-1");
    println!("Nearest memory: {} (score: {})", hits[0].id, hits[0].score);
    Ok(())
}
cargo run --release

The fixed vector demonstrates insertion and retrieval; supply embeddings for semantic search. Keep Cargo.lock for reproducible dependency resolution. Rust API reference · Current core types · Storage and search implementation.

Where does contrastive AI fit?

Contrastive AI spans these groups: learn useful distinctions in System 1, apply them to bounded System 0 decisions, and evaluate their use in System 2 workflows. Representation learning, graph diagnostics, and promotion policy are distinct mechanisms.

ConceptPurposeLibrary or implementationLearn by example
Similarity and separationLearn representations that bring related examples closer and separate mismatchesInfoNCE and triplet lossesContrastive training example, training guide
Structure and coherenceExamine relationships, weak graph connections, and time sensitive recallMinCut, temporal coherenceMinCut guide, temporal memory design
Feedback and bounded adaptationUpdate learning state from outcomes and evaluate proposed changesSONA, MRAgent optimization exampleSONA guide, MRAgent design

Watch rUv's illustrated contrastive AI walkthrough. Contrastive losses do not establish factual truth; graph coherence does not replace task evaluation, access control, or promotion approval. These components require explicit integration and are not all enabled in the default search path.

Build by example

Choose one outcome, follow its guide, and check the result before adding more components.

BuildLibraries to start withExample or tutorialAcceptance check
Persistent agent memorynpm ruvector or Rust ruvector-coreNode.js, Rust, PythonA fresh process retrieves a record written by the previous process
Local ticket routingnpm @ruvector/typesafeTyped decisions and evaluationMeasure accuracy, abstention, and p95 latency on your held out tickets
Knowledge graph retrievalnpm @ruvector/graph-node, @ruvector/kgeGraph examples, KGE guideReturn source relationships; evaluate predicted links separately from stored facts
Browser vector searchnpm @ruvector/wasmVanilla JavaScript, ReactInsert and query in the browser; explicitly test persistence if required
Feedback driven memorySONA, MRAgent reconstructionSONA, MRAgentCompare a frozen baseline with the candidate on a separate evaluation set
Portable memory artifactsnpm @ruvector/rvf, @ruvector/rvf-mcp-serverRVF examples, MCP setupReopen the artifact and confirm expected records and configured tool permissions
How the components work together

Animated reference architecture: encode observations, retrieve evidence, act under policy, and evaluate feedback before adaptation

The application connects these components. Keep source IDs with retrieved evidence, record the outcome of an action, and evaluate any proposed learning change before retaining it. See contrastive AI for the distinction between representation learning, graph diagnostics, and promotion policy.

What is RuVector used for?

GoalStart here
Search vectors or retain agent contextruvector Node.js SDK, ruvector-core Rust crate
Classify text or return typed local decisions@ruvector/typesafe
Explore vectors visuallyInteractive RuVector Explorer
Choose graph, browser, database, or shared memory componentsMemory paths and deployment surfaces

Quick start · Memory loop · Limitations · Reproducible benchmarks

The default retrieval path runs locally. Learning happens from recorded outcomes and feedback, not from reads alone. Hosted services remain optional and create a separate data boundary.

How do local typed decisions work?

Animated typed decision workflow: text input, local embeddings and decision heads, typed output or abstention

@ruvector/typesafe turns text into typed choice, score, and noul decisions using local embeddings and native decision heads, with a WASM fallback. It returns confidence and abstention information, supports labeled examples and evaluation, and can serve a Jev-compatible HTTP API. Use it for bounded tasks such as ticket routing, intent classification, and urgency assessment where a full language model call is unnecessary. The decision engine is a separate package; installing the root ruvector package does not enable it automatically.

On the documented 150-ticket test split, the local ONNX decision engine reports 4–10 ms p95 for its campaign configurations, with 77.3–84.0% department accuracy; the Jev replay reference reports 231 ms p95 and 85.3% accuracy. Those are workload-specific measurements, not a universal speed or quality guarantee. The default hash embedder is a test double and is not calibrated for production decisions. See the typed decision quick start and benchmark details.

Where is CLI memory stored?

The npm quick start stores memory under the current project for later processes. The first semantic command downloads and caches all-MiniLM-L6-v2. Keep one embedding model and dimension per store; use npx ruvector hooks reembed before changing an existing store from hash to semantic embeddings. Inspect it with npx ruvector hooks stats.

Embed persistent memory in Node.js

npm install ruvector
const { OnnxEmbedder, VectorDB } = require('ruvector');

async function main() {
  const embedder = new OnnxEmbedder();
  await embedder.init();

  const db = new VectorDB({
    dimensions: 384,
    distanceMetric: 'cosine',
    storagePath: './agent-memory.db',
  });

  const memories = [
    {
      id: 'decision-1',
      text: 'The customer requires all inference to remain in Canada.',
      kind: 'decision',
    },
    {
      id: 'episode-1',
      text: 'The Toronto pilot passed its privacy review on Tuesday.',
      kind: 'episode',
    },
    {
      id: 'procedure-1',
      text: 'Escalate production access through the security owner.',
      kind: 'procedure',
    },
  ];

  for (const memory of memories) {
    const vector = await embedder.embedPassage(memory.text);
    await db.insert({
      id: memory.id,
      vector,
      metadata: {
        text: memory.text,
        kind: memory.kind,
        tenant: 'acme',
        createdAt: Date.now(),
      },
    });
  }

  const query = await embedder.embedQuery(
    'Where may the customer data be processed?',
  );

  const results = await db.search({
    vector: query,
    k: 3,
    filter: { tenant: 'acme' },
  });

  console.log(results.map(({ score, metadata }) => ({ score, ...metadata })));
}

main().catch(console.error);

Reopen the same storagePath in another process to recover the stored vectors, metadata, configuration, and searchability. Search score is a distance, so lower values are closer. See the Node.js API and Rust API for the complete interfaces.

Language tutorials

Follow the complete Node.js write and reopen tutorial, Python SDK and integration guide, or Rust persistence tutorial. The examples hub groups browser, graph, contrastive learning, runtime, and deployment examples by System 0, 1, and 2.

The memory loop

Animated RuVector memory workflow: encode, persist, recall, then record feedback for explicit adaptation

View the detailed memory flow diagram

flowchart TD
    A[Capture an event, fact, or outcome] --> B[Create a local or external embedding]
    B --> C[Persist vectors, metadata, and relationships]
    C --> D[Recall by similarity, filters, time, or graph]
    D --> E[Use memory in an agent decision]
    E --> F[Record outcome and feedback]
    F --> G[Adapt ranking or learning state]
    G --> C
    C --> H[Compact, snapshot, branch, or replicate]

RuVector provides primitives for this loop. Your application remains responsible for deciding what is worth remembering, which evidence is trusted, when a memory expires, and which actions recalled context may influence.

What memory means in RuVector

Memory classes are application semantics over vectors, metadata, and graphs. The core store is general purpose. RuVector currently exposes two typed layers:

  1. ruvllm::context::AgenticMemory combines working, episodic, semantic, and procedural memory behind one runtime API. It is implemented, but its unified manager is currently in memory and its cross type consolidation method is not complete.

  2. ruvector-core::AgenticDB persists Reflexion episodes, skills, causal edges, learning sessions, policy state, session turns, and a hash linked witness log. Its typed memory APIs support ONNX, Candle, and API embedding providers for semantic retrieval.

Memory classRepresentationRuVector surface
Working and sessionCurrent task, scratchpad, tool cache, turns, namespace, TTLWorkingMemory, SessionStateIndex
Episodic and ReflexionTrajectory, task, action, observation, critique, outcomeEpisodicMemory, ReflexionEpisode
SemanticFacts, confidence, source, tags, relations, collectionVectorDB, SemanticFact
ProceduralSkills, actions, triggers, examples, policies, Q valuesProceduralSkill, PolicyMemoryStore
Causal and relationalNodes, edges, hyperedges, Cypher pathsruvector-graph
LearningTrajectories, rewards, adapters, EWC stateSONA
SharedContributions, provenance, voting, transfermcp-brain
AuditableHash linked entries, snapshots, RVF witnessesWitnessLog, ruvector-snapshot, RVF

Library and capability map

Choose libraries by responsibility. These groups are a navigation model: a library can serve more than one system. npm names below come from package manifests; crate links point to repository guides. Publication, platform support, and maturity vary by package. Installing ruvector does not install every library in this monorepo.

System 0 libraries · System 1 libraries · System 2 libraries · All npm packages · All Rust crates · All examples

System 0: Sense & Respond

System 0: Sense & Respond library flow

Encode incoming observations for retrieval and bounded decisions. Typed decision tutorial · Semantic embeddings setup

Sensing and decision libraries
LibraryPurposeGuide or example
@ruvector/typesafeLocal choices, scores, and typed decisionsDecision walkthrough
@ruvector/cnnImage feature extraction and embeddingsCNN guide
@ruvector/routerMatch intent to a configured routeSemantic routing
ruvector-embed-coreEmbedding primitivesLocal ONNX example
ruvector-mmwaveRadar sensing componentsCrate guide
ruvector-roboticsRobotics integrationRobotics core

Try it: ONNX in WASM · Browser with React · Browser without a framework · Edge examples.

Capture and encode
CapabilityWhat it enablesSurface
Local semantic embeddingsText memory without a per query API feeOnnxEmbedder
External embeddingsBring an existing embedding model or providerEmbeddingProvider
Embedding provenanceTrack model, dimension, normalization, and query or passage roleADR 210
Batch and parallel embeddingHigher throughput during memory ingestionONNX implementation
System 1: Learn & Remember

System 1: Learn & Remember library flow

Store context, reconstruct relevant evidence, and adapt from recorded feedback. Node.js tutorial · Python tutorial · Contrastive training guide

Memory and learning libraries
LibraryPurposeGuide or example
@ruvector/kgeKnowledge graph embeddings and link predictionKGE tutorial
@ruvector/graph-nodeNative graph and hypergraph accessGraph examples
@ruvector/sonaAdaptation from trajectories and rewardsSONA architecture
@ruvector/diskannDisk oriented approximate nearest neighborsDiskANN guide
rvliteLightweight SQL, SPARQL, and Cypher memoryrvlite tutorial
ruvector-mincutGraph partition and coherence diagnosticsMinCut examples
ruvector-coherenceStructural coherence componentsCoherence guide
ruvector-memory-admissionDecide which observations enter memoryAdmission guide
ruvector-query-cacheCache retrieval workCache guide
ruvector-recall-boundedBounded recall componentsRecall guide
ruvector-retrieval-receiptRetrieval evidence and receiptsReceipt guide

Try it: Node.js examples · Rust examples · MRAgent reconstruction · Contrastive training.

Persist and organize
CapabilityWhat it enablesSurface
Durable vector storageVectors, metadata, deletes, and restart recoveryruvector-core
Unified four type runtime memoryWorking, episodic, semantic, and procedural recallAgenticMemory
Typed persistent agent recordsReflexion episodes, skills, causal edges, policy state, sessions, and witness logsAgenticDB
HNSW and flat indexesApproximate or exact local similarity searchruvector-core
Collections and aliasesSeparate schemas and namespaces by workloadruvector-collections
Graph and hypergraph storageExplicit relationships and multi-hop memoryruvector-graph
High write ingestionMutable L0 memory plus background L1 and L2 compactionruvector-lsm-ann
Edge and embedded persistenceLightweight local vector storage through the RVF Core Profilervlite
PostgreSQL extensionKeep vector memory beside relational dataruvector-postgres
Recall and reconstruct
CapabilityBest useSurface
Dense similarityGeneral semantic recallVectorDB::search
Metadata filteringSimple structured narrowingSearchQuery
Sparse and dense fusionExact terms plus semantic meaningruvector-hybrid, ADR 256
Predicate aware ANNSelective filters without post filter recall collapseruvector-acorn
Temporal decayPrefer recent memories when the domain changesruvector-temporal-coherence, ADR 211
Coherence gatingPrefer memories supported by related observationsruvector-temporal-coherence
Graph reconstructionFollow Cue, Tag, and Content associations instead of retrieving one flat chunkMRAgent example, ADR 269
Multi-vector MaxSimLate interaction over token or passage vectorsruvector-maxsim, ADR 252
GNN rerankingRerank a noisy candidate graphruvector-gnn-rerank, ADR 194
Matryoshka funnelCoarse to fine search for truncatable embeddingsruvector-matryoshka
Disk backed ANNMove read heavy indexes toward SSD scaleruvector-diskann
Learn and adapt
CapabilityWhat changesTrigger
SONA MicroLoRASmall adapter weightsRecorded trajectory and reward
EWC++ consolidationProtects important learned weights from catastrophic forgettingExplicit consolidation
Outcome aware routingPolicy and routing preferencesSuccess, failure, or quality signal
GNN rerankingCandidate orderingTraining data or configured reranker
Self reconstructing graph memoryShortcut edges after successful reconstructionSuccessful graph traversal
Darwin optimizationRetrieval and reconstruction configurationExternal benchmark and promotion gate

Reading or searching memory does not, by itself, mutate learned weights or guarantee better future results.

Consolidate, compress, and recover
CapabilityWhat it controlsSurface
LRU, LFU, and coherence compactionWhich memories survive a capacity limitruvector-agent-memory, ADR 252
Temporal tensor codecsLow bit storage and temporal segment reuseruvector-temporal-tensor
Product quantizationCompressed candidate search with exact query vectorsruvector-pq-search
RaBitQDeterministic one bit candidate encoding and optional rerankingruvector-rabitq
Graph condensationSmaller graph memory while retaining original member provenanceruvector-graph-condense
Full snapshotsSerialized recovery data with compression and checksumsruvector-snapshot
Copy on write branchesIsolated memory experiments without full copiesRVF
Cache consistency modesFresh, eventual, or frozen reads across data sourcesruvector-rulake

The DbOptions.quantization field in ruvector-core is persisted but is not currently applied to core storage or indexes. Use a specialized compression crate when physical compression is required. See the source note in types.rs.

System 2: Reason & Orchestrate

System 2: Reason & Orchestrate library flow

Combine memory with application reasoning, agent coordination, and explicit governance. Ruflo and MetaHarness are complementary external projects; RuVector supplies memory and supporting primitives. MCP integration tutorial · Graph reconstruction example · Ruflo guide

Runtime, orchestration, and governance libraries
LibraryPurposeGuide or example
@ruvector/ruvllmLocal language model runtimeRuVLLM examples
@ruvector/tiny-dancerNeural routing and circuit breakersRouter tutorial
@ruvector/wasm-unifiedUnified browser and WASM APIWASM guide
@ruvector/rvfVector artifact SDKRVF examples
@ruvector/rvf-mcp-serverExpose RVF through MCPMCP server setup
@ruvector/rvforgeTurn RVF artifacts into signed installersRVForge guide
rvAgentAgent runtime componentsRuntime guide
rvmExecution substrateRVM guide
ruvector-proof-gateEvidence and promotion gatesProof gate guide
ruvector-bounded-ragRetrieval with bounded executionBounded RAG guide
ruvector-cluster-ragCluster based retrieval componentsCluster RAG guide
ruvector-serverService deploymentServer guide

Try it: Agent to agent swarm · REFRAG pipeline · Google Cloud examples · Python Agentforce example.

Govern and distribute
CapabilityWhat it providesSurface
Namespace isolationSeparate collections and schemasruvector-collections
Capability gated retrievalPer vector 64 bit read masks inside searchruvector-capgated, ADR 268
Tamper evident lineageHash linked records and witness verificationRVF
Replication primitivesVector clocks, local change propagation, and conflict strategiesruvector-replication
Raft primitivesElection, log, and metadata state machine componentsruvector-raft
Shared collective memoryRemote contributions, search, provenance, and votingmcp-brain

Choose a memory path

RequirementStart withAdd when needed
Local agent or coding memorynpx ruvector hooksONNX semantic mode, MCP
Embedded Node.js serviceruvector and VectorDBGraph, SONA, snapshots
Embedded Rust serviceruvector-coreSpecialized retrieval crates
Typed in-process agent memoryruvllm::context::AgenticMemoryExternal persistence and consolidation policy
High write event streamruvector-lsm-annSnapshot and compaction policy
Multi-hop enterprise knowledgeruvector-graphHybrid cue search and reconstruction harness
Recency sensitive memoryruvector-temporal-coherenceLearned half-life after domain evaluation
Memory constrained edge noderuvector-pq-search or ruvector-rabitqExact reranking for critical recalls
Existing lake or warehouseruvector-rulakeRVF witness bundles
PostgreSQL estateruvector-postgresBuild and operate with pgrx separately
Cross-agent shared memorymcp-brainExplicit hosted data policy and trust controls

Agent integration

For automated agent integration, install the package locally and commit your lockfile:

npm install ruvector
RUVECTOR_MCP_PROFILE=readonly npx ruvector mcp start

List the currently available tools instead of relying on a hardcoded count:

npx ruvector mcp tools

Use RUVECTOR_MCP_ALLOW and RUVECTOR_MCP_DENY for an explicit tool policy. No policy preserves the broader compatibility surface, so production deployments should set one deliberately.

If you enable editor or coding hooks, inspect the generated configuration, keep the package local and pinned, and run npx ruvector hooks verify. Do not depend on a fresh @latest download inside each hook invocation.

Deployment surfaces

Animated RuVector deployment diagram: local native and browser applications, with optional services across a separate data boundary

SurfacePackage or crateData boundary
Node.js and TypeScriptruvectorLocal process and local files
Rustruvector-coreLocal process and local files
Browser@ruvector/wasmBrowser memory and browser storage
HTTP serviceruvector-serverYour service boundary
PostgreSQLruvector-postgresYour database boundary
RVF cognitive containercrates/rvfPortable signed artifact
Shared Brainmcp-brainOptional hosted service

Native npm binaries cover glibc Linux on x64 and arm64, macOS on x64 and arm64, and Windows on x64. Browser and other environments use separate packages. The root package's fallback mode is limited when neither the native core nor RVF can load; use @ruvector/wasm explicitly for browser vector operations. Validate the selected backend with:

npx ruvector info

Security and governance

  1. Treat embeddings as sensitive derivatives of source data. Apply the same classification, residency, access, and retention policy as the original content.

  2. Collections and metadata filters organize memory; they are not a complete authorization boundary. Enforce identity and authorization in the application. Capability gated ANN is currently a research component with a 64 capability mask and documented side channel and recall limitations.

  3. RVF witnesses and hash linked logs are tamper evident. They do not encrypt memory content or prevent an authorized process from reading it.

  4. A delete from the live store does not automatically remove copies in snapshots, branches, replicas, exports, or hosted memory. Define retention and erasure across every copy.

  5. Shared Brain is a hosted plane. Review its network, identity, provenance, poisoning, and data residency controls before sending enterprise memory.

  6. Pin and prepopulate embedding models for offline or regulated deployments. The default npm semantic path downloads its model on first use.

  7. Keep tool execution separate from memory retrieval. Retrieved context is untrusted input until policy checks and action authorization pass.

See SECURITY.md for reporting and project security guidance.

Known boundaries

  1. The repository is a monorepo. Installing ruvector does not activate every crate in this capability map.

  2. The unified four type ruvllm::AgenticMemory manager does not yet have native save and load support, and its episodic to semantic or procedural consolidation method currently returns no changes. Durable VectorDB storage and typed runtime memory are not yet one facade.

  3. Core metadata filtering currently narrows the retrieved candidate set. Highly selective filters may return fewer than k relevant results. Evaluate ACORN or an application level prefilter for selective workloads.

  4. Opening a persisted HNSW database currently enumerates stored vectors and rebuilds the index. Measure cold start time against the intended memory size.

  5. Temporal coherence currently builds an exact pairwise coherence graph and is a proof of concept for moderate memory sets. The planned production path is an approximate neighbor graph.

  6. Agent memory compaction is not yet wired into the default core, MCP, or RVF persistence path.

  7. Full snapshot serialization exists, but incremental snapshots, scheduling, cloud backends, and direct VectorDB restoration are not complete on the current main branch.

  8. Replication exposes local primitives and simulated transport behavior. Raft still has incomplete response transport and snapshot installation paths. These are not a complete production network replication plane.

  9. GNN reranking, MRAgent reconstruction, and Darwin optimization are implemented research surfaces, not automatic behavior in VectorDB::search.

  10. RVF and PostgreSQL are separate build surfaces and are excluded from the default workspace build because they require their own toolchains.

  11. Performance depends on vector dimension, index parameters, filter selectivity, recall target, hardware, and backend. Run the included benchmark for the component and workload you intend to deploy.

Reproduce the evidence

RuVector keeps benchmark code beside the implementation. These commands exercise memory relevant components without relying on unscoped cross product comparisons.

# Core vector search
cargo bench -p ruvector-core

# High write LSM memory
cargo run --release -p ruvector-lsm-ann --bin benchmark

# Temporal and coherence weighted recall
cargo run --release -p ruvector-temporal-coherence --bin tcd-benchmark

# Capability gated retrieval
cargo run --release -p ruvector-capgated --bin benchmark

# Matryoshka coarse to fine retrieval
cargo run --release -p ruvector-matryoshka --bin benchmark

Record dataset size, dimension, index configuration, hardware, latency percentiles, throughput, and recall together. A latency number without its recall target is not a useful retrieval benchmark. See the benchmarking guide.

Build from source

git clone https://github.com/ruvnet/RuVector.git
cd RuVector
cargo test --workspace

The workspace declares Rust 1.88 as its minimum, including the ZIP 9 dependency used by Candle-backed components. RVF and PostgreSQL have separate build instructions in their component documentation.

The Candle backports apply to builds from this workspace and are included in Python source distributions. Cargo does not carry workspace patches into published Rust dependencies; Candle-based crates.io releases still require fixed upstream dependencies or a published fork dependency chain.

Frequently asked questions

Can RuVector run offline?

Yes, the local retrieval path can operate without a database server or API key. Prepopulate the embedding model and required packages before disconnecting: the default npm semantic command downloads its model on first use. Deployment requirements.

Does RuVector learn whenever an agent reads memory?

No. Reads retrieve context. Learning requires recorded outcomes or feedback and the relevant configured learning component. Research reranking and optimization surfaces do not run automatically in VectorDB::search. Capability map.

Is the root package the entire RuVector platform?

No. ruvector is one entry point in a monorepo. Typed decisions, browser WASM, PostgreSQL, RVF, and specialized research crates have separate installation or build paths. Choose a component.

Does vector similarity prove that a recalled fact is true?

No. Similarity identifies nearby representations. Your application must assess provenance, freshness, access, and task relevance before acting on recalled context. Security and governance.

Documentation

TopicLink
Documentation indexdocs/INDEX.md
Node.js APIdocs/api/NODEJS_API.md
Rust APIdocs/api/RUST_API.md
Cypher referencedocs/api/CYPHER_REFERENCE.md
Architecture decisionsdocs/adr
Benchmarksdocs/benchmarks
Repository structuredocs/REPO_STRUCTURE.md

Contributing

Contributions are welcome. Start with the contribution guide. New capability claims should include an implementation link and reproducible evidence.

Related

ruvnet/LatentMesh — a research prototype for causally-verified latent agent communication; ADR-005 names RuVector as the store for its raw→compressed→prototype→symbolic latent-memory continuum (design-stage, not yet wired to a live RuVector instance).

License

RuVector is available under the MIT License.

Built by rUv and powering Cognitum.

Focused Python packages

The Python package portfolio adds graph traversal, embedding clustering and attention ranking APIs over the shared native Rust runtime, with executable examples, animated guides and gated PyPI publishing. These are release candidates until published artifacts are verified.

Runs on
CUDA, WebGPU, Metal
What shows it
  • CUDA: ruvector-onnx-embeddings feature cuda, ruvector-timesfm feature cuda, ruvllm feature fused-act (dependency cudarc), ruvllm-cli feature cuda, sevensense-embedding feature cuda, timesfm feature cuda
  • WebGPU: prime-radiant feature gpu (dependency wgpu), ruvector-onnx-embeddings feature gpu (dependency wgpu), ruvllm-wasm feature webgpu
  • Metal: ruvector-timesfm feature metal, ruvllm feature inference-metal (dependency metal), ruvllm-cli feature metal, timesfm feature metal
Native code
Required
  • Binds native code: libsqlite3-sys, napi-sys, ort-sys, pgrx-pg-sys, pqcrypto-internals and 5 more
Python bindings
No Python binding crate found
License
MIT

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.

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

High-performance Rust vector database core with HNSW indexing

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
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
regexr Listed

A high-performance regex engine built from scratch with JIT compilation and SIMD acceleration

Also in Text, embeddings and search.

8,809 downloads over 30 days 4 28 0.6.2 GPU support unknown No native code found Apache-2.0 OR MIT
velesdb Listed

High-performance vector database engine written in Rust

Also in Build LLM apps and agents.

2,396 downloads over 30 days 0 102 8.1.0 WebGPU Binds native code: tauri, tauri-plugin-velesdb, atk-sys, gdk-pixbuf-sys, gdk-sys and 9 more Not measured

[H] HyperspaceDB is a high-performance, vector database. It features 1-bit quantization, async replication, and native support for hierarchical datasets (Lorentz, Poincaré ball & Hybrid models).

Also in Text, embeddings and search.

96 downloads over 30 days 3 163 4.2.0 GPU support unknown Binds native code: ort-sys (feature local-onnx) MIT
yantrikdb-server App Listed

YantrikDB database server — multi-tenant cognitive memory with wire protocol, HTTP gateway, replication, auto-failover, and at-rest encryption

Also in Build LLM apps and agents.

39 binary downloads per release Not applicable 179 0.20.0 GPU support unknown Binds native code: libsqlite3-sys, zstd-sys 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 6 active dependents and 6 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 4,675 stars, 626 forks and 25 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.

What else the check found

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

Every rule outcome, as the check records it
  • expected-interval: version 2.5.0 base 200, raised to the 365-day floor: E = 365 days
  • dormancy: last activity 2026-11-09, 0 days ago, E = 365: active
  • rot: deprecated requirement `bincode (RUSTSEC-2025-0141, https://rustsec.org/advisories/RUSTSEC-2025-0141.html)`
  • featured: not featured: active_users 6 < 11 and new_adopters 6 < 9 and repository route stars 4675 (needs 4539), forks 626 (needs 434), contributors 25 (needs 79)
  • listed: listed: no archive, new or featured rule applies
Crates120 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
Adoption6 active dependents, 6 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents6crates.io database dumpYes
New dependents (365 days)6crates.io database dumpYes
Peak active dependents7crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: on the check date3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-09GitHub repositoryYes
Latest release2026-11-06crates.io database dumpYes
First release2025-11-20crates.io database dumpYes
Latest version2.5.0crates.io database dumpYes
Days the oldest outside issue waits for a reply39GitHub repositoryYes
Maintainer replies over 365 days31GitHub 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 requirementbincode (RUSTSEC-2025-0141, https://rustsec.org/advisories/RUSTSEC-2025-0141.html)crates.io database dumpYes
Distribution25 releases, 39,411 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases25crates.io database dumpYes
Downloads over 30 days39411crates.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
Repository4,675 stars, 626 forks, 25 contributors, 3,786 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars4675GitHub repositoryYes — one part of the repository route
GitHub forks626GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account25GitHub contributorsYes — one part of the repository route
Commits on the default branch3786GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseMITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesCUDA, WebGPU, Metalcrates.io database dumpNo
What shows each backendCUDA: ruvector-onnx-embeddings feature cuda, ruvector-timesfm feature cuda, ruvllm feature fused-act (dependency cudarc), ruvllm-cli feature cuda, sevensense-embedding feature cuda, timesfm feature cuda; WebGPU: prime-radiant feature gpu (dependency wgpu), ruvector-onnx-embeddings feature gpu (dependency wgpu), ruvllm-wasm feature webgpu; Metal: ruvector-timesfm feature metal, ruvllm feature inference-metal (dependency metal), ruvllm-cli feature metal, timesfm feature metalcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: libsqlite3-sys, napi-sys, ort-sys, pgrx-pg-sys, pqcrypto-internals and 5 morecrates.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 directly51crates.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.