Graph traversal
Typed nodes and edges with properties. Multi-hop traversal, filters, and pathfinding with BFS, Dijkstra, and k-shortest paths.
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.
const topics = db .from(alice) .out('wrote') .out('discusses') .nodes()Start from a node. Key lookups hit a hash index: ~42 ns.
p50 · Rust core · Apple M5 Pro · 10k nodes, 50k edges · sync=normal · MVCC onMethodology
Capabilities
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.
Typed nodes and edges with properties. Multi-hop traversal, filters, and pathfinding with BFS, Dijkstra, and k-shortest paths.
IVF and IVF-PQ approximate nearest-neighbor indexes with cosine, L2, and dot-product metrics. Embeddings are stored with their nodes.
MVCC snapshot isolation: every transaction reads a consistent view, and every commit is written to a write-ahead log with CRC-32 checksums first.
A single .kitedb file holds the log and the snapshot. The snapshot is memory-mapped, and online backups are built in.
Primary / replica replication with epoch fencing, log catch-up, snapshot reseed, and Prometheus or OpenTelemetry metrics.
A Rust core with N-API bindings for Node and Bun and PyO3 bindings for Python.
API
Each binding exposes the same fluent builders. Queries are ordinary method calls, and in TypeScript the result types follow your schema.
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
The file format and storage engine are designed for graph workloads. Everything in this diagram runs inside your application process.
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 logQueries read a memory-mapped CSR snapshot merged with the delta, through an MVCC view, so each transaction sees one consistent state.
Snapshot + deltaPeriodically the delta is folded into a fresh CSR snapshot, keeping adjacency contiguous and the log short.
Single-file formatBenchmarks
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.
Rust core · log scale · dot = p50, line = p95
Use cases
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()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()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()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 })Install the package, open a database, and write your first traversal. It takes about five minutes.