v0.2.0 · Open Source · Apache 2.0

On-Device Vector Database
for the Edge

Embeddable cross-platform vector database with HNSW ANN, hybrid vector + BM25 retrieval, knowledge graph, relational object store, and convergent multi-device sync — all in a single zero-dependency C++ library.

0.99ms Query Latency
96.8% Recall@5
428KB Library Size
0 Dependencies
pip install edgevdb
Scroll to explore

Everything you need. Nothing you don't.

A complete on-device RAG stack — from embedding to sync — in under 500 KB.

HNSW ANN Index

384-dim float32 vectors with M=16, ef=200/64. Sub-millisecond query latency at 10K vectors with 96.8% recall.

O(log N) query NEON / SSE2

Hybrid Retrieval + BM25

Union of HNSW vector search and a real BM25 lexical index, re-ranked by α·cosine + β·page proximity + γ·keyword (or RRF fusion). Choose hybrid, vector, or bm25 mode — BM25 needs no embedding model at all.

Knowledge Graph

On-device NER extracts entities, builds a graph, and multi-hop expansion discovers hidden connections.

Embedding Pipeline

Bring embeddings from any provider, or use the built-in embedder with real ONNX Runtime inference (dynamically loaded — no link-time dependency). Falls back to a clearly-flagged non-semantic hash when ORT is absent.

Object Store + Relations

Schema-less NoSQL with typed property indexing. Add foreign-key edges between objects for a rich data graph.

Convergent Sync

Last-Writer-Wins replication with logical clocks, device-partitioned IDs, and delete tombstones. Replicas provably converge under bidirectional delta exchange.

Stable C API

vectordb.h — single header, ABI-stable. One include, one link. Works with any FFI binding.

Zero Dependencies

Pure C++17 — no external libraries required. ONNX Runtime is optional. Core works everywhere.

Built from the ground up for the edge

A layered architecture that separates concerns cleanly — platform SDKs on top, the C++ core underneath.

Platform SDKs
Python SDK ctypes
Android SDK JNI / Kotlin
C API vectordb.h
iOS SDK Swift
C++ Core Library
HNSW Index
Chunk Store
Object Store
KG Engine
Hybrid Ranker
Sync Engine
Token Budget
Embedder

Query Pipeline

1

Embed

Text → 384-dim vector (ONNX or pre-computed)

2

HNSW Search

ANN k-NN with 3× overfetch

3

Hybrid Re-rank

α·cosine + β·page + γ·keyword

4

KG Expand

Multi-hop entity graph traversal

5

Token Budget

Assemble RAG context for LLM

Up and running in minutes

Choose your platform. Bring your own embeddings or use the built-in embedder.

Python — No ONNX Required
from edgevdb import EdgeVDB

# Open database
with EdgeVDB("./data") as db:
    # Use embeddings from ANY provider
    embedding = your_provider.embed("Neural networks classify images")
    chunk_id = db.insert_chunk(
        "Neural networks classify images",
        embedding, doc_id=1, page_number=0
    )

    # Query
    query_emb = your_provider.embed("image classification")
    results = db.query_vector(query_emb, query_text="image classification", top_k=5)

    for r in results:
        print(f"  [{r.score:.3f}] {r.text}")
    results.free()
Kotlin — Android
val db = EdgeVDB.open(context)
val embedding: FloatArray = yourProvider.embed("Neural networks classify images")
val chunkId = db.insertChunk(
    embedding, "Neural networks classify images", docId = 1, pageNumber = 0
)

// QueryResults is AutoCloseable — use .use{} to avoid handle leaks
db.queryVector(embedding, "image classification", topK = 5).use { results ->
    results.toList().forEach { println("${it.score}: ${it.text}") }
}
db.close()
Swift — iOS
let db = try EdgeVDB(storageDir: storageDir)
let embedding: [Float] = yourProvider.embed("Neural networks classify images")
let chunkId = try db.insertChunk(
    text: "Neural networks classify images",
    embedding: embedding, docId: 1, page: 0
)

let results = try db.queryVector(
    embedding: embedding, queryText: "image classification", topK: 5
)
defer { results.close() }
for r in results.toArray() {
    print("\\(r.score): \\(r.text)")
}
C — Stable API
#include "edgevdb/vectordb.h"

EvdbConfig config;
evdb_default_config(&config);
config.storage_dir = "./data";

EvdbHandle* db = evdb_open(&config);

float embedding[384] = { /* from your provider */ };
uint64_t chunk_id;
evdb_insert_chunk(db, "Hello world", embedding, 1, 0, &chunk_id);

EvdbQueryHandle* q = evdb_query_vector(db, embedding, "hello", 5);
printf("Top: %s (%.3f)\\n", evdb_result_text(q, 0), evdb_result_score(q, 0));
evdb_query_free(q);
evdb_close(db);

A small, powerful surface

The entire C API fits in a single header. Every function is documented.

Lifecycle

evdb_default_config(EvdbConfig* out)

Fill config with defaults

evdb_open(const EvdbConfig* config) → EvdbHandle*

Open or create a database

evdb_save(EvdbHandle* h) → EvdbError

Flush all data to disk

evdb_close(EvdbHandle* h)

Close and free handle

Insert

evdb_insert_text(h, embedder, text, doc_id, page, &id)

Auto-embed and insert

evdb_insert_chunk(h, text, emb384, doc_id, page, &id)

Insert with pre-computed embedding

evdb_remove_chunk(h, chunk_id)

Remove a chunk by ID

Query

evdb_query_text(h, embedder, query, topk, kg) → QueryHandle*

Auto-embed query

evdb_query_vector(h, emb384, text, topk) → QueryHandle*

Query with pre-computed vector

evdb_result_count / text / score / chunk_id / page

Result accessors

evdb_query_free(q)

Free result handle

Objects & Relations

evdb_object_put(h, type, json, &id)

Insert/update object

evdb_object_get(h, id, out_json, size)

Get object as JSON

evdb_relation_add(h, name, from, to)

Add typed directional edge

evdb_relation_get_targets(h, name, from, ids, &count)

Get relation targets

Sync

evdb_sync_create(h, device_id) → SyncEngine*

Create sync engine

evdb_sync_export_delta(s, since, out, size)

Export changes since clock

evdb_sync_apply_delta(s, json, &applied, &skipped)

Apply received delta

Configuration

hnsw_M16Max connections/node
hnsw_ef_construction200Build search width
hnsw_ef_search64Query search width
ranker_alpha0.70Cosine weight
ranker_beta0.20Page proximity weight
ranker_gamma0.10Keyword weight
token_budget3200Max RAG tokens

Real numbers. No asterisks.

All benchmarks are measured on real hardware — Intel i7-1165G7, 16 GB DDR4, Windows 11.

Query Latency

10K chunks · 384-dim · top-5
EdgeVDB (C++)
0.99 ms
EdgeVDB (Python)
7.74 ms
Qdrant
~2-5 ms
Chroma
~5-15 ms
Pinecone
~20-50 ms

Insert Throughput

C++ Native · 384-dim embeddings
ChunksTimeThroughput
1009.1 ms10,931/s
1,000242 ms4,128/s
5,0002,877 ms1,738/s
10,0009,495 ms1,053/s
15,00018,941 ms792/s

Library Size

Stripped binaries
428 KB
EdgeVDB
Desktop
241 KB
EdgeVDB
Android
~5 MB
FAISS
~30 MB
Qdrant
~50 MB
Chroma

Competitive Advantage Matrix

Capability EdgeVDB Chroma Qdrant FAISS Pinecone
Sub-ms query
Hybrid re-ranking Built-in Plugin Filter Server
Knowledge graph Built-in
CRDT sync Built-in Raft Cloud
Mobile native SDK REST
Zero deps N/A
In-process

One codebase. Every platform.

Build once in C++17, deploy everywhere — from Raspberry Pi to flagship phones.

Android

Kotlin SDK with JNI bridge. AAR distribution via Maven Central.

arm64-v8a x86_64 NDK r25+
241 KB native lib

iOS

Swift SDK with C bridging header. SPM and CocoaPods support.

arm64 Simulator Xcode 14+
XCFramework

Python

Zero-install ctypes binding. PyPI package available.

Python 3.8+ Linux macOS Windows
pip install edgevdb

Desktop / IoT

Static or shared library. CMake FetchContent integration.

Linux macOS Windows RPi
428 KB stripped

Simple CMake presets

One command to build. Tested presets for every target.

Desktop

# Debug (with tests)
cmake --preset desktop-debug
cmake --build build/desktop-debug

# Release (with benchmarks)
cmake --preset desktop-release
cmake --build build/desktop-release

Android

export ANDROID_NDK="/path/to/ndk"

# ARM64 (physical devices)
cmake --preset android-arm64
cmake --build build/android-arm64

# x86_64 (emulators)
cmake --preset android-x86_64
cmake --build build/android-x86_64

Tests

# Run all C++ tests
./build/desktop-debug/tests/test_hnsw
./build/desktop-debug/tests/test_hybrid_ranker
./build/desktop-debug/tests/test_embedder
./build/desktop-debug/tests/test_object_store
./build/desktop-debug/tests/test_sync
./build/desktop-debug/tests/test_e2e_rag

Built by XformAI

Transforming AI for the real world — making intelligent systems run anywhere, on any device.

Edge Intelligence, Redefined

XformAI is an AI technology company focused on building on-device intelligence infrastructure. We believe the future of AI is not in the cloud — it's on the edge, running locally, privately, and instantly on the devices people use every day.

EdgeVDB is our flagship open-source SDK — a zero-dependency vector database purpose-built for mobile, desktop, and IoT devices. From smartphones to Raspberry Pi, our technology powers private, offline-first AI experiences without compromising on performance.

Privacy First

All data stays on-device. No cloud. No telemetry. No API keys required.

Performance Obsessed

Sub-millisecond queries. 428 KB footprint. SIMD-optimized for ARM & x86.

Truly Cross-Platform

One C++ core, native SDKs for Android, iOS, Python, and Desktop.

Open Source

Apache 2.0 licensed. Build with us, contribute, and shape the future of edge AI.