> For the complete documentation index, see [llms.txt](https://whitepaper.aitech.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.aitech.io/agentforge/tools/qdrant.md).

# qdrant

[Qdrant](https://qdrant.tech/) is an open-source vector database designed for efficient storage, management, and retrieval of high-dimensional vector embeddings. Qdrant enables fast and scalable semantic search, making it ideal for AI applications that require similarity search, recommendation systems, and contextual information retrieval.

With Qdrant, you can:

* **Store vector embeddings**: Efficiently manage and persist high-dimensional vectors at scale
* **Perform semantic similarity search**: Find the most similar vectors to a query vector in real time
* **Filter and organize data**: Use advanced filtering to narrow down search results based on metadata or payload
* **Fetch specific points**: Retrieve vectors and their associated payloads by ID
* **Scale seamlessly**: Handle large collections and high-throughput workloads

In Agent Forge, the Qdrant integration enables your agents to interact with Qdrant programmatically as part of their workflows. Supported operations include:

* **Upsert**: Insert or update points (vectors and payloads) in a Qdrant collection
* **Search**: Perform similarity search to find vectors most similar to a given query vector, with optional filtering and result customization
* **Fetch**: Retrieve specific points from a collection by their IDs, with options to include payloads and vectors

This integration allows your agents to leverage powerful vector search and management capabilities, enabling advanced automation scenarios such as semantic search, recommendation, and contextual retrieval.

By connecting Agent Forge with Qdrant, you can build agents that understand context, retrieve relevant information from large datasets, and deliver more intelligent and personalized responses—all without managing complex infrastructure.

### Usage Instructions

Store, search, and retrieve vector embeddings using Qdrant. Perform semantic similarity searches and manage your vector collections.

### How to Get an API Key for Qdrant

An API key is required to authenticate your requests and manage your Qdrant clusters. The process for creating a key is done through the Qdrant Cloud Dashboard.

{% stepper %}
{% step %}

### Log in to your Qdrant Cloud account.

Navigate to the Qdrant Cloud website and sign in with your credentials.
{% endstep %}

{% step %}

### Go to your Cluster details page.

From the main dashboard, select the specific cluster for which you want to create an API key.
{% endstep %}

{% step %}

### Find the "API Keys" section.

On the cluster details page, look for a tab or a section labeled **"API Keys."**
{% endstep %}

{% step %}

### Create a new API key.

Click the **"Create"** button to generate a new key. You will be prompted to:

* **Give the key a name:** This is for your own reference to help you identify the key's purpose.
* **Set an expiration (optional):** You can set an expiration date in days (default is 90 days). For security, it's a good practice to set an expiration and rotate your keys regularly.
* **Configure permissions:** You can set the key's access level to `"manage/write"` (default) or `"read-only."` You can also restrict the key's access to specific collections within your cluster.
  {% endstep %}

{% step %}

### Copy the new API key.

This is the most important step. After creation, the API key will be displayed **only once**. Copy the key and store it in a secure location, such as a password manager or a `.env` file or in `Environment` in `Settings` in Agent Forge for your project. If you lose the key, you will have to create a new one.
{% endstep %}
{% endstepper %}

### Tools

#### `qdrant_upsert_points`

Insert or update points in a Qdrant collection

**Input**

| Parameter    | Type   | Required | Description               |
| ------------ | ------ | -------- | ------------------------- |
| `url`        | string | Yes      | Qdrant base URL           |
| `apiKey`     | string | No       | Qdrant API key (optional) |
| `collection` | string | Yes      | Collection name           |
| `points`     | array  | Yes      | Array of points to upsert |

**Output**

| Parameter       | Type | Description      |
| --------------- | ---- | ---------------- |
| `matches`       | any  | Search matches   |
| `upsertedCount` | any  | Upserted count   |
| `data`          | any  | Response data    |
| `status`        | any  | Operation status |

#### `qdrant_search_vector`

Search for similar vectors in a Qdrant collection

**Input**

| Parameter      | Type    | Required | Description                   |
| -------------- | ------- | -------- | ----------------------------- |
| `url`          | string  | Yes      | Qdrant base URL               |
| `apiKey`       | string  | No       | Qdrant API key (optional)     |
| `collection`   | string  | Yes      | Collection name               |
| `vector`       | array   | Yes      | Vector to search for          |
| `limit`        | number  | No       | Number of results to return   |
| `filter`       | object  | No       | Filter to apply to the search |
| `with_payload` | boolean | No       | Include payload in response   |
| `with_vector`  | boolean | No       | Include vector in response    |

**Output**

| Parameter       | Type | Description      |
| --------------- | ---- | ---------------- |
| `matches`       | any  | Search matches   |
| `upsertedCount` | any  | Upserted count   |
| `data`          | any  | Response data    |
| `status`        | any  | Operation status |

#### `qdrant_fetch_points`

Fetch points by ID from a Qdrant collection

**Input**

| Parameter      | Type    | Required | Description                 |
| -------------- | ------- | -------- | --------------------------- |
| `url`          | string  | Yes      | Qdrant base URL             |
| `apiKey`       | string  | No       | Qdrant API key (optional)   |
| `collection`   | string  | Yes      | Collection name             |
| `ids`          | array   | Yes      | Array of point IDs to fetch |
| `with_payload` | boolean | No       | Include payload in response |
| `with_vector`  | boolean | No       | Include vector in response  |

**Output**

| Parameter       | Type | Description      |
| --------------- | ---- | ---------------- |
| `matches`       | any  | Search matches   |
| `upsertedCount` | any  | Upserted count   |
| `data`          | any  | Response data    |
| `status`        | any  | Operation status |

### Notes

* Category: `tools`
* Type: `qdrant`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://whitepaper.aitech.io/agentforge/tools/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.
