HelixDB
An open-source graph-vector database built in Rust, designed as a unified backend for AI applications and RAG pipelines.
HelixDB is a graph-vector database written entirely in Rust that combines
graph traversal, vector similarity search, and keyword search in a single
embedded store. It targets AI application backends — RAG pipelines, agent
memory, semantic search — where developers would otherwise stitch together a
relational database, a vector store, and a graph database. HelixDB replaces that
stack with one system, one query language, and one deployment. The storage
engine is LMDB, giving it extremely low read latency with full ACID guarantees.
Features
- Graph + vector data model — nodes, edges, and vector embeddings are first-class citizens in the same store; no synchronisation between separate systems required.
- HelixQL — a type-safe, compiled query language with a schema definition step; queries are checked at compile time before deployment, catching type errors before they reach production.
- Built-in embeddings — the
Embedfunction vectorises text inline during a query, removing the need for a separate embedding service. - Built-in MCP support — agents can discover data and walk the graph via the Model Context Protocol without writing human-readable queries.
- Vector, keyword, and graph search — combine approximate nearest-neighbour vector search, BM25-style keyword search, and multi-hop graph traversals in a single query.
- Secure by default — data is only accessible through compiled HelixQL queries; there is no general-purpose query surface exposed over the network.
- TypeScript and Python SDKs — official client libraries for calling compiled query endpoints from application code.
- Ultra-low latency — LMDB as the storage backend delivers sub-millisecond read latency suitable for interactive applications.
Installation
The Helix CLI is the primary way to install and manage HelixDB locally. The install script works on Debian, Ubuntu, Fedora, and all other Linux distributions, as well as macOS.
curl -sSL "https://install.helix-db.com" | bash
For Debian / Ubuntu and Fedora specifically, the curl script above is the recommended install path. Pre-built binaries for each release are also available on the releases page if you prefer to install without running a script.
# macOS (via the same install script)
curl -sSL "https://install.helix-db.com" | bashQuick Start
1. Initialise a project
mkdir my-app && cd my-app
helix init
This creates a .hx schema and query file in the current directory.
2. Define a schema and queries
# schema.hx — define a node type with an indexed field
N::User {
INDEX name: String,
age: U32
}
# queries.hx — write typed queries against the schema
QUERY addUser(name: String, age: U32) =>
user <- AddN<User>({name: name, age: age})
RETURN user
QUERY getUser(user_name: String) =>
user <- N<User>({name: user_name})
RETURN user3. Validate and deploy
# Check that queries compile against the schema
helix check
# Deploy queries as HTTP endpoints to the local dev instance
helix push dev4. Call from application code
# TypeScript
npm install helix-ts# Python
pip install helix-pyimport HelixDB from "helix-ts";
const client = new HelixDB(); // default port: 6969
await client.query("addUser", { name: "Alice", age: 30 });
const user = await client.query("getUser", { user_name: "Alice" });
console.log(user);Vector search example
HelixDB can store and search embeddings alongside graph data. The Embed
function takes a string and returns a vector inline, so no external embedding
step is needed:
N::Document {
content: String,
embedding: F64[1536]
}
QUERY addDocument(text: String) =>
doc <- AddN<Document>({
content: text,
embedding: Embed(text)
})
RETURN doc
QUERY search(query: String) =>
results <- N<Document>::Search(Embed(query), 10)
RETURN resultsHelixDB vs separate stacks
| Capability | HelixDB | Postgres + pgvector + Neo4j |
|---|---|---|
| Vector similarity search | ✅ | ✅ (pgvector) |
| Graph traversal | ✅ | ✅ (Neo4j) |
| Keyword search | ✅ | ✅ (Postgres FTS) |
| Single deployment | ✅ | ❌ |
| Built-in embeddings | ✅ | ❌ |
| MCP agent support | ✅ | ❌ |
| Type-safe compiled queries | ✅ | ❌ |
| LMDB storage (low latency) | ✅ | ❌ |