zvec
A lightweight, lightning-fast, in-process vector database
Zvec is an open-source vector database from Alibaba that runs inside your application rather than as a separate server. A vector database stores and searches data by mathematical similarity rather than by exact keyword matches, which is how AI-powered search and memory systems find relevant content. Zvec is designed to be embedded directly into Python scripts, Node.js applications, notebooks, or any other program without requiring any external infrastructure to install or configure.
The main thing Zvec does is let you store lists of numbers called vectors, which are typically generated by AI models to represent text, images, or other content as a numerical description. Once stored, you can search for the closest matches to a new vector very quickly, even across collections of millions or billions of items. This is the underlying mechanism behind features like semantic search, AI chat memory, and retrieval-augmented generation, where an AI looks up relevant documents before answering a question.
Zvec supports both dense vectors, which are the standard fixed-length arrays produced by most AI embedding models, and sparse vectors, which are used by keyword-based approaches. You can combine both in a single query for hybrid search. It also supports filtering by structured fields alongside vector similarity, so you can search for the most similar items that also match specific conditions.
Data is persisted to disk with write-ahead logging, meaning nothing is lost if the process crashes. Multiple processes can read the same data at the same time, though only one process can write at a time.
The Python package installs with a single pip command and works on Python 3.10 through 3.14. A Node.js package is also available. Zvec runs on Linux, macOS, and Windows. It is released under the Apache 2.0 license and was battle-tested inside Alibaba before being open-sourced.