Zvec is Alibaba's open-source vector database that runs inside your process instead of as a separate server. This note explains what it is built on and where it fits. You get the headline metrics, then the feature list covering speed, dense and sparse vectors, hybrid search, and portability. Install instructions follow for Python and Node.js, plus the supported platforms. A worked Python example walks through schema creation, opening a collection, inserting documents, and running a query. The remaining sections list use cases, the language breakdown, and the trade-offs. The weaknesses are honest. Zvec stores vectors only, so you must supply your own embedding model and build memory features on top. Read this before picking an embedded vector store for RAG or agent memory.
Definition
ZVec is an open-source, in-process vector database — lightweight, fast, and designed to be embedded directly into applications. Built on Proxima (a vector search engine proven in production at Alibaba), it provides high-speed, low-latency, scalable similarity search with minimal setup.
Key Metrics
- Stars: 9.3k
- Forks: 531
- License: Apache-2.0
- Latest: v0.3.0 (April 3, 2026)
Main Features
Blazing Fast
- Searches billions of vectors in milliseconds
- Production-grade performance
Simple, Just Works
- Install and start searching in seconds
- No servers or config
Dense + Sparse Vectors
- Native support for multi-vector queries in a single call
Hybrid Search
- Combines semantic similarity with structured filters
Runs Anywhere
- Notebooks, servers, CLI tools, edge devices
Installation
Python
pip install zvec
Requires: Python 3.10-3.14
Node.js
npm install @zvec/zvec
Supported Platforms
- Linux (x86_64, ARM64)
- macOS (ARM64)
- Windows (x86_64)
Python API
import zvec
# Create schema
schema = zvec.CollectionSchema(
name="example",
vectors=zvec.VectorSchema(
"embedding",
zvec.DataType.VECTOR_FP32,
4
)
)
# Create and open 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]}
)
])
# Query
results = collection.query(
zvec.VectorQuery(
"embedding",
vector=[0.4, 0.3, 0.3, 0.1]
),
topk=10
)
print(results)
Use Cases
- Vector search: Dense vector similarity search
- ANN search: Approximate nearest neighbor
- Embedded database: In-process vector storage
- RAG applications: Retrieval-augmented generation
- Agent memory: Store embeddings for AI agents
Tech Stack
| Language | Percentage |
|---|---|
| C++ | 79.8% |
| SWIG | 7.8% |
| Python | 7.6% |
| C | 3.5% |
| CMake | 1.2% |
Strengths
| Strength | Description |
|---|---|
| In-process | No server needed, runs inside the app |
| Blazing fast | Milliseconds across billions of vectors |
| Simple | Install and use in seconds |
| Hybrid search | Semantic + structured filters |
| Multi-platform | Linux, macOS, Windows |
| Apache 2.0 | Permissive open source |
Weaknesses
| Weakness | Description |
|---|---|
| Not a memory system | Only a vector DB, no memory features |
| Needs embedding model | You must generate embeddings yourself |
| Limited features | Focused on vector search, no advanced ML |
Zvec runs in-process on Proxima, the engine Alibaba already uses in production. The Python or Node package opens a collection with no separate server. Dense and sparse vectors can share one query, and hybrid search adds structured filters. The example stores four floats and requests the top ten hits. You still supply the embedding model, because this store has no memory features.
When to Use
- RAG applications: Need fast vector search
- Embedded systems: Don't want to deploy a separate DB
- Edge devices: Lightweight vector search
- Agent memory: Store embeddings for AI agents
- High performance: When speed matters most
References:
See also: Mem0 · RAGFlow · Memory Tool Comparison