praval.storage.providers.qdrant_provider

Qdrant vector storage provider for Praval framework

Integrates with existing Praval memory system to provide vector storage capabilities through the storage framework.

Classes

QdrantProvider(name, config)

Qdrant vector database storage provider.

class praval.storage.providers.qdrant_provider.QdrantProvider(name, config)[source]

Bases: BaseStorageProvider

Qdrant vector database storage provider.

Features: - Vector similarity search - Collection management - Point insertion and retrieval - Filtering and metadata search - Batch operations - Integration with Praval memory system

Parameters:
async connect()[source]

Establish connection to Qdrant.

Return type:

bool

async disconnect()[source]

Close Qdrant connection.

async store(resource, data, **kwargs)[source]

Store vector data in Qdrant.

Parameters:
  • resource (str) – Collection name (optional, uses default if not specified)

  • data (Any) – Data to store - can be: - Single point: {“id”: “…”, “vector”: […], “payload”: {…}} - Multiple points: [{“id”: “…”, “vector”: […], “payload”: {…}}, …] - Just vector: [0.1, 0.2, …] (will generate ID)

  • **kwargs – Additional parameters

Return type:

StorageResult

Returns:

StorageResult with operation outcome

async retrieve(resource, **kwargs)[source]

Retrieve vectors from Qdrant.

Parameters:
  • resource (str) – Collection name or “collection:point_id”

  • **kwargs – Retrieval parameters (point_ids, with_vectors, with_payload)

Return type:

StorageResult

Returns:

StorageResult with retrieved data

async query(resource, query, **kwargs)[source]

Execute vector search or other operations.

Parameters:
  • resource (str) – Collection name

  • query (Union[str, Dict]) – Query type or search vector

  • **kwargs – Query parameters

Return type:

StorageResult

Returns:

StorageResult with query results

async delete(resource, **kwargs)[source]

Delete points from Qdrant.

Parameters:
  • resource (str) – Collection name or “collection:point_id”

  • **kwargs – Delete parameters (point_ids, filter)

Return type:

StorageResult

Returns:

StorageResult with operation outcome

async list_resources(prefix='', **kwargs)[source]

List collections in Qdrant.

Return type:

StorageResult

Parameters:

prefix (str)