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.

Running integration tests locally

Start a disposable server using the Qdrant version pinned in CI, then run the integration suite from the python/ directory:

docker run -d --rm --name af-qdrant-test -p 127.0.0.1:16333:6333 qdrant/qdrant:v1.16.2
curl --fail --retry 20 --retry-delay 1 --retry-connrefused http://127.0.0.1:16333/readyz
QDRANT_TEST_URL=http://127.0.0.1:16333 uv run --frozen --directory packages/qdrant poe test-integration -p no:pytest-retry
docker stop af-qdrant-test

Disabling the retry plugin makes failures visible on the first attempt. To run only the concurrent-creation cases, append -k concurrent_collection_creation_validates_winning_schema to the test command. The fixtures create uniquely named collections and delete them after each test.

Documentation

Metadata

Release files for agent-framework-qdrant 1.0.0a261015

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.0a261015
File Size Uploaded Provenance Actions
agent_framework_qdrant-1.0.0a261015.tar.gz 15.2 kB Without provenance Details for agent_framework_qdrant-1.0.0a261015.tar.gz

Built distribution (wheel)

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

Total release size: 29.5 kB

Release files / agent_framework_qdrant-1.0.0a261015.tar.gz

Download URL agent_framework_qdrant-1.0.0a261015.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8bcdade88d2c18d9505d3dd31a45824be4e02cde3a69ea2d567942d2aa51fdaf
BLAKE2b-256 checksum
How to use checksums
e60dac0b80cacfa541276413ca8aef2dcb40f78734d8655602db30b5a4453e05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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.0a261015-py3-none-any.whl

Download URL agent_framework_qdrant-1.0.0a261015-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d040a845e292bb4a934a435c805be7d907033e9053b58c6290ad54258d7dfd09
BLAKE2b-256 checksum
How to use checksums
15f1f450ef14d412a37c5e6d99fe57c31cd6be8490115e6f59c5fa254ce03553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","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}

Security for agent-framework-qdrant 1.0.0a261015

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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