Skip to main content
helix-rs is a Rust library for interacting with helix-db a powerful graph-vector database written in rust. It enables intuitive and type-safe access to graph-based and vector-based queries, making it ideal for building knowledge graphs, search systems, and LLM pipelines.

Installation

cargo add helix-rs
cargo add serde
cargo add tokio

Quick Start

use helix_rs::{HelixDB, HelixDBClient};
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Initialize the client (port defaults to 6969 if you pass None)
    let client = HelixDB::new(Some("http://localhost"), Some(6969), None);

    let payload = json!({
        "name": "John",
        "age": 20,
    });

    let result: serde_json::Value = client.query("AddUser", &payload).await?;
    println!("Created user: {result:#?}");

    Ok(())
}

Configuration

Custom Endpoint and Port

You can specify a custom endpoint and port when initializing the client:
let client = HelixDB::new(Some("https://my-endpoint.com"), Some(8080), Some("my-api-key")); // Uses port 8080
⌘I