The best open source vector database for most agent and RAG projects in 2026 is Qdrant: Apache 2.0, one Docker container to start, fast payload filters for per user memory, and a new BM25 scoring option in v1.20.0. Pick pgvector if you already run Postgres, Milvus if you expect to need a cluster, Chroma or LanceDB if you want the database to live inside your Python process, and Weaviate if you want the database to create embeddings and serve MCP for you. All six are free to self host. Pinecone, the best known managed option, is not open source at all.
We checked licenses, release dates and features against each project's GitHub repository and official docs on October 23, 2026, and ran the same small agent memory task in the four that run embedded with no server (Chroma, LanceDB, Qdrant local mode and Milvus Lite). We did not run the server editions or pgvector here, and we make no speed claims between them.
The best open source vector databases at a glance
| Item | License | Written in | Runs as | Latest release (checked Oct 23) | Best for |
|---|---|---|---|---|---|
| Qdrant | Apache 2.0 | Rust | Server (local mode for tests) | v1.20.0, Oct 22, 2026 | Most agent memory and RAG apps |
| pgvector | PostgreSQL License | C | Postgres extension | v0.8.7, Oct 1, 2026 | Teams already on Postgres |
| Milvus | Apache 2.0 | Go | Lite, Standalone, Distributed | v3.0.3, Oct 14, 2026 | Billions of vectors, shared clusters |
| Chroma | Apache 2.0 | Rust | In process or server | 1.5.9, May 5, 2026 | Prototypes and notebooks |
| LanceDB | Apache 2.0 | Rust | Embedded library | v0.40.0, Oct 7, 2026 | One app or agent owning its data |
| Weaviate | BSD 3 Clause core | Go | Server (embedded for tests) | v1.40.2, Oct 22, 2026 | Built in vectorizers and MCP |
How we picked
An open source vector database earns a spot here only if the server or library itself is under an OSI approved license, you can run it on your own machine for free, and it shipped a release in 2026. Then we judged each one on what matters when an agent does the searching:
- Filtering: agents almost always search inside one user, project or session, so metadata filters have to be fast and correct.
- Keyword plus vector search: agents look up file names, error codes and ticket IDs, which pure semantic search often misses.
- The path from laptop to production: whether the code you write on day one still works when you move to a server.
- Agent hooks: an official MCP server or framework integrations, so a coding agent or chat client can read and write memories.
1. Qdrant: the best all round pick
Qdrant is a vector search engine written in Rust. You start it with the qdrant/qdrant Docker image, store points that hold one or more vectors plus a JSON payload, and filter on payload fields during the search rather than after it. That suits agent memory: a filter on user_id does not starve the result list.
The v1.20.0 release on October 22, 2026 added BM25 scoring directly on the full text payload index and a code tokenizer for full text indexes, which helps when an agent searches source code or logs. Sparse vectors and hybrid queries were already there. The official mcp-server-qdrant gives agents store and find tools.
The Python client also has a local mode, QdrantClient(path="./db"), that runs the same API in process. It is meant for tests and CI; the client warns that payload indexes have no effect there. Our Qdrant guide walks through a full memory setup.
Pick it if you want one server that handles filtering, hybrid search and multitenancy well, with Qdrant Cloud available if you later want a managed service.
2. pgvector: the best if you already run Postgres
pgvector is a Postgres extension, not a separate database. You add a vector column to an ordinary table, and your embeddings sit next to the rows they describe, inside the same transactions, backups and access control you already have. Its README lists HNSW and IVFFlat indexes, L2, inner product, cosine and L1 distance, and half precision, binary and sparse vectors. A vector column can be indexed up to 2,000 dimensions and halfvec up to 4,000. It supports Postgres 13 and newer.
The catch is filtering. With approximate indexes, pgvector applies a WHERE filter after the index scan, so a filter that matches few rows can return fewer results than you asked for. The fix is the iterative index scan setting (hnsw.iterative_scan) added for exactly this case. For keyword plus vector search, the README points you to Postgres full text search, which you combine yourself.
Pick it if your app already lives on Postgres and you would rather not run a second database.
3. Milvus: the best for very large scale
Milvus is built to scale out. The same pymilvus code runs on Milvus Lite (a local file), Milvus Standalone (one Docker container), Milvus Distributed on Kubernetes, and the managed Zilliz Cloud. Version 3.0.3 shipped October 14, 2026. It supports BM25 through a function that fills a sparse vector field, hybrid search with RRF or weighted rankers, and a partition key for splitting data by tenant. Zilliz publishes an MCP server for it.
Milvus Lite is handy for development, but its README lists real limits: one process per data directory, no authentication, and fewer vector types and index options than the server. When we opened a Lite file from a second process in an earlier test, it refused with a lock error. Our LanceDB vs Milvus comparison covers that growth path in detail.
Pick it if you expect hundreds of millions of vectors or several teams sharing one cluster.
4. Chroma: the easiest to start with
Chroma is the database many RAG tutorials use, because pip install chromadb and three lines of Python give you a working store. The client docs describe an in memory client, a PersistentClient that writes to a folder, and an HttpClient that talks to a server you start with chroma run --path /db_path. It can compute embeddings for you through embedding functions, and it supports metadata filters plus $contains and $regex filters on document text.
Two things to know. Dense, sparse and hybrid search through Chroma's newer Search API is documented for Chroma Cloud databases, so the open source build is mainly vector search with filters. And the last Python release we found was 1.5.9 on May 5, 2026, although the repository was still getting commits on October 23. Chroma also has an official MCP server, chroma-mcp.
Pick it if you are prototyping, teaching or building a notebook demo and want the shortest path to a working retriever.
5. LanceDB: the best embedded option
LanceDB is a library, not a server. A table is a folder of Lance files on local disk or in S3, Google Cloud Storage or Azure Blob, and your app reads it directly. It supports vector search, a BM25 full text index and hybrid queries, and several processes can open the same folder. That makes it a good fit for a coding agent on a laptop, a CLI tool or a serverless function that should not depend on a database server. Release 0.40.0 came out October 7, 2026.
There is no auth in the open source library, because there is no server to secure; LanceDB Enterprise is the hosted version and is sold by quote. See LanceDB vs Qdrant for the embedded versus server tradeoff.
Pick it if one app or one agent owns its memory and you want that memory to stay a folder.
6. Weaviate: the best for built in embeddings
Weaviate is a Go server that can create embeddings for you through vectorizer modules, run hybrid search with a single alpha balance between keyword and vector scores, keep each user's data in a separate tenant, and expose search through a built in MCP server. Version 1.40.2 shipped October 22, 2026.
Check the license before you call it fully open source. The repository's LICENSE file says code outside the wl directory is BSD 3 Clause, while code inside it is under a separate enterprise license that needs a license key. On October 23 that directory held namespaces, database users, backup deduplication and self recovery. The core database is still free to self host. Our Weaviate explainer has a tested memory example.
Pick it if you want the database to handle embeddings and agent access, and the enterprise features are not ones you need.
What about Pinecone?
Pinecone is a managed service, and its database is not open source. It suits teams that never want to run infrastructure. For local work, note that Pinecone's docs say Pinecone Local, its in memory emulator, reached end of life on October 7, 2026. The suggested replacement is a mock of the API, which cannot store data or return real search results. If you need tests that write and read back vectors offline, any of the six databases above can do it.
How to run a vector database locally
Four of these run with no server and no Docker, which is the quickest way to try them. We stored four memories for two users and asked each database for the closest memory belonging to one user only. All four returned the right answer on the box with chromadb 1.5.9, lancedb 0.40.0, qdrant-client 1.20.0 and milvus-lite 3.2.2 on Python 3.13:
# pip install chromadb lancedb qdrant-client pymilvus milvus-lite
DOCS = [
(1, "ana", "prefers TypeScript", [0.9, 0.1, 0.0, 0.0]),
(2, "ana", "deploys on Fly.io", [0.1, 0.9, 0.0, 0.0]),
(3, "ben", "prefers TypeScript too", [0.9, 0.1, 0.0, 0.0]),
(4, "ben", "uses Postgres", [0.0, 0.1, 0.9, 0.0]),
]
QUERY = [0.85, 0.15, 0.0, 0.0]
import chromadb
col = chromadb.PersistentClient(path="data/chroma").get_or_create_collection(
"memories", configuration={"hnsw": {"space": "cosine"}})
col.upsert(ids=[str(d[0]) for d in DOCS], embeddings=[d[3] for d in DOCS],
documents=[d[2] for d in DOCS], metadatas=[{"user": d[1]} for d in DOCS])
print(col.query(query_embeddings=[QUERY], n_results=1, where={"user": "ana"})["documents"][0][0])
import lancedb
tbl = lancedb.connect("data/lance").create_table("memories", mode="overwrite",
data=[{"id": i, "user": u, "text": t, "vector": v} for i, u, t, v in DOCS])
print(tbl.search(QUERY).metric("cosine").where("user = 'ana'", prefilter=True).limit(1).to_list()[0]["text"])
from qdrant_client import QdrantClient, models
qc = QdrantClient(path="data/qdrant")
if qc.collection_exists("memories"):
qc.delete_collection("memories")
qc.create_collection("memories", vectors_config=models.VectorParams(size=4, distance=models.Distance.COSINE))
qc.upsert("memories", points=[models.PointStruct(id=i, vector=v, payload={"user": u, "text": t}) for i, u, t, v in DOCS])
hit = qc.query_points("memories", query=QUERY, limit=1, query_filter=models.Filter(
must=[models.FieldCondition(key="user", match=models.MatchValue(value="ana"))])).points[0]
print(hit.payload["text"])
from pymilvus import MilvusClient
mc = MilvusClient("data/milvus.db")
if mc.has_collection("memories"):
mc.drop_collection("memories")
mc.create_collection("memories", dimension=4, metric_type="COSINE")
mc.insert("memories", [{"id": i, "vector": v, "user": u, "text": t} for i, u, t, v in DOCS])
print(mc.search("memories", data=[QUERY], limit=1, filter='user == "ana"', output_fields=["text"])[0][0]["entity"]["text"])
Each line prints prefers TypeScript, never Ben's identical note, because the user filter is applied inside the search. Weaviate also has an experimental embedded mode on Linux and macOS, and Qdrant, Milvus Standalone and Weaviate all publish official Docker images for when you are ready for a server.
Which one should you choose?
- Building an agent with per user memory: Qdrant, or LanceDB if it is a single local agent. Our agent memory comparison covers the memory layers that sit on top.
- A RAG app on an existing Postgres stack: pgvector, with iterative scans turned on for filtered queries. For the pipeline itself, see how to build a RAG pipeline with LangGraph.
- Very large or multi team deployments: Milvus.
- A weekend prototype: Chroma.
- Embeddings handled by the database: Weaviate.
To give a coding agent direct access to any of them, add its MCP server; our guide to running an MCP server locally shows the setup for Claude Code, Cursor and VS Code. You can browse every option in our vector databases directory.
FAQ
What is the best free open source vector database?
For most projects, Qdrant. It is Apache 2.0, free to self host, and handles filtering and hybrid search in one server. If you already run Postgres, pgvector is free and adds no new service.
Can I run a vector database locally without Docker?
Yes. Chroma, LanceDB, Qdrant's local mode and Milvus Lite all run inside a Python process and save to a folder. LanceDB is designed for production use that way; the Qdrant and Milvus embedded modes are meant for development and tests.
Is Pinecone open source?
No. Pinecone is a managed, closed source service. Its local emulator, Pinecone Local, reached end of life on October 7, 2026.
Is Weaviate fully open source?
The core is BSD 3 Clause. Code in the repository's wl directory, which covers features such as namespaces, needs a separate enterprise license key.
Is pgvector good enough for production?
It can be. It inherits Postgres backups, replication and access control. Watch filtered queries on approximate indexes and enable iterative index scans so filters do not return too few rows.
Which vector database is best for AI agents?
One with fast metadata filters and keyword plus vector search, since agents search within a user or project and often look up exact names. Qdrant and Weaviate cover both in one server; LanceDB covers both in an embedded library.



