What is Zvec?
Zvec is an open-source vector database that runs inside your application process instead of as a separate server. You install it as a library, point it at a local path, and start storing and searching vectors right away. It sits in the Vector Databases category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0.
Overview
Zvec is an open-source vector database that runs inside your application process instead of as a separate server. You install it as a library, point it at a local path, and start storing and searching vectors right away. It was built and used within Alibaba Group before being released as open source.
It is aimed at developers who want similarity search without operating a standalone database. Because it runs wherever your code runs, it fits notebooks, backend services, CLI tools, and edge devices. SDKs are available for Python, Node.js, Go, Rust, and Dart/Flutter.
As an embedded / in-process vector store, Zvec handles dense and sparse vectors, scalar filters, and native full-text search, and can combine them in a single hybrid query. It uses write-ahead logging for durability and supports multiple concurrent readers, with writes limited to a single process.
What it does
- In-process and local: no separate server, config, or network setup required
- Dense and sparse vector support, plus multiple index types that scale from memory to disk (including an on-disk DiskANN index)
- Native full-text search on string fields using natural-language or structured expressions
- Hybrid retrieval that fuses vector similarity, full-text search, and scalar filters in one MultiQuery
- Write-ahead logging (WAL) for durable storage that survives process crashes
- Concurrent reads across processes; official SDKs for Python, Node.js, Go, Rust, and Dart/Flutter
Getting started
Install the Python SDK, then create a collection, insert documents, and run a vector query against a local path.
Install Zvec
Install the Python package from PyPI. Python 3.10 to 3.14 is required. Node.js (npm install @zvec/zvec) and Flutter (flutter pub add zvec) packages are also available.
pip install zvecCreate a collection and search
Define a schema, create and open a collection at a local path, insert a few documents, then query by vector similarity.
import zvec
# Define collection schema
schema = zvec.CollectionSchema(
name="example",
vectors=zvec.VectorSchema("embedding", zvec.DataType.VECTOR_FP32, 4),
)
# Create collection
collection = zvec.create_and_open(path="./zvec_example", schema=schema)
# Insert documents
collection.insert([
zvec.Doc(id="doc_1", vectors={"embedding": [0.1, 0.2, 0.3, 0.4]}),
zvec.Doc(id="doc_2", vectors={"embedding": [0.2, 0.3, 0.4, 0.1]}),
])
# Search by vector similarity
results = collection.query(
zvec.VectorQuery("embedding", vector=[0.4, 0.3, 0.3, 0.1]),
topk=10
)
print(results)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Adding similarity search to an app without running and maintaining a separate vector database server
- Building local or offline RAG and semantic search in notebooks, CLI tools, or edge devices
- Combining keyword full-text search, vector similarity, and scalar filters in a single hybrid query
- Storing large vector datasets on disk with the DiskANN index to keep memory usage low
How Zvec compares
Zvec alongside other open-source vector databases tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Supabase | ★ 116k | Managed Postgres backend whose Vector toolkit (pgvector) stores, indexes, and queries embeddings next to transactional data. |
| Redis Cloud | ★ 77.8k | Fully-managed Redis with built-in vector search, offering low-latency similarity and hybrid queries over any embeddings. |
| Milvus | ★ 46.8k | A distributed vector database for storing and searching billions of embeddings at scale, with multiple index types and Kubernetes-native deployment. |
| FAISS | ★ 42k | A library from Meta for efficient similarity search and clustering of dense vectors, with both exact and approximate indexes. |
| Qdrant | ★ 35.8k | A Rust-based vector search engine that stores embeddings with rich payload filtering for semantic search and recommendation systems. |
| Chroma | ★ 29.8k | A developer-focused vector database designed for quickly building retrieval and RAG features with a simple Python and JavaScript API. |
| pgvector | ★ 23.9k | A PostgreSQL extension that adds a vector data type and similarity search so you can store and query embeddings inside an existing Postgres database. |
| Zvec | ★ 16.3k | An in-process vector database from Alibaba that embeds directly into your app |

