1.0.0

Semantic. Fast. Local.

A fast semantic vector database written in C/C++ for approximate nearest-neighbor search over embeddings with text metadata. Built for on-prem RAG, agent memory, and LLM inference — zero cloud dependency.

PyPI version MIT License Python 3.9+ CI
LogosDB logo

Built for scale.
Built for speed.
Built for you.

Semantic retrieval pipeline

Text → embedding → HNSW search → ranked hits

What is semantic memory?

LLM agents and RAG pipelines need to recall relevant facts, code, and documents by meaning — not just keywords. LogosDB stores embedding vectors with optional text and timestamps, then retrieves the closest matches in milliseconds using HNSW approximate nearest-neighbor search.

Fast & local

Pure C/C++ core with memory-mapped binary storage. No Python runtime overhead on the hot path. Cold start in under 10 ms.

🗄

Simple storage model

Flat binary vector files plus JSONL metadata sidecar. Crash recovery backfills the HNSW index from the append-only vector store on open.

🔍

Rich retrieval

Timestamp range filters, structured metadata predicates, hybrid ANN + lexical fusion, and multi-tenant namespaces with quotas.

<1 ms Search at 100K vectors
mmap Zero-copy reads
HNSW O(log n) queries
MIT Open source

1.0.0 — stable release

LogosDB 1.0.0 commits to stable semver for the public C API and supported on-disk formats. Throughput, search, integrations, and tooling from the 0.x line — production-ready.

Streaming NDJSON import/export

C / C++ / Python — bounded memory, checkpoint resume.

  • chunk_size for streaming reads/writes
  • Byte-offset --checkpoint and --resume
  • CLI: logosdb-cli export / import

Batch ingest & hybrid search

Chunked WAL-aware writes and advanced retrieval modes.

  • put_batch with LOGOSDB_BATCH_CHUNK_SIZE
  • Hybrid ANN + lexical score fusion
  • Filter API v2: metadata predicates

Distance metrics

Inner product (L2-normalized), cosine similarity (auto-normalized), or L2 Euclidean — pick what fits your embedding model.

Timestamp filtering

Search within ISO 8601 time windows — "last 24 hours", date ranges, or bounded recall for temporal RAG.

Multi-tenant namespaces

Isolated namespaces with quotas inside one DB root. Ideal for separating code, docs, and agent decisions.

Integrations & tooling

Use LogosDB from C, C++, Python, Node.js, or directly inside Claude Code via MCP. Framework adapters for LangChain, LlamaIndex, and more.

🧩

MCP server — Claude Code

logosdb-mcp-server indexes files, persists knowledge across sessions, and runs semantic search over stdio. Local Transformers.js embeddings by default.

🐍

Python bindings

PyPI wheels for Linux and macOS (CPython 3.9–3.13). pybind11 bindings with NumPy-friendly batch APIs and sizing calculator.

🔗

LangChain & LlamaIndex

VectorStore adapters with timestamp filtering, node add/delete, and similarity search compatible with existing RAG pipelines.

📦

Codex plugin marketplace

Semantic memory plugin for Codex with bundled MCP config, slash commands, and agent skills for automatic indexing.

Memory-efficient on-prem RAG: RAM scales with query patterns, not dataset size. A 10M-vector index at dim=384 uses ~15 GB disk but typically <200 MB query RAM thanks to mmap and OS page cache.

Quick start

Install from PyPI, open a database, embed with your model, and search.

pip install logosdb
import logosdb
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
dim = model.get_sentence_embedding_dimension()

db = logosdb.DB("/tmp/agent_memory", dim=dim, distance=logosdb.DIST_COSINE)

for text, ts in [
    ("Retrying API calls with exponential backoff reduced failures by 42%.", "2026-05-06T09:00:00Z"),
    ("Idempotency keys prevented duplicate writes during network retries.", "2026-05-06T09:10:00Z"),
]:
    emb = model.encode(text).astype("float32")
    db.put(emb, text=text, timestamp=ts)

question = "How can we avoid duplicate writes when retries happen?"
hits = db.search(model.encode(question).astype("float32"), top_k=3)
for h in hits:
    print(f"{h.score:.4f}  {h.text}")
> logosdb-cli info /tmp/agent_memory
> logosdb-cli export /tmp/agent_memory --output rows.ndjson
> logosdb-cli import /tmp/restored --dim 384 --input rows.ndjson --chunk-size 1024 --checkpoint rows.cp