Tapirus Tech Lab (TapirusDB.com) • Advanced Data Architecture Group
SOVEREIGN EMBEDDED MEMORY & DATA ENGINE

The Embedded Memory Engine
for Sovereign AI & Edge Systems.

Stop stitching Pinecone, Neo4j, and SQLite together. TapirusDB provides autonomous AI agents, research labs, and edge devices with 0.55 µs in-process chaining, 22.8 µs vector search, openCypher knowledge graphs, and relational SQL inside a single encrypted .tapir file. Engineered in 100% Safe Rust with <4MB idle RAM and zero cloud latency.

$ curl -fsSL https://raw.githubusercontent.com/tapiruslab/TapirusDB/main/install.sh | bash
STACK CONSOLIDATION
Death of Database Sprawl

Eliminate the fragility and multi-vendor licensing of stitching SQLite, Pinecone, Neo4j, and MongoDB together. One encrypted .tapir file unifies all four models in 100% Safe Rust.

SWMR CONCURRENCY
Single-Writer Multi-Reader

No global database write locks. Thread-safe RwLock architecture enables high-concurrency non-blocking read parallelization across parallel RAG inference pipelines and API daemons.

HYBRID AI PRE-FILTERING
Persistent HNSW & SQ8

Single-pass SQL Pre-Filtering (VECTOR NEAR ... WHERE ...) guarantees exact $k$ recall. Min-max SQ8 scalar quantization slashes vector RAM by 75% with persistent disk snapshots.

SQL NATIVE GRAPHRAG
Sub-Microsecond Traversal

Zero JVM overhead. Execute GRAPH TRAVERSE, GRAPH SHORTEST_PATH, PageRank, and weighted Dijkstra directly from SQL with native Anthropic Model Context Protocol (MCP) support.

1.60Mops/s
Point-Lookup Throughput
Non-blocking MVCC reader throughput on commodity NVMe.
510ns
Sub-Microsecond p50
In-process zero-deserialization memory pointer lookups.
< 4MB
Idle Memory Footprint
Ultra-dense memory model engineered for frontier LLMs, on-device SLMs & robotics.
100%Safe
Zero Unsafe Rust
Formally enforced #![forbid(unsafe_code)] across all modules.
Unified multi-paradigm engine

Four computational models. One cohesive storage core.

Modern AI applications require vectors for semantic similarity, knowledge graphs for grounded context, relational tables for transactions, and JSON for unstructured telemetry. TapirusDB eliminates database sprawl by managing all four paradigms in one atomic storage file.

Unified Quad-Core

Stop stitching separate databases together. TapirusDB embeds Relational SQL, Document JSON, HNSW Vectors, and Knowledge Graphs into your application's in-process memory space, committing all state atomically into a single encrypted .tapir file.

Explore Runtime Engine
HOST APP Your App AI Agent / Daemon 0.55 µs in-process TapirusDB Engine Core 100% Safe Rust Relational SQL ACID • MVCC • Joins 510 ns Point Lookup Document JSON Schemaless Payloads JSONB Path Extract HNSW Vectors Cosine / L2 • SQ8 22.8 µs Ann Search Knowledge Graph openCypher • CSR GraphRAG & Dijkstra SINGLE FILE my_data.tapir AES-256 Encrypted Atomic WAL Flush
SYSTEM RUNTIME ARCHITECTURE • ZERO DAEMONS • 100% PURE SAFE RUST

The Unified In-Process Memory & Storage Architecture

How TapirusDB collapses four disparate server databases into a single sub-microsecond in-memory engine and zero-dependency encrypted file.

LAYER 01 / CALLER DOMAINS Host Process Runtime & Sovereign Systems
Autonomous AI Agents
Claude MCP • Cursor • Local SLMs
Language SDKs
Rust • Python • TypeScript • C/C++
Edge Hardware & IoT
Raspberry Pi • Home Assistant • Jetson
Sub-Microsecond Direct Function Calls (Zero Network Sockets • Zero IPC)
LAYER 02 / ENGINE CORE TapirusDB In-Process Engine
#![forbid(unsafe_code)] < 4 MB Idle RAM 0.55 µs Chaining
SQL
Relational SQL-92
ACID Slotted B+Tree
• B+Tree Index Scans & Point Lookups • Subqueries & Recursive CTEs • Cost-Based Optimizer (CBO)
JSON
Document Collections
Nested Path Indexing
• Schema-less Dynamic Payload Store • Secondary Indexes on Nested Keys • SQL JSON_EXTRACT Integration
VEC
HNSW & IVF Vectors
RaBitQ 32x & SIMD
• 16-Lane SIMD Vector Kernels • RaBitQ 32x Extreme Quantization • Asymmetric Cosine & L2 Distance
GRAPH
CSR Knowledge Graph
openCypher & GraphRAG
• Contiguous Slice Adjacency Arrays • Declarative MATCH (a)-[:REL]->(b) • Seed-and-Traverse Tri-Modal RRF
MEMORY HIGHWAY
Sub-Microsecond Zero-IPC Chaining: 1,606,037 ops/sec (0.55 µs) • Bidirectional Graph ↔ Vector with Zero Heap Allocation
4KB Slotted-Page Direct File I/O (WAL + Transparent LZ4 Compression)
LAYER 03 / ATOMIC PERSISTENCE Single Container On Disk (Zero Background Daemons)
production.tapir
Single Encrypted Database File Container
🔒 ChaCha20-Poly1305 AEAD 🗜️ LZ4 Page Compression (-70%) 📄 4KB Slotted B+Tree Pages
production.tapir-wal
Crash-Resilient Write-Ahead Log
⚡ Append-Only ACID Commits 🛡️ CRC32 Frame Checksums 💡 Blackout / Power-Cut Safe
01 / RELATIONAL

ACID Relational & SWMR

Strict serializable ACID transactions with Write-Ahead Logging (WAL) and slotted B+Tree indexing. Single-Writer Multi-Reader (SWMR) concurrency enables high-throughput concurrent reader parallelism without database-wide lock contention.

  • SWMR reader concurrency (RwLock)
  • B+Tree inverted secondary indexing
  • 100% Safe Rust (#![forbid(unsafe_code)])
02 / DOCUMENT

Nested JSON & Path Indexes

Store, index, and query dynamic hierarchical payloads with zero table-locking. Native secondary indexing on nested JSON paths (CREATE INDEX ON tbl(doc.path.field)) eliminates full scans, with SQL JSON_EXTRACT expressions.

  • B+Tree indexing on arbitrary dot paths
  • SQL JSON_EXTRACT(doc, '$.path') support
  • Zero migration locks on schema shifts
03 / VECTOR

Persistent HNSW & SQ8

High-dimensional vector search with Cosine, Euclidean, and Dot Product metrics. Min-max SQ8 asymmetric scalar quantization slashes memory 75%, paired with single-pass SQL Pre-filtering (VECTOR NEAR ... WHERE ...) and persistent disk snapshots.

  • Single-pass SQL Pre-filtering (Exact $k$)
  • Persistent B+Tree snapshots across reboots
  • SQ8 Asymmetric Quantization (-75% RAM)
04 / GRAPHRAG

SQL Native Graph & PageRank

Native SQL graph traversal (GRAPH TRAVERSE) operating at 3.5M edges/sec. Features built-in PageRank centrality and weighted Dijkstra shortest path routing (GRAPH SHORTEST_PATH), bridging vectors and entities in 510 nanoseconds.

  • SQL GRAPH TRAVERSE & SHORTEST_PATH
  • Built-in PageRank & Weighted Dijkstra
  • 510ns sub-microsecond vector chaining
COGNITIVE AI INFRASTRUCTURE & HYBRID RETRIEVAL

Bidirectional Vector ↔ Graph Chaining.
Why TapirusDB Outclasses Decoupled Multi-DB Stacks.

Traditional stacks attempt to bridge graph and vector paradigms by running separate daemons (e.g. Pinecone + Neo4j), suffering from 20–80ms network serialization bridges and hundreds of megabytes in idle memory footprint (~240MB–2.4GB). TapirusDB fuses HNSW vector manifolds and property graph topologies into a single zero-copy memory substrate in 100% Safe Rust—executing bidirectional GraphRAG in sub-12 microseconds.

PIPELINE 01 Latency: ~8.4 µs

Vector-to-Graph Chaining

Semantic Seed → Subgraph Knowledge Expansion: Resolves conceptual queries into exact topological context, eliminating enterprise LLM and on-device SLM hallucinations.

1. Query Embedding Ingestion
High-dimensional prompt vector is matched via SIMD-accelerated HNSW index in 22.8µs.
2. Top-K Seed Entity Extraction
Extracts the Top-5 nearest semantic nodes directly into an in-memory zero-copy frontier.
3. Multi-Hop Relational Traversal
Zero-copy BFS/DFS traverses MONITORS, DEPENDS_ON, or REGULATES edges across 1–2 hops in 8.4µs without cross-process IPC.
4. Grounded Context Window Delivery
Synthesizes structurally verified entity paths directly into the LLM or SLM prompt context window.
PIPELINE 02 Latency: ~0.55 µs • 100% Exact Recall

Graph-to-Vector Chaining

Topological Pruning → Exact Vector Nearest-Neighbor: Rather than searching a global approximate vector space ($O(N \log N)$), traversal isolates local subgraphs to calculate exact similarity ($O(M \cdot D)$ where $M \ll N$).

1. Ontological & Security Filtering
Graph query traverses organizational entities, permission boundaries, or domain nodes first.
2. Candidate Neighborhood Isolation
Prunes candidate vector set from 10,000,000 items down to M=20–80 relevant nodes in memory.
3. Exact SIMD Cosine/Dot Calculation
Calculates unrolled vector distances strictly over candidate nodes with zero approximation loss.
4. Mathematical Precision Guarantee
Achieves 100% mathematical recall in 0.55µs, completely eliminating ANN approximate dropouts.
ARCHITECTURAL ADVANTAGE

TapirusDB vs. Decoupled Multi-Database Stacks

Legacy microservice approaches force architects to deploy and coordinate separate databases: an embedded relational engine, a dedicated vector daemon, and an external graph database. This fragmented polyglot persistence incurs catastrophic network serializations (JSON/gRPC over HTTP) and synchronization drift.

TapirusDB solves this at the hardware level: vectors and graph adjacency lists reside in the identical memory page cache. Pointer dereferencing takes 510 nanoseconds, resulting in an in-process speedup of 100x to 1,000x.

Architecture Dimension TapirusDB Decoupled Polyglot Stack Pinecone + Neo4j
Memory Safety 100% Safe Rust C++ / Unsafe Go / Java JVM
Idle Footprint < 4 MB ~240 MB > 2,400 MB
Cross-Model Latency < 12 µs (Zero-IPC) ~1.8 ms 25 ms – 85 ms
Scalar Quantization Native SQ8 (75% RAM ↓) Uncompressed Separate Tier ($$$)
Packaging Format Single-File (.tapir) Daemon Process Multi-Cloud SaaS
// Real-World Fluent Chaining API (src/graph/chain.rs) Zero-Allocation Query Builder
let matches = db.chain(agent_node_id)
    .out(Some("MONITORS"))
    .out(Some("REGULATES"))
    .min_weight(0.75)
    .filter_label("TelemetryChunk")
    .vector_near(&query_embedding, 5, DistanceMetric::Cosine)?;
MCP PROTOCOL (STDIO) Built-in Anthropic Model Context Protocol (MCP) Server
$ tapirus mcp agent_memory.tapir

TapirusDB features an official out-of-the-box MCP server running JSON-RPC 2.0 stdio. Seamlessly plug persistent ACID transactions, vector similarity memory, and GraphRAG traversals directly into Claude Desktop, Cursor IDE, Gemini, or custom AI agent swarms—with zero middleware, zero docker containers, and zero Python bridges.

tapirus_remember tapirus_recall tapirus_sql tapirus_graph_neighbors Zero Daemon Overhead
NEXT-GEN RAG ACCELERATION SUITE

Accelerated GraphRAG.
Seed-and-Traverse Overcomes Naive Vector Scans.

Standard vector search wastes compute scanning millions of disconnected chunk embeddings. TapirusDB introduces Seed-and-Traverse GraphRAG: fast Product Quantization (PQ) identifies 2–3 seed entities in <1ms, micro-hop graph BFS collects factual relationships in 0.5µs, and Tri-Modal Reciprocal Rank Fusion (RRF) delivers airtight prompt context for frontier LLMs and on-device SLMs.

STEP 01

PQ Fast Seeding

Compressed 8-bit Asymmetric Distance Computation (ADC) discovers the top 2–3 seed nodes across millions of vectors in < 1 ms.

STEP 02

Micro-Hop Traversal

In-memory BFS traversal follows relationship edges in 510ns per hop, capturing 1st and 2nd degree factual causal subgraphs.

STEP 03

Tri-Modal RRF

Reciprocal Rank Fusion unifies Vector Semantics (R_vec), BM25 Keywords (R_lex), and Graph Proximity (R_graph) into a singular rank.

STEP 04

Prompt Synthesis

Emits structured, hallucination-free Markdown directly consumable by Claude 3.5, GPT-4o, and edge SLMs (Phi-3, Gemma-2).

One-Liner GraphRAG Query (Rust & TypeScript) 3.4x Faster vs. Naive Vectors • 82% Less RAM
// Rust GraphRAG Execution
let config = GraphRagConfig::default().with_seeds(3).with_max_hops(2).with_limit(5);
let rag_context = db.graph_rag_query("Quantum Computing Theories", Some(&query_vector), &config)?;
println!("LLM Prompt Context:\n{}", rag_context.prompt_context);

// TypeScript (tapirus)
const rag = await db.graphRagQuery({ query: "Quantum Computing Theories", topSeeds: 3, maxHops: 2 });
console.log(rag.promptContext);
CLOUD-NATIVE SERVERLESS & EDGE RUNTIMES

Sub-5ms Serverless Edge.
On-Demand S3/R2 4KB Page Streaming.

In AWS Lambda, Google Cloud Run, and Cloudflare Workers, downloading whole database files kills cold-start performance. TapirusDB's RemotePager streams 4KB B+Tree pages on-demand using HTTP Range requests (Range: bytes=offset-(offset+4095)) and caches blocks in memory for 0.00ms subsequent reads.

S3 / CLOUDFLARE R2 RANGE STREAMING

Zero-Download Cold Start

TapirusDB issues parallel 4KB HTTP range requests directly against object storage. Only the exact pages traversed by your B+Tree search or vector index are loaded across the wire.

Initial Connect: < 20ms (reads 100B header)
In-Memory Cache: 0.00ms latency on repeated page reads
Encrypted Storage: Decrypted on-the-fly in isolated RAM
CLOUDFLARE WORKERS (V8 ISOLATE) < 5ms Cold Start

Global Serverless Edge API

Run TapirusDB in over 300 global edge data centers with zero daemon management and zero database container overhead.

import { TapirusDatabase } from 'tapirus';

export default {
  async fetch(request) {
    const db = await TapirusDatabase.openInMemory();
    const rag = await db.graphRagQuery({ query: "AI Edge" });
    return Response.json({ success: true, rag });
  }
};
EMBEDDED SILICON & AUTONOMOUS ROBOTICS

On-Device AI for Robot Brains & Autonomous Silicon.

Autonomous vehicles, surgical robots, and smart home IoT devices cannot depend on cloud databases when driving through tunnels, operating in cleanrooms, or navigating offline terrain. TapirusDB embeds directly into edge hardware—running with < 4 MB RAM on automotive SBCs or < 512 KB SRAM on bare-metal microcontrollers without an operating system.

TIER A • LINUX / QNX READY 100%

Automotive ADAS & ROS2 Robotics

NVIDIA Jetson Orin/Nano, Raspberry Pi 5, NXP S32G, Intel NUC. Sub-510ns visual feature matching, topological SLAM graph, and zero-IPC C-ABI linkage.

ISO 26262 / ASIL-D Safety-Ready Rust Native ROS2 & C++ SDK < 4 MB RAM Footprint
TIER B • BARE-METAL MCU NEW • NATIVE

Smart Home Chips & Microcontrollers

ESP32-S3/C6, STM32 Cortex-M4/M7, RP2040, RISC-V. Operates directly on SPI NOR Flash (W25Q128) and static SRAM partitions with zero OS dependencies.

FlashBlockDevice Driver 512B / 1024B Micro-Pages < 512 KB SRAM Ceiling
TIER C • PLANETARY SWARM TAPISAURUS

Autonomous Fleet Swarm Mesh

Connected vehicle fleets, drone swarms, and distributed factory robotics synchronizing state across continents using Multi-Raft and CRDT delta bridges.

2-Way Delta Replication Offline-First Resilient Mesh Sub-Second Consensus Election
Autonomous Vehicle Perception (C++ / ROS2) 0.51 µs Sub-Microsecond
#include "tapirus.h" // Zero-IPC In-Process C-ABI

void on_lidar_scan(float min_dist, float angle) {
    // 1. Ingest telemetry in sub-microsecond time
    tapirus_execute(db, "INSERT INTO lidar VALUES (ts, min_dist);");

    // 2. Query spatial knowledge graph for known hazards
    tapirus_graph_neighbors(db, 101 /* Pedestrian */, 0, NULL);
}
Smart Home Bare-Metal (ESP32 / STM32) < 512 KB SRAM
use tapirus::embedded::{MicroDatabase, RamBlockDevice};

// 1. Direct flash storage (512-byte micro blocks)
let flash = RamBlockDevice::new(512, 512); // 256KB Partition
let mut db = MicroDatabase::open(flash)?;

// 2. Log sensor telemetry & link smart home actuators
db.store_sensor_record(1, timestamp, 24.5, "Celsius")?;
db.link_entities(1 /* Sensor */, 201 /* AC */, "CONTROLS")?;
VERSATILE EMBEDDED UTILITY

Beyond AI: An Ultra-Fast Embedded Database for Classic Applications.

You do not need AI to benefit from TapirusDB. It is also a first-class, zero-configuration embedded database for relational transactions, dynamic JSON documents, and offline analytics with pure 100% Safe Rust reliability.

01 / SQL RELATIONAL

Modern SQLite Alternative

Full SQL-92 query engine with ACID transactions, B+Tree secondary indexes, subqueries, and Common Table Expressions (WITH ... AS). Includes hardware-accelerated ChaCha20-Poly1305 encryption at rest without paying for commercial extensions.

db.execute("CREATE TABLE users (id INT PRIMARY KEY, email TEXT, balance REAL);")?;
db.execute("INSERT INTO users VALUES (1, 'alice@acme.com', 14500.0);")?;
let rows = db.query("SELECT * FROM users WHERE balance > 10000;")?;
02 / JSON DOCUMENTS

Embedded MongoDB Alternative

Store polymorphic JSON telemetry, user preferences, and configuration payloads without migrations. Features auto-generated 64-bit document IDs, sub-document indexing, and JSON path projection.

let store = db.collection("telemetry")?;
let doc_id = store.insert_one(&serde_json::json!({
    "sensor": "temp_probe",
    "reading": 24.3,
    "certified": true
}))?;
03 / IN-PROCESS ANALYTICS

SIMD Analytics & Grep CLI

Vectorized columnar accumulators compute SUM, AVG, and COUNT across multi-megabyte datasets in microseconds. Pure Safe Rust LZ4 page compression slashes disk footprint by 50%–70%, paired with a built-in code search CLI (tapirus tg).

# Fast in-process developer code search
$ tapirus tg --vector "transaction rollback" src/
# Run SQL aggregation in CLI
$ tapirus query "SELECT AVG(balance) FROM users;"
REAL-WORLD PRODUCTION DOMAINS

Engineered for High-Impact Domains: Research Labs • In-Process Analytics • Sovereign Smart Home.

TapirusDB is not just for AI agents. From reproducible academic discoveries to edge telemetry analytics and privacy-first local home automation, see how its single-file quad-model architecture eliminates multi-database cluster sprawl.

DOMAIN 01 Scientific Research

Academic Labs & Reproducibility

Package multi-modal research datasets—molecular graphs, high-dimensional feature embeddings, and experimental assay tables—into a single reproducible .tapir file. Eliminate Docker setups for peer reviewers and run 100% deterministic, crash-free experiments in Jupyter notebooks.

  • Zero-Docker Reproducibility: Share 1 file on Zenodo/arXiv/GitHub.
  • Python & Jupyter Native: pip install tapirus with zero background daemons.
  • Memory Determinism: Zero segfaults or memory leaks during 72-hr compute runs.
# Python/Jupyter Notebook Workflow
import tapirus

# Open single research dataset container
db = tapirus.open("paper_dataset.tapir")

# Query molecular graph + chemical vector similarity
results = db.query("""
    MATCH (c:Compound)-[:BINDS_TO]->(p:Protein {id: 'EGFR'})
    WHERE c.smiles_vector <-> $query_vec < 0.15
    RETURN c.id, c.affinity_score;
""", query_vec=ligand_embedding)
DOMAIN 02 Data Analytics

In-Process Analytics & Edge BI

Execute vectorized SIMD aggregations (SUM, AVG, COUNT) directly inside the host memory space without network round-trips. Built-in pure Safe Rust LZ4 page compression slashes disk footprint by 50%–70%, enabling high-frequency telemetry analytics at zero cloud egress cost.

  • SIMD Vectorized Math: AVX-512/NEON columnar accumulators.
  • Transparent LZ4 Paging: 50%–70% disk storage reduction.
  • Zero Cloud Egress: Compute analytics locally at IoT gateways.
// High-throughput In-Process Telemetry Aggregation
let summary = db.query("
    WITH sensor_rollup AS (
        SELECT 
            sensor_id,
            AVG(reading) AS avg_reading,
            COUNT(*) AS samples
        FROM telemetry_logs
        WHERE timestamp >= NOW() - 3600
        GROUP BY sensor_id
    )
    SELECT * FROM sensor_rollup WHERE avg_reading > 85.0;
")?;
DOMAIN 03 Smart Home & IoT

Privacy-First Smart Home Automation

Deploy sovereign local AI on Raspberry Pi, Home Assistant, and mini-PCs with under 4 MB idle RAM. Model physical Zigbee/Matter mesh topologies via openCypher, store local voice intent vectors without cloud eavesdropping, and survive abrupt power outages with crash-proof ACID WAL.

  • 100% Offline & Private: Sensor & voice data never leaves LAN.
  • Mesh Topology Routing: Graph pathfinding for smart devices.
  • Power-Loss Durability: Crash-resilient WAL prevents corruption.
// Smart Home Local Voice Intent & Zigbee Mesh Routing
let intent_vector = local_whisper.embed("turn off kitchen lights");

// 1. Semantic voice intent match (Vector)
let matched_action = db.vector_search("voice_intents", &intent_vector, 1)?;

// 2. Resolve Zigbee device relay path (openCypher Graph)
let route = db.graph_query("
    MATCH path = (hub:Gateway)-[:ROUTES_THROUGH*1..3]->(d:Device {name: 'kitchen_main_light'})
    RETURN path LIMIT 1;
")?;
Verified hardware benchmarks

Sub-microsecond performance under rigorous empirical scrutiny.

Tested on consumer x86_64 and ARM64 architecture against leading enterprise databases. TapirusDB demonstrates superior p50 and p99 tail latencies due to its in-process architecture and cache-locality optimizations.

3,000 Chunks
1,000-Page Document Ingestion
Standard 300–500 token semantic chunks.
1.1 MB RAM
SQ8 Quantized Memory
75% physical memory reduction.
< 0.09s
Full HNSW Construction
33,000+ vector nodes per second.
22.8 µs
Vector Search (k=5)
43,770 queries per second throughput.
Rigorous Competitive Architecture Analysis

TapirusDB vs The Industry: The Embedded AI Winning Formula.

Stop stitching four disparate databases across fragile network sockets. TapirusDB consolidates Relational SQL, Schema-less JSON, HNSW Vectors, and GraphRAG into a single zero-daemon, 100% Safe-Rust engine (<4MB RAM). Here is how it compares against the industry's dominant database standards.

Swipe horizontally to explore all 9 database engines
Evaluation Parameter TapirusDB v1.0.0 Decoupled Polyglot Stack SQLite DuckDB Qdrant / Pinecone Neo4j MongoDB PostgreSQL + pgvector
Memory Safety Paradigm 100% Safe Rust C++ / Unsafe C (Unsafe) C++ Rust / Go (Daemon) Java / JVM C++ C (Manual)
Deployment Architecture Single File (.tapir) Server Daemon Single File (.sqlite) Single File (.duckdb) Server / Cloud Cluster Server Daemon (JVM) Server Daemon (mongod) Server Cluster (DevOps)
Concurrency Model SWMR (RwLock) Daemon Async Database Write Lock Multi-thread Read Concurrent Service Concurrent Transactions Collection Lock MVCC Multi-Client
AI Vector Persistence Persistent B+Tree Snapshots Disk / Cache None (Ext Required) Add-on Extension Native Disk / Memory Add-on Vector Index Atlas Vector (Cloud) HNSW (pgvector)
Vector SQL Pre-Filtering Single-Pass (Exact $k$) N/A (No SQL) N/A N/A Two-Stage / Post-Filter N/A N/A Iterative Scan
Vector Quantization (RAM) SQ8 Asymmetric (-75%) Uncompressed None None SQ / PQ / Binarized None None Halfvec (FP16 only)
Graph Traversal & Algorithms SQL GRAPH + PageRank + Dijkstra Graph + Vector Chaining Recursive CTE only None None Native Cypher Graph $graphLookup (Basic) Apache AGE (Extension)
Nested JSON Path Indexing B+Tree on doc.path + JSON_EXTRACT N/A (No Doc Store) json_extract (Full scan) JSON struct scan Payload filtering Property maps Native Path Indexing GIN on JSONB
At-Rest Encryption ChaCha20-Poly1305 (Native) External Only Paid SQLCipher ($2k) Commercial add-on Cloud KMS Only Enterprise Tier ($$$) Enterprise KMS Disk LUKS / pgcrypto
Idle RAM Footprint < 4 MB ~240 MB ~4 MB ~35 MB > 500 MB > 1,200 MB (JVM) > 350 MB > 150 MB
Compiled Distribution Size 3.8 MB 65 MB 1.5 MB 42 MB 180 MB 350 MB 220 MB 120 MB
Edge, IoT & WASM Ready Zero-OS Flash + WASM Server Only Excellent Heavy WASM (30MB+) Cloud Only Server Only Server Only Server Only
Relational Embedded Duel Safe-Rust Winner

TapirusDB vs. SQLite

SQLite is the 24-year-old embedded king, but relies on manual C vulnerable to buffer exploits, blocks concurrent readers with a database-wide write lock, lacks native AI vectors or knowledge graphs, and requires costly commercial licenses ($2,000+) for disk encryption.

  • Safe Rust: #![forbid(unsafe_code)] completely eliminates memory safety CVEs.
  • SWMR Concurrency: Non-blocking concurrent reader threads via RwLock.
  • Free Encryption: Military-grade ChaCha20-Poly1305 AEAD built-in.
  • Quad-Model: Native HNSW vectors & GraphRAG in the same file.
Operational vs Analytics Duel OLTP & AI Winner

TapirusDB vs. DuckDB

DuckDB is an analytical OLAP heavyweight built for scanning massive Parquet datasets. However, its 50MB+ binary and heavy RAM footprint make it impractical for edge/mobile devices, and its columnar format suffers severe performance degradation on frequent row-by-row OLTP mutations.

  • Ultra-Compact: < 5MB binary, < 4MB idle RAM (runs on microcontrollers).
  • High-Speed OLTP: Slotted B+Tree optimized for microsecond point updates.
  • Native Graph Engine: GRAPH TRAVERSE, Dijkstra, and PageRank built-in.
  • Persistent Vectors: Persistent HNSW snapshots with SQ8 quantization.
Zero Data Sprawl Duel Single-ACID Winner

TapirusDB vs. Qdrant / Pinecone

Dedicated vector databases isolate embeddings from relational business tables, forcing developers to manage multi-vendor infrastructure, high cloud bills, and out-of-sync data drift. Most struggle with clumsy post-filtering that returns fewer than $k$ results.

  • 1 Atomic Transaction: SQL metadata, JSON, and vectors mutate together.
  • Single-Pass Pre-Filter: VECTOR NEAR ... WHERE ... guarantees exact $k$.
  • SQ8 Asymmetric SIMD: 75% RAM savings with <1% recall drop.
  • Zero Cloud Overhead: In-process library with $0 hosting dependencies.
Graph Memory Footprint Duel Microsecond Winner

TapirusDB vs. Neo4j

Neo4j is the pioneer of enterprise property graphs, but requires massive Java Virtual Machine (JVM) heaps (>1.2GB RAM) and complex proprietary Cypher queries. TapirusDB embeds graph adjacency directly in-process with 510ns vector-to-graph chaining.

  • Zero JVM Bloat: Operates at < 4MB RAM without background daemons.
  • Standard SQL Superset: GRAPH TRAVERSE and GRAPH SHORTEST_PATH.
  • Native Graph Centrality: Built-in PageRank and weighted Dijkstra algorithms.
  • Zero-IPC Chaining: 510ns traversal between graph entities and vectors.
Embedded Document Store Duel ACID Sovereign Winner

TapirusDB vs. MongoDB

MongoDB popularized schema-less JSON documents, but demands a dedicated background server daemon (mongod), high memory allocation for WiredTiger cache, and lacks embedded single-file sovereignty for edge AI applications.

  • Nested Path Indexing: CREATE INDEX ON tbl(doc.path.field) in B+Tree.
  • SQL JSON_EXTRACT: Native path extraction in standard SQL queries.
  • Strict Serializable ACID: Guaranteed single-file transactional durability.
  • Zero Background Daemons: Links directly into application process memory.
Sovereign Edge vs Cloud Monolith Zero-DevOps Winner

TapirusDB vs. PostgreSQL + pgvector

PostgreSQL is the gold standard for enterprise data centers, but cannot run embedded inside robotics, edge IoT, iOS/Android mobile apps, or browser WebAssembly. It requires complex DevOps, connection pooling, and external C plugins.

  • Embed Anywhere: Runs on robotics silicon, mobile phones, and in-browser WASM.
  • Zero Configuration: No pg_hba.conf, no connection pooling, no Docker.
  • Native Multi-Model: SQL, JSON, Vectors, and Graph unified out of the box.
  • Sub-5ms Cold Starts: Instant activation in V8 isolates and serverless edge.
Dual-tier architectural progression

The Evolution: From Embedded Micro-Titan to Planetary Mesh.

Data architectures should not force developers to rewrite code when transitioning from local prototypes to global production. TapirusDB provides a mathematically continuous spectrum: start with zero-ops embedded Tapirus, and graduate seamlessly to Tapisaurus (GrandTapirus) for planet-scale multi-region data coordination.

EDGE & EMBEDDED TIER

TapirusDB

The Micro-Titan • Single .tapir File • < 4 MB RAM

Engineered for in-process execution on constrained hardware. Delivers deterministic sub-microsecond latency directly inside your application runtime without network transport delays or background daemons.

  • Autonomous AI Agents, LLMs & SLMs Direct zero-IPC memory context for frontier LLMs (Claude, GPT-4, Llama-3-70B) and on-device SLMs (Phi-3, Gemma-2, Qwen-2.5) without network serialization delay.
  • Robotics, Automotive & Edge Drones High-frequency state logging and localized visual feature vector matching under extreme power limits.
  • In-Browser WebAssembly (WASM) Zero-backend private database running entirely in visitor RAM on GitHub Pages or static hosts.
  • Microservice Database-per-Service Isolated .tapir container stores slashing cloud infrastructure bills by 90%.
Database::open("local_agent.tapir")?
ENTERPRISE & PLANETARY TIER

Tapisaurus (GrandTapirus)

The Distributed Colossus • Multi-Raft • Cross-Continental Mesh

When your mission scales to billions of vector nodes and millions of concurrent files distributed across continents, Tapirus evolves into Tapisaurus. A globally replicated, partition-tolerant database fabric with Byzantine-grade consensus.

  • Multi-Raft Consensus Groups Dynamic range-partitioned Raft consensus balancing writes across thousands of nodes worldwide.
  • Hybrid Logical Clocks (HLC) True linearizable ACID transactions across AWS, Google Cloud, Azure, and on-premises data centers without atomic clocks.
  • Petabyte Cross-Continental GraphRAG Traverse distributed knowledge graphs across global regions with localized sub-graph caching.
  • Zero Single-Point-of-Failure (SPOF) Survives entire data center outages, subsea cable severances, and localized cluster partitions automatically.
Cluster::connect("tapisaurus://mesh.global.tapirusdb.com")?

The Zero-Rewrite Graduation Guarantee

Your schemas, queries, SQL transactions, and vector embeddings remain 100% syntactically identical. You prototype with embedded Tapirus on your laptop and deploy to a planetary Tapisaurus mesh without altering a single line of business logic.

Start With TapirusDB
Developer onboarding & integrations

Get started in under 60 seconds.

TapirusDB provides first-class native bindings for systems languages, dynamic scripting environments, web browsers, and containerized microservices.

Add TapirusDB directly to your Rust 2024 workspace via Cargo:

cargo add tapirus
use tapirus::Database;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // 1. Open or create an encrypted .tapir database file
    let mut db = Database::open("ai_memory.tapir")?;

    // 2. Execute SQL Relational transactions
    db.execute("CREATE TABLE IF NOT EXISTS agents (id INT PRIMARY KEY, name TEXT, model TEXT);")?;
    db.execute("INSERT INTO agents VALUES (1, 'Sentinel-Alpha', 'Phi-3-Mini');")?;

    // 3. Index high-dimensional vector embeddings with SQ8
    let embedding = vec![0.045, -0.128, 0.892, 0.231];
    db.insert_vector("doc_chunk_42", &embedding, "Strategic AI deployment blueprint.")?;

    // 4. Hybrid Vector Search with Single-Pass SQL Pre-Filtering (Wave 12)
    let rows = db.query(
        "SELECT id, name, price VECTOR NEAR embedding = [0.045, -0.128, 0.892, 0.231] TOP 5 WHERE category = 'sensors';"
    )?;

    // 5. Query entity knowledge graph via SQL (GraphRAG & Dijkstra)
    let hops = db.query("GRAPH TRAVERSE FROM 101 OUTGOING 'AUTHORED' MAX_DEPTH 3;")?;
    let path = db.query("GRAPH SHORTEST_PATH FROM 101 TO 504 VIA 'CITES';")?;
    println!("Graph paths discovered with sub-microsecond in-process latency.");

    Ok(())
}

Install official precompiled PyO3 Python wheels via pip:

pip install tapirus
import tapirus
import numpy as np

# 1. Connect to encrypted local database
db = tapirus.Database("ai_memory.tapir", encryption_key="secret_enterprise_token")

# 2. Relational SQL Queries
db.execute("CREATE TABLE IF NOT EXISTS logs (id INT PRIMARY KEY, prompt TEXT, latency REAL);")
db.execute("INSERT INTO logs VALUES (1, 'Explain quantum entanglement', 0.51);")

# 3. Vector Search with NumPy Arrays
query_vector = np.array([0.045, -0.128, 0.892, 0.231], dtype=np.float32)
results = db.search_vector(query_vector.tolist(), k=3)

for match in results:
    print(f"ID: {match['id']} | Score: {match['score']:.4f}")

Install the official TypeScript / Node.js SDK from the NPM registry:

npm install tapirus
import { TapirusDatabase } from "tapirus";

async function runNodeSDK() {
    const db = await TapirusDatabase.openInMemory();

    // 1. Reactive Subscription (CDC)
    db.subscribe("users", (change) => {
        console.log(`Live CDC Event: ${change.op} on ${change.table}`);
    });

    // 2. Accelerated GraphRAG Query
    const rag = await db.graphRagQuery({
        query: "Autonomous Agent Memory",
        topSeeds: 3,
        maxHops: 2
    });
    console.log(rag.promptContext);
}

runNodeSDK();

Run TapirusDB as an out-of-the-box Anthropic Model Context Protocol (MCP) server for Claude Desktop, Cursor IDE, Gemini, and autonomous AI agents:

tapirus mcp agent_memory.tapir
Claude Desktop Config (claude_desktop_config.json)
{
  "mcpServers": {
    "tapirus": {
      "command": "tapirus",
      "args": ["mcp", "ai_memory.tapir"]
    }
  }
}
Cursor IDE Setup (.cursor/mcp.json)
{
  "mcpServers": {
    "tapirus-db": {
      "command": "tapirus",
      "args": ["mcp", "./workspace.tapir"]
    }
  }
}
Native AI Agent MCP Tools (JSON-RPC 2.0 stdio):
  • tapirus_remember(content, importance, tags) — Persist facts, prompt observations, and agent learnings.
  • tapirus_recall(query, limit, tags) — Hybrid retrieval combining BM25 full-text, SQ8 vectors, and temporal decay.
  • tapirus_sql(sql) — Execute transactional queries and mutations directly in the single-file database.
  • tapirus_graph_neighbors(node_id, direction, hops) — Real-time entity traversal and ontology exploration.
curl -fsSL https://raw.githubusercontent.com/tapiruslab/TapirusDB/main/install.sh | bash
winget install --manifest https://raw.githubusercontent.com/tapiruslab/TapirusDB/main/winget/tapirus.yaml
# 1. Launch interactive REPL
$ tapirus

tapirus> CREATE TABLE users (id INT PRIMARY KEY, name TEXT);
Query executed. (1 row affected)

tapirus> INSERT INTO users VALUES (1, 'Ada Lovelace');
Query executed. (1 row affected)

tapirus> SELECT * FROM users;
+----+--------------+
| id | name         |
+----+--------------+
| 1  | Ada Lovelace |
+----+--------------+
1 row in set. (0.0003 sec)

# 2. Inspect tables
tapirus> .tables
Relational Tables (1):
  • users (2 columns)

Launch the high-throughput HTTP REST daemon for remote microservices:

tapirus serve --port 8080 --database ./enterprise.tapir
# Query from any language using standard HTTP POST requests:
$ curl -X POST http://localhost:8080/api/sql \
  -H "Content-Type: application/json" \
  -d '{"sql": "SELECT * FROM agents WHERE model = '\''Phi-3-Mini\'';"}'

# Output:
{
  "status": "success",
  "execution_time_ms": 0.48,
  "rows": [
    { "id": 1, "name": "Sentinel-Alpha", "model": "Phi-3-Mini" }
  ]
}

Run the official hardened minimal Alpine container:

docker run -d -p 8080:8080 -v $(pwd)/data:/data ghcr.io/tapiruslab/tapirusdb:latest
# Verify container telemetry:
$ docker stats
CONTAINER ID   NAME              CPU %     MEM USAGE / LIMIT     MEM %
a8e9f012b34c   tapirus-engine    0.01%     3.82MiB / 15.62GiB    0.02%

# Check health endpoint:
$ curl http://localhost:8080/api/health
{"status":"ok","version":"v1.0.0","engine":"100% Safe Rust"}
Interactive Hardware Console

SLM Studio & Multi-Paradigm Console.

Directly test Relational SQL, HNSW Vector similarity, GraphRAG traversals, and SLM Agent Memory in your browser. Operates seamlessly in zero-backend in-browser mode or binds dynamically to your local native tapirus serve engine.

TAPIRUS SLM STUDIO v1.0.0 // HARDWARE CONSOLE
Detecting Engine...
Presets:
memory://session.tapir SQL-92
1
Ready 0.00 ms
// JSON output will appear here
STORAGE ENGINE: Atomic .tapir Container (Zero Sprawl)
SAFETY GUARANTEE: 100% Safe Rust • #![forbid(unsafe_code)]
PEAK RAM: < 3.82 MB (Sub-4MB Bound)
Academic foundation & verification

Mathematically proven memory safety.

Read the formal verification methodology, rigorous benchmarks, and cryptographic architecture behind TapirusDB in our comprehensive research documentation.

RESEARCH PAPER

Systems Architecture Whitepaper

Comprehensive peer-reviewed specification detailing storage layout, B-Tree algorithms, HNSW quantization math, and TLA+ formal verification.

Read Whitepaper (.MD)
OPEN ACCESS

Binary Specification

Detailed binary file format specification covering Page 1 slotted-page headers, variable-length integers (Varints), and ChaCha20-Poly1305 AEAD.

View BLUEPRINT.md
VERIFICATION

Formal TLA+ Proofs

Mathematical TLA+ models and verification specifications guaranteeing Write-Ahead Log crash safety and transaction atomicity.

Inspect TLA+ Models →
SOURCE CODE

GitHub Repository

Clone the 100% Safe Rust source code, build native shared libraries, run benchmark suites, and contribute to the TapirusDB engine.

Visit GitHub (TapirusDB) →