Skip to content
NewPrimary / replica replication

The graph database that lives in your process.

KiteDB is an embedded graph database with built-in vector search. Nodes, edges, and embeddings live in a single file, and a one-hop traversal takes about 200 nanoseconds. Bindings for TypeScript, Python, and Rust.

Quick start
topics.ts
Code language
const topics = db  .from(alice)  .out('wrote')  .out('discusses')  .nodes()
Step 1 / 4

Start from a node. Key lookups hit a hash index: ~42 ns.

wroteknowsdiscussesqueryalicebobcsr-layout0.81wal-recovery0.93ivf-recall0.74pq-codesgraphsstoragesearchml
running…

Headline performance

Edge existence check
42ns
Key lookup
42ns
1-hop traversal
42ns
Commit 100 nodes
18µs

p50 · Rust core · Apple M5 Pro · 10k nodes, 50k edges · sync=normal · MVCC onMethodology

Capabilities

One engine for connected data

Graph traversal, vector search, and transactions share a storage engine, a file format, and an API, so relationships and embeddings are queried from the same database handle.

Graph traversal

Typed nodes and edges with properties. Multi-hop traversal, filters, and pathfinding with BFS, Dijkstra, and k-shortest paths.

Vector search

IVF and IVF-PQ approximate nearest-neighbor indexes with cosine, L2, and dot-product metrics. Embeddings are stored with their nodes.

ACID transactions

MVCC snapshot isolation: every transaction reads a consistent view, and every commit is written to a write-ahead log with CRC-32 checksums first.

One file

A single .kitedb file holds the log and the snapshot. The snapshot is memory-mapped, and online backups are built in.

Replication

Primary / replica replication with epoch fencing, log catch-up, snapshot reseed, and Prometheus or OpenTelemetry metrics.

One core, three languages

A Rust core with N-API bindings for Node and Bun and PyO3 bindings for Python.

API

Write queries in the language you already use

Each binding exposes the same fluent builders. Queries are ordinary method calls, and in TypeScript the result types follow your schema.

schema.ts
Code language
import { kite } from '@kitedb/core'const db = await kite('./knowledge.kitedb', {  nodes: [    {      name: 'document',      props: {        title: { type: 'string' },        content: { type: 'string' },        embedding: { type: 'vector' },      },    },    { name: 'topic', props: { name: { type: 'string' } } },  ],  edges: [    { name: 'discusses', props: { relevance: { type: 'float' } } },  ],})

Under the hood

How the storage engine works

The file format and storage engine are designed for graph workloads. Everything in this diagram runs inside your application process.

  1. Commit: your code → write-ahead log (CRC-32) → in-memory delta
  2. Read: memory-mapped CSR snapshot ⊕ delta, through an MVCC view
  3. Checkpoint: delta folded into a fresh snapshot

Write path

A commit appends checksummed records to the write-ahead log, then applies to the in-memory delta. After a crash, the log is replayed on open.

Write-ahead log

Read path

Queries read a memory-mapped CSR snapshot merged with the delta, through an MVCC view, so each transaction sees one consistent state.

Snapshot + delta

Checkpoints

Periodically the delta is folded into a fresh CSR snapshot, keeping adjacency contiguous and the log short.

Single-file format

Benchmarks

Latency on an Apple M5 Pro

Every number here comes from a raw log in the repository. The benchmark docs list the commands to reproduce them on your own hardware. The macOS clock ticks every 41.67 ns, so 42 ns means one tick or less.

Latency by operation

Rust core · log scale · dot = p50, line = p95

Benchmark view
  • Edge exists
  • Key lookup
  • 1-hop traversal
  • Commit 100 nodes
  • Commit 100 edges
  • Vector search
Hardware
Apple M5 Pro, 48 GB, macOS 26.6
Graph dataset
10k nodes, 50k edges · 3 edge types · 10 props
Durability
sync=normal · MVCC on

Use cases

Where KiteDB fits

01

Agent memory & RAG

Retrieve passages by meaning, then expand along citations, authors, and entities for grounded context.

const [hit] = index.search(q, { k: 8 }) db.from(hit.nodeId).out('cites').nodes()
02

Knowledge graphs

Model entities and typed relationships with properties, and answer multi-hop questions without a server round-trip.

db.from(drug).out('targets').in('associated_with').nodes()
03

Recommendations

Blend collaborative paths with embedding similarity at request time, in the same process as your API.

db.from(user).out('liked').in('liked').out('liked').nodes()
04

Local-first software

Ship the database inside your desktop app, CLI, or service. The whole database is one file you can back up or sync.

await kite('./app.kitedb', { nodes, edges })

Start with one file

Install the package, open a database, and write your first traversal. It takes about five minutes.

Code language
Read the quick start