hyperspace-db

[H] HyperspaceDB: The Spatial AI Engine

[![Build Status](https://img.shields.io/github/actions/workflow/status/YARlabs/hyperspace-db/ci.yml?branch=main&style=for-the-badge)](https://github.com/YARlabs/hyperspace-db/actions) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](LICENSE) [![Rust](https://img.shields.io/badge/Rust-Nightly-orange.svg?style=for-the-badge)](https://www.rust-lang.org/) **v3.1.2** | **The World's First Schema-Driven Spatial AI Engine.** [Why Spatial AI?](#-why-a-spatial-ai-engine) • [Use Cases](#-use-cases) • [Architecture](#-architecture) • [Benchmarks](#-performance-benchmarks) • [SDKs](#-sdks)

🌌 What is HyperspaceDB?

Traditional vector databases were built to search static PDF files for chatbots. HyperspaceDB is built for Autonomous Agents, Robotics, and Continuous Learning.

It is the world’s first Spatial AI Engine — a mathematically advanced memory infrastructure that models information exactly how the physical world and human cognition are structured: as hierarchical, spatial, and dynamic graphs.

By combining Hyperbolic Geometry (Poincaré & Lorentz models), Lock-Free Concurrency, and an Edge-to-Cloud Serverless architecture, HyperspaceDB allows machines to navigate massive semantic spaces in microseconds, using a fraction of the RAM required by traditional databases.

🧠 Why a Spatial AI Engine? (Beyond RAG)

AI is moving from text-in/text-out to autonomous action. Agents need episodic memory and spatial reasoning. HyperspaceDB provides the primitives to build it:


🚀 Core Pillars (v3.1.2)

⚙️ Reflex-Level Speed Built on Nightly Rust. Our ArcSwap Lock-Free architecture and f32 SIMD intrinsics deliver up to 12,000 Search QPS and 60,000 Ingest QPS on a single node.
🔑 RBAC & Cross-Tenant Sharing Granular Role-Based Access Control (Admin, ReadWrite, ReadOnly) using transaction-safe redb security storage. Support for namespaced URL collection referencing (owner:name or owner/name) for secure cross-tenant index sharing.
🕵️‍♂️ Audit Logs & Isolation High-performance structured JSON audit logging (off, low, medium, high, full levels) streaming to stdout or files. Real-time, tenant-isolated log buffers stream secure log feeds directly to the Web Dashboard.
🌿 Eco-Monitoring (EcoMonitor) Telemetry agent tracking carbon footprints of CPU/RAM computations per node. Visualizes ESG sustainability metrics and environmental compliance certification badges inside the dashboard UI.
L0 Hot Tier Cache Transparent two-level vector caching. Combines a thread-safe 64-shard L1 DashMap Cache (~1 µs lookups) with an L2 HNSW Fallback Graph (~100 µs lookups), featuring background TTL invalidation and automatic self-healing graph rebuilds.
💾 O(1) Payload Indexing High-throughput O(1) incremental indexing via append-only index write-ahead logging (WAL) in payload_store.rs, eliminating latency spikes and write amplification.
📝 Real-Time WriteBuffer Zero-latency searchability. Inserts instantly write to an in-memory WriteBuffer; searches execute Rayon-parallelized linear scans on the buffer and merge/deduplicate results with main HNSW results.
🧭 Schema-Driven Cascade Native MRL (Matryoshka) support. Define one schema with multiple layers; the RAM-resident CascadePipeline queries truncated dimensions in microseconds, automatically reranking results via full-resolution vectors on NVMe/S3.
🎓 Cognitive Math Engine First-class HNSW support for Euclidean (L2/Cosine), Poincaré Ball, Lorentz Hyperboloid metrics, and Wasserstein O(N) CFM. * **Implicit Graph Engine (v3.1)**: Stop hiding HNSW topology. Expose raw adjacency and navigate via **Lorentz Light-Cones** and **Wave Diffusion** (resonant semantic propagation). * **Graph Explorer (v3.1)**: High-performance canvas-based visualization of HNSW topology. Features Poincaré/Euclidean manifold projections, **Momentum Path Tracing**, and **Lyapunov Stability Radar**. * **Relativistic Traversal**: Use **Momentum Traversal** (Dirac) to swing through nodes with semantic inertia, predicting trajectories via Koopman extrapolations. * **Advanced Geometric Filters**: Native InBall, InBox, and InCone filters in core engine. Execute spatial K-Means, Fréchet Mean, and Parallel Transport directly in the Native SDK. Evaluate datasets via Gromov's Delta-Hyperbolicity.
📡 Agentic Workflows Trigger Memory Reconsolidation via Flow Matching natively to shift paradigms. Connect CDC Streams via subscribe_to_events to trigger secondary models. Hybrid Search (BM25) now supports RRF fusion for state-of-the-art lexical + semantic retrieval.
🧹 Metadata-Driven Pruning Agents must forget to stay efficient. Use typed numeric Range Filters (energy < 0.1) inside a Hot Vacuum to automatically prune obsolete memories.
📦 LSM-Tree Storage Optimized for high-concurrency writes. Hot MemTables continuously flush into immutable Fractal Segments (chunk_N.hyp), enabling near-instant RAM reclamation and stable performance at billion-scale.
☁️ S3 Cloud Tiering Native S3/MinIO tiered storage integration. Seamlessly offload cold segments mapping Petabytes of vectors linearly without scaling local SSDs. (Unlock via Cargo feature s3-tiering & HS_STORAGE_BACKEND=s3).
🔒 Zero-Knowledge ZK-Privacy Protect sensitive agent memories and database operations. Supports multi-SDK Zero-Knowledge client-side encryption. Vectors are projected, noise-injected, metadata is hashed, and payloads are AES-GCM encrypted before leaving the client, keeping database nodes blind to raw values while preserving distance metrics.
⛏️ DePIN & Billing Enforcements Decentralized Vector Network infrastructure. Includes in-process single-binary node execution, continuous storage rental billing (per byte-hour) with automated grace periods/deletion, signed ticket verification (Ed25519) on query time with replay protection, and user-throttling.

⚡ L0 Hot Tier Caching & WriteBuffer (Real-Time Ingestion)

To maximize read throughput and achieve true real-time ingestion, HyperspaceDB implements a transparent, dual-component memory tier:

graph TD
    Request[Incoming Request] --> Action{Write or Search?}
    
    Action -->|Insert| WB[WriteBuffer in RAM]
    WB --> WAL[WAL Log]
    WB --> IndexQueue[Active Indexing Queue]
    
    Action -->|Search| CacheCheck{L0 Cache Hit?}
    CacheCheck -->|Yes L1/L2 Hit| FastOut[Instant Result ~1 µs - 100 µs]
    CacheCheck -->|No Cache Miss| SearchMerge[Merged Scatter-Gather Search]
    SearchMerge --> HNSWS[HNSW Index search]
    SearchMerge --> WBS[WriteBuffer Rayon Parallel Scan]
    HNSWS --> Deduplicate[Deduplicate by external ID & Re-rank]
    WBS --> Deduplicate

1. Transparent L0 Hot Tier Cache (hyperspace-cache)

The L0 Cache resides directly on the read path, enabling blistering microsecond-level vector retrievals:

2. Real-Time WriteBuffer

A lock-free in-memory buffer ensuring newly inserted vectors are searchable from the very first millisecond:

📊 L0 Cache & Ingestion Performance Results

A rigorous 22-test validation suite confirms the stability and performance of the memory acceleration layer:

🤖 Target Use Cases

  1. Robotics & Autonomous Drones: On-device semantic memory, Hierarchical SLAM, and offline-first edge synchronization.
  2. Continuous Learning Systems (AGI): Frameworks doing Riemannian optimization, memory reconsolidation, and Hausdorff-based graph pruning.
  3. Enterprise Graph AI: Merging relational logic with semantic proximity for massive multi-scale data analysis (Code ASTs, Medical Taxonomies).
  4. High-Load RAG & SaaS: Traditional search, but significantly cheaper to operate due to Serverless Idle Eviction and multi-tenant isolation.

⚡ 1 Million Vectors Benchmark (v3.0)

We pushed HyperspaceDB v3.0 to the limit with a 1 Million Vector Dataset. The results define a new standard for performance and efficiency.

🏆 Hyperbolic Efficiency (Poincaré 64d)

When using the native Hyperbolic (Poincaré) metric, HyperspaceDB achieves unparalleled throughput by reducing dimensionality (64d) while preserving semantic structure achievable only with 1024d in Euclidean space.

Metric Result vs Euclidean
Throughput 156,587 QPS 8.8x Faster
P99 Latency 2.47 ms 3.3x Lower
Disk Usage 687 MB 13x Smaller

⚔️ Euclidean Performance (1024d)

Even in standard Euclidean mode, HyperspaceDB outperforms competitors on standard hardware.

Database Total Time (1M vectors) Speedup Factor
HyperspaceDB 56.4s 1x
Milvus 88.7s 1.6x slower
Qdrant 629.4s (10m 29s) 11.1x slower
Weaviate 2036.3s (33m 56s) 36.1x slower

📉 Zero Degradation Architecture

While other databases slow down as data grows, HyperspaceDB maintains consistent throughput.

💾 50% Less Disk Usage

Store more, pay less. HyperspaceDB’s 1-bit quantization and efficient storage engine require half the disk space of Milvus for the exact same dataset.

Benchmark Config: 1M Vectors, 1024 Dimensions (Euclidean) vs 64 Dimensions (Hyperbolic), Batch Size 1000.


🔒 Security

🤝 Federated Clustering & P2P Swarm (v3.0)

HyperspaceDB implements two distinct clustering architectures designed for both high availability in the Cloud and dynamic Edge-to-Edge discovery for robotics swarms.

1. Leader-Follower Replication (Cloud / High Availability)

2. Edge-to-Edge Gossip Swarm (Robotics / Local-First)

Designed for robotic swarms without a central Leader. Uses raw UDP multicasting to form a decentralized, self-healing network.

Data Synchronization (Edge-to-Cloud Delta Sync)

HyperspaceDB uses a 256-bucket Merkle Tree for efficient data drift detection, ideal for WASM/Edge targets updating offline:

WASM Sync Example

When your robot or web client comes back online, initiating a Sync is mathematically minimal:

// 1. Handshake: Send local 256 bucket hashes
const { diffBuckets } = await client.syncHandshake(collection, localBuckets);

if (diffBuckets.length > 0) {
    // 2. Pull only the modified/missing buckets from Cloud
    const stream = client.syncPull(collection, diffBuckets);
    stream.on('data', (vectorData) => applyLocal(vectorData));
    
    // 3. Push local offline edits back to Cloud
    client.syncPush(localEditsQueue);
}

Digest API

# HTTP
GET /api/collections/{name}/digest

# gRPC
rpc GetDigest(DigestRequest) returns (DigestResponse)

Response includes:

Cluster Topology API

View the logic state of the cluster via HTTP:

# Get Replication State
curl http://localhost:50050/api/cluster/status

# Get Decentralized Swarm Peers (Gossip)
curl http://localhost:50050/api/swarm/peers
{
  "gossip_enabled": true,
  "peer_count": 2,
  "peers": [
    {
       "node_id": "e8...0e",
       "role": "Leader",
       "addr": "192.168.1.20:50050",
       "logical_clock": 42,
       "healthy": true
    }
  ]
}

Starting a Cluster

# Start Leader
./hyperspace-server --port 50051 --role leader

# Start Follower
./hyperspace-server --port 50052 --role follower --leader http://127.0.0.1:50051

🕸️ WebAssembly (WASM) Support

HyperspaceDB can run directly in the browser via WebAssembly, enabling Local-First AI applications with zero network latency.

👉 Read the WASM Documentation

⚖️ Heterogeneous Tribunal Framework (Tribunal Router)

HyperspaceDB natively supports the confrontational model of LLM routing (Architect vs. Tribunal) directly on the vector graph.

Using the Cognitive Math SDK and the Graph Traversal API, the SDK calculates a Geometric Trust Score for any LLM claim by verifying the logical path length between concepts in the latent hyperbolic space.

If the geodesic distance (hops) between “Claim A” and “Claim B” on the graph is too large (or disconnected), the Trust Score drops to 0.0 (Hallucination).

from hyperspace.agents import TribunalContext

tribunal = TribunalContext(client, collection_name="knowledge_graph")

# Evaluates structural graph distance between concepts. 
# 1.0 = Truth (Identical), 0.0 = Hallucination (Disconnected)
score = tribunal.evaluate_claim(concept_a_id=12, concept_b_id=45)

🧠 Hybrid Search (BM25 + RRF)

Combine the power of Hyperbolic Embeddings with advanced BM25 lexical ranking.

# Search for semantic similarity AND keyword match (e.g. "iPhone 15")
results = client.search(
    vector=[0.1]*8, 
    top_k=5, 
    hybrid_query="iPhone 15", 
    hybrid_alpha=0.7,  # 70% vector, 30% lexical
    bm25={
        "method": "bm25plus",
        "language": "english"
    }
)

📊 Quantization Modes

All quantization is configured per-collection at creation time via HS_QUANTIZATION_LEVEL:

Mode env value Bits/dim Compression Best for
SQ8 Anisotropic scalar (default) 8 8x Cosine/L2 — best recall at 1 byte/dim
Binary (Hamming) binary 1 64x RAM-critical, 100M+ vectors
Lorentz SQ8 automatic 8 8x Lorentz metric (auto-selected)
Zonal (MOND) HS_ZONAL_QUANTIZATION=true mixed ~30-40% Hyperbolic with mixed density
Full f64 none 64 1x Research / debugging

The default scalar mode uses a ScaNN-inspired anisotropic loss $L = |e_\parallel|^2 + t_w \cdot |e_\perp|^2$ ($t_w=10$), which penalizes directional error more than magnitude error, improving Recall@10 by +5.3% (Cosine) and +3.8% (L2) versus isotropic SQ8.


Each geometry has its own independent backend, now featuring native support for Qwen3-Embedding (0.6B) and YAR v5 models:

Provider Description Recommended For
Local ONNX Any .onnx model from disk Air-gapped / Edge
HuggingFace Auto-download, cache, and chunk High accuracy / Long context
Remote API Mistral / OpenAI / Cohere / Voyage Cloud API offload

Example — Config for Qwen3 (1024d) and YAR v5 (128d):

HYPERSPACE_EMBED=true

# Cosine via Qwen3 (HuggingFace)
HS_EMBED_COSINE_PROVIDER=huggingface
HS_EMBED_COSINE_HF_MODEL_ID=onnx-community/Qwen3-Embedding-0.6B-ONNX
HS_EMBED_COSINE_DIM=1024
HS_EMBED_COSINE_CHUNK_SIZE=4096   # 32K context window

# Poincaré via YAR Labs v5
HS_EMBED_POINCARE_PROVIDER=huggingface
HS_EMBED_POINCARE_HF_MODEL_ID=YARlabs/v5_Embedding_0.5B
HS_EMBED_POINCARE_DIM=128

Direct Search from SDK:

# Server-side text-to-vector search (v3.0.1)
results = client.search_text("Find similar robotics docs", top_k=5)

For details see embeddings.md.


📉 Binary Quantization (1-bit)

Use Binary quantization mode to compress vectors by 32x-64x (vs f32/f64). Ideal for large-scale datasets where memory is the bottleneck.


🛠 Architecture

HyperspaceDB strictly follows a Command-Query Separation (CQS) pattern:

graph TD
    Client["Client (gRPC)"] -->|Insert| S["Server Service"]
    Client -->|Search| S
    
    subgraph Persistence_Layer ["Persistence Layer"]
        S -->|"1. Append"| WAL["Write-Ahead Log"]
        S -->|"2. Append"| VS["Vector Store (mmap)"]
    end
    
    subgraph Indexing_Layer ["Indexing Layer"]
        S -->|"3. Send ID"| Q["Async Queue"]
        Q -->|Pop| W["Indexer Worker"]
        W -->|Update| HNSW["HNSW Graph (RAM)"]
    end
  1. Transport: gRPC/Tonic server accepts requests (Insert/Search).
  2. Persistence: Data is immediately persisted to WAL and segmented Mmap storage.
  3. Indexing: A background worker updates the HNSW graph asynchronously.
  4. Recovery: Graph snapshots (via rkyv zero-copy) ensure near-instant restarts.

👉 *For deep dive, read ARCHITECTURE.md*


## 🛠 Operations & Maintenance

### Queue Monitoring Check ingestion backlog via API or collections stats:

 {
   "count": 150000,
   "indexing_queue": 45  // Items pending index insertion
 }

### Rebuild Index (Defragmentation) Trigger a graph rebuild to optimize layout and remove deleted nodes:

 curl -X POST http://localhost:50050/api/collections/my_col/rebuild

### Memory Management (Jemalloc) HyperspaceDB uses Jemalloc for efficient memory allocation. You can tune its behavior via the MALLOC_CONF environment variable:

To create a manual memory vacuum request (e.g., after large deletions):

 curl -X POST http://localhost:50050/api/admin/vacuum

💻 System Requirements

HyperspaceDB is designed to run efficiently on commodity hardware, but specific instruction sets are required for hardware acceleration.

CPU (Critical)

Storage (I/O)

Memory (RAM)

Operating System


🏃 Quick Start

1. Build and Start Server

Make sure you have just and nightly rust installed.

# Build release binary
cargo build --release

# Run server (Default HTTP port: 50050)
./target/release/hyperspace-server

# Or with custom ports
./target/release/hyperspace-server --port 50051 --http-port 50050

2. Access Web Dashboard

The built-in React Dashboard provides real-time monitoring and management:

http://localhost:50050

Dashboard Features:

Authentication: If HYPERSPACE_API_KEY is set, you’ll be prompted to enter it on first visit. The key is stored in localStorage for subsequent sessions.

Build Dashboard from Source:

cd dashboard
npm install
npm run build
# Assets are embedded in Rust binary via rust-embed

3. Launch TUI Monitor

Open a new terminal to monitor the database:

./target/release/hyperspace-cli

3. Use Python SDK

pip install hyperspacedb==3.1.2
from hyperspace import HyperspaceClient

# Connect to local instance
client = HyperspaceClient()

# Create a collection with Schema-Driven Cascade (128D Poincaré + MRL)
client.create_collection(
    name="world_model", 
    schema={
        "components": [
            {"name": "primary", "metric": "poincare", "full_dimension": 128, "weight": 1.0}
        ],
        "cascade_pipeline": [
            {"component_name": "primary", "cutoff_dimension": 32, "store_in_ram": True, "rerank_top_k": 100}
        ]
    }
)

# Insert text document (you can provide your own embeddings)
client.insert(id=1, collection="world_model", document="Hyperspace is autonomous.")

# Search 
results = client.search(query_text="autonomous engine", top_k=5)
print(results)

🏘️ Collections Management

HyperspaceDB v1.1+ supports Multi-Tenancy via Collections. Each collection is an independent vector index with its own dimension and metric.

Via Web Dashboard

Access the dashboard at http://localhost:50050:

  1. Create Collection: Enter name, select dimension (8D, 768D, 1024D, 1536D), click Create
  2. View Collections: See all active collections with their stats
  3. Delete Collection: Remove collections you no longer need

Via gRPC/SDK

from hyperspace import HyperspaceClient

client = HyperspaceClient()

# Create a new collection with Schema
client.create_collection(
    name="my_vectors", 
    schema={
        "components": [
            {"name": "main", "metric": "cosine", "full_dimension": 1536}
        ]
    }
)

# Insert into specific collection
client.insert(id=1, document="...", collection="my_vectors")

# Search in specific collection
results = client.search(query_text="...", collection="my_vectors", top_k=5)

# List all collections
collections = client.list_collections()

# Delete a collection
client.delete_collection("my_vectors")

Note: If no collection is specified, operations default to the "default" collection.

🏙️ SaaS & Multi-Tenancy (v2.0)

HyperspaceDB is built for SaaS. Isolate thousands of users on a single node.

1. User Isolation

Data is logically separated by user_id. Each user sees only their own collections.

How to use: Pass the x-hyperspace-user-id header in your requests.

curl -H "x-hyperspace-user-id: tenant_123" http://localhost:50050/api/collections

2. Billing API

Admins can query usage statistics for all tenants:

curl -H "x-hyperspace-user-id: admin" http://localhost:50050/api/admin/usage

⚙️ Configuration & Presets

HyperspaceDB v1.2 introduces flexible configuration presets to support both Scientific (Hyperbolic) and Classic (Euclidean) use cases.

Configure these via .env file or environment variables:

Variable Description Supported Values Default
HS_QUANTIZATION_LEVEL Compression scalar (i8), binary (1-bit), none (f64) none

[!IMPORTANT] Since v3.1.0, HS_DIMENSION and HS_METRIC are deprecated. Use CollectionSchema via SDK or CLI for granular control.

🎯 Supported Presets

1. Classic RAG (Default) Optimized for standard embeddings from OpenAI, Cohere, Voyage, etc.

2. Scientific / Hyperbolic Optimized for hierarchical data, graph embeddings, and low-dimensional efficiency.


📊 Best Practices

HyperspaceDB follows the microservices philosophy: One Index per Instance. To manage multiple datasets, we recommend deploying separate Docker containers or using Metadata Filtering for logical separation within a single index.

1. Vector Dimensionality

2. Quantization Strategy

3. Indexing Parameters


⚡ RAG Performance Benchmarks (v3.1)

We conducted a rigorous evaluation of HyperspaceDB v3.1 against popular vector databases (Qdrant, ChromaDB, Milvus, Weaviate) across 15 distinct RAGBench datasets (ranging from 1,000 to 100,000 documents).

The results highlight HyperspaceDB’s Lock-Free ArcSwap Architecture and optimized cache layers.

📋 Benchmark: HYBRID Search (Lexical BM25 + Semantic)

Evaluating retrieval accuracy (Recall@10, Context Precision) and throughput (QPS, Latency) averaged across 15 domains.

📊 Index Size: 1,000 Documents (HYBRID 1000x100)

| Database | Ingest QPS | Search QPS | Latency p50 | Latency p99 | RAM Usage | Disk Usage | CPU Usage | Recall@10 | Context Precision | | :— | :—: | :—: | :—: | :—: | :—: | :—: | :—: | :—: | :—: | | HyperspaceDB | 55,722 🚀 | 1,374.73 ⚡ | 0.62 ms | 1.93 ms | 407.5 MB | 91.80 MB | 8.0% | 64.47% | 54.60% | | ChromaDB | 1,547 | 218.27 | 4.76 ms | 8.86 ms | 2,132.0 MB | 573.75 MB | 19.4% | 65.25% | 54.07% | | Milvus | 495 | 240.80 | 4.18 ms | 8.87 ms | 970.9 MB | 524.86 MB | 19.8% | 65.28% | 54.15% | | Qdrant | 6,801 | 204.27 | 7.69 ms | 12.61 ms | 390.0 MB | 5.58 MB | 22.5% | 65.28% | 54.12% | | Weaviate | 588 | 465.67 | 2.22 ms | 6.38 ms | 468.6 MB | 20.32 MB | 55.2% | 63.63% | 51.49% |

📊 Index Size: 100,000 Documents (HYBRID 100000x1000)

| Database | Ingest QPS | Search QPS | Latency p50 | Latency p99 | RAM Usage | Disk Usage | CPU Usage | Recall@10 | Context Precision | | :— | :—: | :—: | :—: | :—: | :—: | :—: | :—: | :—: | :—: | | HyperspaceDB | 52,572 🚀 | 1,375.53 ⚡ | 0.74 ms | 1.70 ms | 1,089.3 MB | 100.13 MB | 11.9% | 55.33% | 51.29% | | ChromaDB | 1,455 | 196.93 | 5.67 ms | 9.06 ms | 2,448.0 MB | 677.44 MB | 31.0% | 55.13% | 50.97% | | Milvus | 2,269 | 191.13 | 5.78 ms | 9.17 ms | 1,161.8 MB | 857.11 MB | 34.0% | 55.15% | 51.01% | | Qdrant | 7,023 | 193.20 | 8.45 ms | 12.50 ms | 409.2 MB | 16.48 MB | 37.1% | 55.25% | 51.03% | | Weaviate | 1,455 | 482.93 | 2.37 ms | 5.78 ms | 482.7 MB | 40.92 MB | 132.0% | 53.83% | 49.15% |


🏆 Concurrency & Stress Testing

Measured on the CovidQA dataset under concurrent search queries.

👥 100 Parallel Clients

| Database | QPS | Latency Avg | p50 | p99 | Max RAM | | :— | :—: | :—: | :—: | :—: | :—: | | HyperspaceDB (L2 Cache ON) | 3,706.53 🚀 | 3.28 ms | 2.79 ms | 9.27 ms | 72.0 MB | | ChromaDB | 422.46 | 185.99 ms | 165.14 ms | 414.39 ms | 3,026.9 MB | | Milvus | 879.17 | 91.39 ms | 91.54 ms | 165.00 ms | 1,880.1 MB | | Weaviate | 631.17 | 130.10 ms | 120.42 ms | 269.45 ms | 843.4 MB |

👥 1,000 Parallel Clients

| Database | QPS | Latency Avg | p50 | p99 | Max RAM | | :— | :—: | :—: | :—: | :—: | :—: | | HyperspaceDB (L2 Cache ON) | 5,261.26 🚀 | 5.63 ms | 4.50 ms | 21.48 ms | 72.0 MB | | ChromaDB | 386.57 | 2,014.16 ms | 1,793.00 ms | 4,897.77 ms | 3,026.9 MB | | Milvus | 648.27 | 1,201.19 ms | 1,198.67 ms | 2,729.93 ms | 3,708.9 MB | | Weaviate | 597.78 | 1,414.36 ms | 1,322.76 ms | 3,038.84 ms | 2,174.0 MB |


📉 Why is HyperspaceDB so fast?

  1. Lock-Free Architecture: Readers never block readers using ArcSwap and lock-free atomic references.
  2. L0 Two-Level Caching: Sharded L1 DashMap (~1 µs lookups) coupled with a background-rebuilt L2 HNSW fallback graph (~100 µs lookups).
  3. Anisotropic Quantization: Custom ScaNN-inspired scalar I8 loss quantization maintains high Recall while saving 8x RAM.
  4. Zero-Copy Serialization: Fast memory mapping (mmap) of segment files ensures immediate startup recovery without parsing overhead.

RAG Benchmarks Hardware Config: Apple M4 Pro (64GB RAM), NVMe SSD storage.


🐳 Deployment

Docker

HyperspaceDB is available as a lightweight Docker image.

# Build
docker build -t hyperspacedb:latest .

# Run
docker run -p 50051:50051 -p 50050:50050 hyperspacedb:latest

Docker Compose

Run the full stack (Server + Client Tool):

docker-compose up -d

🐳 How to use this image

1. Start a single instance

To start the database and expose both gRPC (50051) and Dashboard (50050) ports:

docker run -d \
  --name hyperspace \
  -p 50051:50051 \
  -p 50050:50050 \
  glukhota/hyperspace-db:latest

Access the dashboard at http://localhost:50050

2. Persisting Data (Critical)

By default, data is stored inside the container. To prevent data loss when the container is removed, you must mount a volume to /app/data.

docker run -d \
  --name hyperspace \
  -p 50051:50051 \
  -p 50050:50050 \
  -v $(pwd)/hs_data:/app/data \
  glukhota/hyperspace-db:latest

🔒 Security & SOC 2 Compliance

HyperspaceDB comes with advanced security controls out-of-the-box, ensuring compatibility with standard enterprise compliance requirements (e.g. SOC 2, ISO 27001):

[!TIP] For SOC 2 compliance, we recommend deploying HyperspaceDB on LUKS-encrypted drives or encrypted cloud block volumes within isolated Virtual Private Clouds (VPC).


🔌 AI Integrations

HyperspaceDB is ready for the modern AI stack with official high-level integrations:

Integration Language status Install
🦜 LangChain Python ✅ v3 pip install langchain-hyperspace
🦜 LangChain TS/JS ✅ v3 npm install langchain-hyperspace
🦙 LlamaIndex Python ✅ v3 pip install llama-index-vector-stores-hyperspace
🦙 LlamaIndex TS/JS ✅ v3 npm install llamaindex-hyperspace
🔗 n8n No-Code ✅ v3 Community Node: n8n-nodes-hyperspacedb
🤖 AI Agent Skills Any ✅ v3.1.2 npm install hyperspacedb-skills

🛠️ Model Context Protocol (MCP)

Connect HyperspaceDB directly to Claude Desktop, Cursor, or any MCP-compliant agent to give them a high-performance spatial memory.

# Start MCP server via npx
npx mcp-hyperspacedb@latest

Available Tools (30+):


📦 SDKs (v3.0.x Milestone)

Official 1st-party drivers with full Functional Parity, Delta Sync, and Cognitive Math:

Language Path Status
🐍 Python pip install hyperspacedb ✅ v3.*
🦀 Rust cargo install hyperspacedb ✅ v3.*
🦕 TypeScript/JS npm install hyperspace-sdk-ts ✅ v3.*
🕸️ WebAssembly crates/hyperspace-wasm ✅ v3.*
🎯 Dart/Flutter hyperspacedb: ^3.1.2 ✅ v3.*
🐹 Go sdks/go ✅ v3.*
🤖 ROS2 / C++ sdks/ros2, sdks/cpp ✅ v3.*
🧠 AI Agent Skills npm install hyperspacedb-skills ✅ v3.1.2

🧠 AI Agent Skills (hyperspacedb-skills) are structured SKILL.md files that teach Cursor, Claude Code, Windsurf, Antigravity, and custom agents how to correctly use HyperspaceDB — covering core CRUD, graph traversal, cognitive AI (Lyapunov/Koopman), DePIN node economics, and the full 30+ MCP tool reference. Install once, all your agents understand HyperspaceDB automatically.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright © 2026 YARlabs