skillfed

langchain-milvus

An integration package connecting Milvus and LangChain

langchain-milvus v0.4.0 675.7K downloads/30d#5,384 on PyPI58
Permissive license MIT Active released

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-milvus

uv

uv add langchain-milvus

poetry

poetry add langchain-milvus

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

langchain vector database integrationmilvus embeddings storagesemantic search with langchainrag retrieval augmented generationvector similarity searchlangchain milvus connectorhybrid search vector database
vector-databaseragembeddings

More Artificial Intelligence packages