> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Milvus

> Milvus vector store for PraisonAI

# Milvus

Distributed vector database for large-scale similarity search.

## Setup

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Docker
docker run -d -p 19530:19530 milvusdb/milvus

pip install pymilvus
```

## Quick Start (Agent with Knowledge)

Use Milvus as a knowledge store with an agent:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant with access to documents.",
    knowledge=["./docs/guide.pdf"]
)

agent.chat("What does the guide say?")
```

## Advanced Usage (Direct Store)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai.persistence.factory import create_knowledge_store

store = create_knowledge_store("milvus", url="http://localhost:19530")

store.create_collection("documents", dimension=384)
store.insert("documents", [doc])
results = store.search("documents", query_embedding, limit=5)
```

## Configuration

| Option            | Description             |
| ----------------- | ----------------------- |
| `url`             | Milvus server URL       |
| `collection_name` | Default collection name |
