# Qdrant

#### Integrating Qdrant with Qyver

This guide explains how to configure and integrate Qdrant with Qyver.

**Configuring an Existing Managed Qdrant Instance**

To use Qdrant with Qyver, you can start a managed Qdrant instance (a **free tier** is available). Instructions for setting up a managed instance are included in the **Starting a Managed Qdrant Instance** section below.

Once the instance is running, ensure:

* The server can access the Qdrant instance.
* Authentication settings are correctly configured.

***

#### Configuration Modifications

To integrate Qdrant, add the `QdrantVectorDatabase` class and include it in the executor:

```python
from qyver import framework as qv

vector_database = qv.QdrantVectorDatabase(
    "<your_qdrant_url>",  # (Required) Qdrant server URL (typically includes a port)
    "<your_api_key>",  # (Required) API key for authentication
    default_query_limit=10,  # (Optional) Maximum number of results per query (defaults to 10)
    # Additional parameters can be passed as kwargs following Qdrant's official Python client documentation.
)
```

Once configured, assign it to the executor:

```python
...
executor = qv.RestExecutor(
    sources=[source],
    indices=[index],
    queries=[qv.RestQuery(qv.RestDescriptor("query"), query)],
    vector_database=vector_database,  # Use the QdrantVectorDatabase instance
)
...
```

***

#### Starting a Managed Qdrant Instance

To create a **managed Qdrant instance**, follow these steps:

1. Sign in to [Qdrant Cloud](https://cloud.qdrant.io/login).
2. Click **Overview** in the left menu.
3. Select **Create Cluster** (free-tier or production-ready).
   * Free-tier includes **0.5 vCPU, 1GB RAM, 4GB storage** on **one node**.
   * Paid plans offer customization options like platform selection, region, and high availability (HA).
4. Once the cluster is created, generate an **API key** and store it securely (it cannot be retrieved later).
5. Use this API key in your **QdrantVectorDatabase** configuration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://qyverlabs.gitbook.io/qyverlabs-docs/run-in-production/supported-vector-databases/qdrant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
