Skip to content

PistaDBThe embedded vector database for LLM-native apps

Pure C99 · Zero dependencies · Single .pst file · Sub-millisecond search on a laptop

Quick taste

python
import numpy as np
from pistadb import PistaDB, Metric, Index

with PistaDB("docs.pst", dim=1536, metric=Metric.COSINE, index=Index.HNSW) as db:
    db.insert(1, np.random.rand(1536).astype("float32"), label="chunk_0001")
    results = db.search(np.random.rand(1536).astype("float32"), k=10)
    for r in results:
        print(r.id, r.distance, r.label)
    db.save()

Every LLM application eventually needs a vector database. PistaDB gives you a production-grade one in a single file and a C library with zero dependencies. Ship it inside a desktop app. Bundle it on an edge device. Drop it next to your Python script.

Released under the MIT License.