langchain-milvus
An integration package connecting Milvus and LangChain
What it is and what it does
langchain-milvus bridges LangChain and Milvus, a vector database built for similarity search and AI workloads. It lets you store embeddings from any LangChain embedding model in Milvus and retrieve them via vector similarity, hybrid search (combining vector and keyword matching), and diversity-filtered results. The package wraps Milvus operations as a LangChain VectorStore, so you can use it directly in retrieval chains and RAG pipelines without learning Milvus internals.
The integration supports multiple vector fields per collection, sparse embeddings, Milvus built-in functions like BM25, and full async operations. It is actively maintained, has no known vulnerabilities, and depends on three runtime packages: langchain-core (the LangChain abstraction layer), milvus-lite (an embedded Milvus instance), and pymilvus (the Python client for Milvus).
Use it for:
- Build RAG (Retrieval Augmented Generation) pipelines that fetch relevant documents from Milvus before passing them to an LLM.
- Implement semantic search over embeddings stored in Milvus, returning results ranked by vector similarity.
- Combine vector search with full-text search (hybrid search) to balance semantic and keyword relevance.
- Store and retrieve sparse vector embeddings for specialized AI models that produce sparse representations.
- Filter search results for diversity using maximal marginal relevance to avoid redundant or near-duplicate results.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates LangChain with Milvus vector database to enable vector storage, similarity search, and retrieval for AI applications.
Yes. The package is actively maintained, has no security vulnerabilities, low install friction, and MIT licensing. Install it if you are building LangChain applications that need vector storage and retrieval—it is the direct integration point between LangChain and Milvus.
Install
langchain-milvus on PyPI
pip
pip install langchain-milvusuv
uv add langchain-milvuspoetry
poetry add langchain-milvusInstalling langchain-milvus
Before you install
Low install friction with a pure-Python wheel. Active maintenance: last commit 2026-07-25, release 28 days old. Depends on langchain-core, milvus-lite, and pymilvus.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install langchain-milvus
from langchain_milvus import Milvus
from langchain_core.embeddings import Embeddings
vector_store = Milvus(embedding_function=your_embeddings, collection_name="my_collection")
Requires Python 3.10 or later; langchain-core and pymilvus must be installed and configured.
Verify before relying
- Whether milvus-lite runs without additional system dependencies on all supported platforms.
- Performance characteristics and scaling limits for the vector search operations.
- Specific async API coverage and whether all retrieval methods support async.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — langchain-core, milvus-lite, pymilvus |
| Maintenance | actively maintained — 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 675,671/month — #5,384 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_milvus-0.4.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
langchain-chromaConnects LangChain applications to Chroma, a…
permissive · top 5,000 on PyPI
milvus-liteMilvus Lite is a pure-Python local vector…
permissive · top 5,000 on PyPI
pymilvus.modelProvides embedding and reranker model…
permissive · top 15,000 on PyPI
llama-index-vector-stores-milvusIntegrates the Milvus vector database with…
permissive · top 15,000 on PyPI
langchain-qdrantConnects LangChain applications to Qdrant…
permissive · top 5,000 on PyPI
langchain-weaviateIntegrates Weaviate vector database with…
permissive · top 15,000 on PyPI
langchain-plaidIntegrates NextPlaid, a ColBERT-style…
permissive · top 15,000 on PyPI
langchain-redisIntegrates Redis with LangChain to provide…
permissive · top 15,000 on PyPI
langchain-pineconeConnects LangChain applications to Pinecone…
permissive · top 5,000 on PyPI
langchain-graph-retrieverRetrieves documents from a graph structure…
permissive · top 15,000 on PyPI