MnemeDbClient

Idiomatic Elixir client for the mneme core engine, an embedded-first vector and memory database written in Zig.

Status

This repository provides the Elixir package structure, API contracts, validation layer, and a Zigler NIF bootstrap.

Current native state:

Installation

def deps do
  [
    {:mnemedb_client, "~> 0.1.0"}
  ]
end

Basic API (Target Shape)

{:ok, collection} = MnemeDbClient.Collection.new("docs", dimension: 3)
:ok = MnemeDbClient.Collection.insert(collection, "doc_1", [1.0, 0.0, 0.0], metadata: "source=chat")
{:ok, results} = MnemeDbClient.Collection.search(collection, [1.0, 0.0, 0.0], limit: 10)

The snippets above show the intended public API shape. Full end-to-end behavior is completed as native operations are wired.

HNSW Example (Target Shape)

{:ok, collection} = MnemeDbClient.Collection.new("docs", dimension: 3)
:ok = MnemeDbClient.Collection.build_hnsw(collection, m: 16, ef_construction: 128, ef_search: 64, seed: 42)
{:ok, results} = MnemeDbClient.Collection.search(collection, [1.0, 0.0, 0.0], limit: 10, index: :hnsw, ef_search: 64)

Persistence Example (Target Shape)

{:ok, collection} = MnemeDbClient.Collection.new("docs", dimension: 3)
:ok = MnemeDbClient.Collection.save(collection, "docs.mneme")
{:ok, loaded} = MnemeDbClient.Collection.load("docs.mneme")

NIF and Precompiled NIF Notes

Release Process (v0.1.0)

Design docs

Current Limitations

Roadmap