Show HN: HelixDB – 基于对象存储构建的图数据库
Show HN: HelixDB – A graph database built on object storage

原始链接: https://github.com/HelixDB/helix-db/tree/main

HelixDB 是一个统一的数据库平台,旨在通过消除对独立关系型、向量、图和应用数据库的需求,来简化 AI 应用开发。它原生集成了这些模型,为 AI 智能体提供对企业数据的联合访问,以实现记忆和逻辑功能。 **主要特性:** * **统一模型:** 主要采用图 + 向量方法,同时支持键值(KV)、文档和关系型数据。 * **快速开发:** `helix chef` 命令行工具支持交互式的一次性引导流程。配合编程智能体(如 Claude Code)使用时,可仅凭单条文本提示词生成全栈应用。 * **开发者友好:** 查询使用 Rust 或 TypeScript DSL 编写,支持动态请求,无需复杂的构建或部署步骤。 * **灵活部署:** 开发者可以运行本地实例进行快速原型设计,或过渡到 HelixDB Cloud 以获得支持 ACID 事务、高可用、自动扩展及集成向量/全文搜索的生产级托管服务。 通过整合存储层,HelixDB 使开发者能够通过单一、一致的接口来构建、测试并扩展 AI 驱动的应用程序。

HelixDB 是一款 OLTP 图数据库,旨在作为图、向量和全文搜索的统一引擎。它专为解决 AI 驱动应用中常见的碎片化问题而构建,让开发者无需再拼凑各种离散系统来实现 GraphRAG 和内存管理。 与依赖昂贵数据复制或复杂分片的传统图数据库不同,HelixDB 利用对象存储(S3)作为其持久化层。这种架构使得数据库能够以低成本存储海量数据集,同时通过水平扩展和缓存技术,在 100 毫秒以内的延迟下处理“热”数据。 主要特性包括: * **混合能力:** 原生支持在节点和边上进行向量和全文搜索。 * **开发体验:** 用户无需使用 Cypher 或 Gremlin,而是通过 JSON 或原生 SDK(Rust、TypeScript、Go、Python)进行交互,这些 SDK 针对 AI 智能体集成进行了优化。 * **可扩展性:** 专为海量 AI 内存工作负载设计,支持 TB 级数据。 HelixDB 目前可用于本地部署,它是开源项目,正处于分布式云版本的筹备阶段。创始人专注于运营工作负载,强调为实时智能体内存和自主企业“大脑”提供低延迟的遍历能力。
相关文章

原文

HelixDB is a database that makes it easy to build all the components needed for AI applications in a single platform.

You don't need a separate application DB, relational DB, vector DB, graph DB, or application layers to manage the multiple storage locations. HelixDB gives your agents federated access to company data, for memory, company brains, and applications.

Helix primarily operates with a graph + vector data model, but it also supports KV, documents, and relational data.

The Helix CLI runs and manages local instances and talks to Helix Cloud.

curl -sSL "https://install.helix-db.com" | bash

Already installed? Update to the latest version with helix update.

2. The quickest path — helix chef

helix chef is an interactive, one-shot bootstrapper. It installs the HelixDB query skills and docs MCP, scaffolds a project, starts a local instance, seeds some example data, and writes a HELIX_CHEF_PROMPT.md. If a coding agent is available (Claude Code, Codex, or OpenCode), it can hand off and build a working app — frontend and all — from a one-line description of what you want.

That's it — no flags. Answer "what do you want to build?" and follow the prompts.

If you'd rather wire things up yourself:

  1. Initialize a project. This scaffolds helix.toml, a .helix/ workspace dir, and a ready-to-run examples/request.json.
 mkdir my-helix-app && cd my-helix-app
 helix init
  1. Start a local instance. Runs a background container on port 6969 and waits until it accepts queries.

⚠️ The default storage mode is in-memory — stopping the instance wipes its data. Use helix start dev --disk to persist data across restarts, or --foreground to stream logs.

  1. Send a query.
 helix query dev --file examples/request.json
  1. Stop the instance when you're done.

Writing queries with the SDKs

Queries are authored with the Rust or TypeScript DSL and sent straight to a running instance as dynamic requests against POST /v1/query — no build or deploy step. Both SDKs produce the same JSON AST. The examples below talk to a local instance on http://localhost:6969 (the default helix start dev port). See the Querying Guide for the full builder catalog and the dynamic-query wire format.

Install the crate (published as helix-db, imported as helix_db):

cargo init && cargo add helix-db tokio sonic-rs

Define your queries as #[register] functions, then run them directly through the client:

use helix_db::Client;
use helix_db::dsl::prelude::*;

#[register]
pub fn add_user(name: String) {
    write_batch()
        .var_as(
            "user",
            g().add_n("User", vec![("name", name)])
                .value_map(None::<Vec<String>>),
        )
        .returning(["user"])
}

#[register]
pub fn get_user(name: String) {
    read_batch()
        .var_as(
            "user",
            g().n_with_label("User")
                .where_(Predicate::eq("name", name))
                .value_map(None::<Vec<String>>),
        )
        .returning(["user"])
}

#[tokio::main]
async fn main() {
    let client = Client::new(None).unwrap(); // defaults to http://localhost:6969

    // add user
    let new_user = client
        .query::<sonic_rs::Value>()
        .dynamic(add_user("John Doe".to_string()))
        .send()
        .await
        .unwrap();
    println!("new user: {:#}", sonic_rs::to_string_pretty(&new_user).unwrap());

    // get user
    let user = client
        .query::<sonic_rs::Value>()
        .dynamic(get_user("John Doe".to_string()))
        .send()
        .await
        .unwrap();
    println!("user: {:#}", sonic_rs::to_string_pretty(&user).unwrap());
}

Install the package (Node.js 20+):

npm init -y && npm install @helix-db/helix-db

Define your queries as functions, then POST them to the running instance:

import {
  Predicate, PropertyInput, PropertyProjection,
  defineParams, g, param, readBatch, writeBatch,
} from "@helix-db/helix-db";

const addUserParams = defineParams({ name: param.string() });
function addUser(p = addUserParams) {
  return writeBatch()
    .varAs("user",
      g().addN("User", { name: PropertyInput.param("name") })
        .project([PropertyProjection.new("name")]),
    )
    .returning(["user"]);
}

const getUserParams = defineParams({ name: param.string() });
function getUser(p = getUserParams) {
  return readBatch()
    .varAs("user",
      g().nWithLabel("User")
        .where(Predicate.eqParam("name", "name"))
        .project([PropertyProjection.new("name")]),
    )
    .returning(["user"]);
}

const HELIX_URL = "http://localhost:6969/v1/query";

// add user
const newUser = await fetch(HELIX_URL, {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: addUser().toDynamicJson(addUserParams, { name: "John Doe" }),
}).then((r) => r.json());
console.log("new user:", newUser);

// get user
const user = await fetch(HELIX_URL, {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: getUser().toDynamicJson(getUserParams, { name: "John Doe" }),
}).then((r) => r.json());
console.log("user:", user);

HelixDB Cloud is an object-storage-backed deployment with integrated vector and full-text search, full ACID transactions, a single writer with auto-scaling reader nodes, and high availability (3+ gateways and DB nodes). Cloud clusters use a separate deploy path from local instances:

helix auth login                                  # authenticate
helix workspace switch <workspace>                # select workspace + project
helix project switch <project>
helix init cloud --cluster-id <cluster-id>        # or: helix add cloud --name production --cluster-id <id>
helix sync production                             # pull gateway URL + auth contract into helix.toml
helix query production --file examples/request.json

HelixDB is available as a distributed, high-availability, managed service. If you're interested in using Helix's managed service, go to our website to get started or contact us to talk with a founder.


Just Use Helix.

联系我们 contact @ memedata.com