Skip to main content
The milvus backend embeds knowledge chunks and stores them in a Milvus collection. Use it when you already operate Milvus and need persistent knowledge shared by multiple agent instances. KnowledgeBase.index maps to the Milvus collection name.

Prerequisites

Install the extra that contains the Milvus and LlamaIndex integrations, and prepare a reachable Milvus instance:
The Milvus backend requires an embedding model. The following environment variables configure both Milvus and the embedding model:
Instead of DATABASE_MILVUS_TOKEN, you can set DATABASE_MILVUS_USER and DATABASE_MILVUS_PASSWORD. A token takes precedence over the username and password pair.

Example

Parameters

Pass backend parameters through KnowledgeBase(backend="milvus", backend_config={...}). Without backend_config, VeADK reads the connection from environment variables and uses the global embedding configuration.
DATABASE_MILVUS_OVERWRITE=true overwrites a collection with the same name during initialization and may remove existing knowledge. Enable it only when that data does not need to be retained.
In addition to search(query, top_k), this backend supports add_from_text, add_from_files, and add_from_directory. File and directory imports split content by file type before storing it in the collection.
Last modified on September 19, 2026