Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Qdrant vector stores

An alpha Qdrant integration for Microsoft Agent Framework. QdrantCollection provides async batch storage and dense-vector search, QdrantStore manages collection clients, and QdrantSettings handles connection configuration.

Installation

pip install agent-framework-qdrant --pre

Requires Python 3.10+ and Qdrant server 1.16.2+. The official async qdrant-client SDK is installed automatically.

Connection settings

Set QDRANT_URL to your server URL and optionally QDRANT_API_KEY for authentication. If no URL is supplied, the SDK defaults to localhost.

Both constructors resolve settings from explicit url/api_key arguments, then an optional env_file_path, then environment variables. API keys accept str or AF SecretString and are unwrapped only when creating the SDK client.

You can instead pass a configured AsyncQdrantClient as async_client for advanced SDK options. Supplied clients bypass settings loading and remain caller-owned unless managed_client=True; connector-created clients are closed on async context exit.

Usage

This example stores and searches a record using a supplied vector, without an embedding service:

import asyncio
from dataclasses import dataclass
from typing import Annotated

from agent_framework import Filter, VectorStoreField, vectorstoremodel
from agent_framework_qdrant import QdrantStore


@vectorstoremodel
@dataclass
class Document:
    id: Annotated[int, VectorStoreField("key")]
    title: Annotated[str, VectorStoreField("data")]
    embedding: Annotated[
        list[float] | None, VectorStoreField("vector", dimensions=3)
    ] = None


async def main() -> None:
    async with QdrantStore() as store:
        collection = store.get_collection(Document, collection_name="documents")
        await collection.ensure_collection_exists()
        await collection.upsert(
            [Document(1, "Hello Qdrant", [1.0, 0.0, 0.0])],
            generate_vectors=False,
        )
        results = await collection.search(
            vector=[1.0, 0.0, 0.0],
            filter=Filter("title", "eq", "Hello Qdrant"),
            top=3,
        )
        async for result in results:
            print(result["record"].title, result["score"])


asyncio.run(main())

Use get([key], include_vectors=True) to retrieve vectors, or delete([key]) to remove records. Without include_vectors=True, retrieval omits vectors. Batch writes can partially succeed if the server reports an error. Tuple payload values, including nested tuples, are stored as JSON arrays without modifying the input records. Typed models restore tuples through their registered decoder.

Ordered retrieval (order_by) is not supported. Unordered retrieval uses bounded scroll pages without retaining the skipped prefix.

Capabilities and limits

  • Keys must be unsigned 64-bit integers or UUIDs (str or uuid.UUID). Arbitrary strings and automatically generated keys are not supported.
  • Multiple named dense-vector fields are supported. Binary, sparse, multivector-fusion, and keyword-hybrid search are not supported.
  • Vector fields must declare a floating-point element type. Qdrant stores dense vectors as float32; integer-valued inputs remain valid for floating-point fields.
  • Scores and thresholds use native Qdrant units. The default is cosine similarity; dot product, Euclidean distance, and Manhattan distance are also supported.
  • Portable filters require a server. SDK local mode supports unfiltered storage and dense search, but rejects portable filters and does not build payload indexes.
  • Filters support scalar comparisons, collection membership, and AND/OR/NOT. Literal text, nested-path, and array/object-equality filters are unsupported. Numeric range and mixed numeric membership operands are limited to +/- (2**53-1); integer equality supports the full signed 64-bit range.

Documentation

Release files for agent-framework-qdrant 1.0.0a260910

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-framework-qdrant 1.0.0a260910
File Size Uploaded
agent_framework_qdrant-1.0.0a260910.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-framework-qdrant 1.0.0a260910
File Interpreter ABI Platform
agent_framework_qdrant-1.0.0a260910-py3-none-any.whl Python 3 none any Details

Total release size: 27.9 kB

Release files / agent_framework_qdrant-1.0.0a260910.tar.gz

Download URL agent_framework_qdrant-1.0.0a260910.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
137623c4a3a24135d008c14be2a33c6533787ec02174b7e4e426e9f6c843c9dc
BLAKE2b-256 checksum
How to use checksums
c640b0fc6b1ac7c99e6bc6188475902f081c16af2a994f2fe2381eadb416e072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / agent_framework_qdrant-1.0.0a260910-py3-none-any.whl

Download URL agent_framework_qdrant-1.0.0a260910-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d24437b1789d40d27092edbf6f7d4cf92fef35eb644ec8a48ac869ab883d94b2
BLAKE2b-256 checksum
How to use checksums
b0f1ce0fcb2490e7e56c9e4c0fb16263c1c60d1ede0fd2cec008efa5dcdc851f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page