kiromi-ai-memory 0.2.2

Local-first multi-tenant memory store engine: Markdown/text content on object storage, metadata in SQLite, plugin-shaped embedder/storage/metadata, hybrid text+vector search.
Documentation

kiromi-ai-memory

Local-first multi-tenant memory store engine. Markdown / text content on object storage, metadata in SQLite, plugin-shaped embedder / storage / metadata. Hybrid text + vector search, hierarchical summaries, snapshot/restore, schema migration, GC.

This is the engine crate. Operators interact with it via the kiromi-ai-cli; macOS / iOS callers via kiromi-ai-swift; custom embedders by implementing the kiromi_ai_memory::Embedder trait and registering with Memory::builder().

Status

0.1.0 — first published release. Slice 1 (engine + DX foundation) and Slice 2 (recursive indices, typed metadata + citations, summaries first-class, regeneration / snapshots / migration / context build) are shipped. Pre-1.0 SemVer: a minor bump may include breaking changes; the CHANGELOG is the source of truth.

Quickstart

use kiromi_ai_memory::{
    AppendOpts, Content, Memory, Partitions, PartitionScheme, TenantId,
};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let mem = Memory::builder()
        .tenant(TenantId::new("local")?)
        .scheme(PartitionScheme::parse("user={user}/topic={topic}")?)
        .storage_local("./store")
        .metadata_sqlite("sqlite:./store/metadata.db")
        .open()
        .await?;

    let parts = Partitions::new()
        .with("user", "alex")
        .with("topic", "design");

    let embedding = vec![0.0_f32; 384]; // caller-provided

    let r = mem
        .append(parts, Content::text("hello world"), AppendOpts::default()
            .with_embedding(embedding))
        .await?;

    let _record = mem.get(&r).await?;
    Ok(())
}

Caller-provided embeddings

The engine ships no embedder by default. Either pre-compute vectors externally (Apple Foundation Models, OpenAI, Cohere, …) and pass them via AppendOpts::with_embedding, or wire a programmatic Embedder impl through Memory::builder().embedder(...). The kiromi-ai-embed-onnx crate provides a default ONNX/fastembed-rs implementation.

License

Dual-licensed under Apache-2.0 OR MIT.

Documentation