> ## 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.

# Qdrant

> Qdrant vector database for knowledge storage

# Qdrant

Qdrant is a high-performance vector database for semantic search and RAG.

## Installation

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install "praisonai[tools]"
```

## Docker Setup

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
docker run -d --name praison-qdrant -p 6333:6333 qdrant/qdrant
```

## Quick Start (Agent with Knowledge)

Use Qdrant as a knowledge store with an agent:

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

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

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

## Advanced Usage (Direct Store)

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

store = create_knowledge_store("qdrant", url="http://localhost:6333")

# Create collection
store.create_collection("my_knowledge", dimension=384)

# Insert documents
docs = [
    KnowledgeDocument(
        id="doc-1",
        content="Python is great for AI",
        embedding=[0.1] * 384,
        metadata={"category": "programming"}
    )
]
store.insert("my_knowledge", docs)

# Search
results = store.search("my_knowledge", query_embedding=[0.1] * 384, limit=5)

store.close()
```

## CLI

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai persistence doctor --knowledge-url "http://localhost:6333"
```

## Qdrant Cloud

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
store = create_knowledge_store(
    "qdrant",
    url="https://xxx.qdrant.io",
    api_key="your-api-key"
)
```

## Troubleshooting

**Connection refused:**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
docker ps | grep qdrant
docker logs praison-qdrant
```
