# LogosDB

A fast, embedded semantic vector database written in C/C++ that stores vectors and text metadata as memory-mapped flat files, with HNSW approximate nearest-neighbor search, timestamp-range filtering, and adapters for LangChain, LlamaIndex and Claude Code via MCP.

LogosDB is a single-process, embeddable vector store aimed at LLM memory retrieval rather than general-purpose vector search. Vectors and their optional text and ISO 8601 timestamp metadata are stored in flat, memory-mapped binary files for zero-copy reads, with the HNSW algorithm (via hnswlib) providing approximate nearest-neighbor search in roughly logarithmic time and support for inner product, cosine and Euclidean distance metrics. A crash-recovery path rebuilds the HNSW index from the append-only vector store on open, and the basic API is just Put(embedding, text, timestamp) and Search(query, top_k), plus timestamp range filtering for queries like 'search within the last 24 hours.'

A C API with an errptr convention, in the style of RocksDB or LevelDB, sits alongside a C++ wrapper with RAII and exceptions; a sizing tool estimates disk and RAM needs from a target row count and dimension. Framework adapters cover LangChain and LlamaIndex VectorStore interfaces, and a first-class MCP server integrates it with Claude Code.

The project describes itself as not a general-purpose vector database: only one process can access a given database at a time, and there is no client-server mode built in.

Website: https://jose-compu.github.io/logosdb/
