# HACS Qdrant Integration
Qdrant vector store integration for HACS (Healthcare Agent Communication Standard) vectorization.
## Installation
```bash
pip install hacs-qdrant
```
## Quick Start
```python
from hacs_qdrant import QdrantVectorStore
from hacs_tools.vectorization import HACSVectorizer
# Create Qdrant vector store
vector_store = QdrantVectorStore(collection_name="my_collection")
# Use with any embedding model
from your_embedding_provider import YourEmbeddingModel
embedding_model = YourEmbeddingModel()
# Create vectorizer
vectorizer = HACSVectorizer(embedding_model, vector_store)
# Vectorize HACS resources
vector_id = vectorizer.vectorize_memory(memory_block, actor)
results = vectorizer.search_memories("patient symptoms", limit=5)
```
## Features
- **Local and Cloud**: Works with local Qdrant instances or Qdrant Cloud
- **Automatic Scaling**: Automatically adjusts collection dimensions based on embeddings
- **Metadata Support**: Full support for HACS vector metadata
- **Performance**: Optimized for healthcare AI workloads
## Configuration
### Local Qdrant
```python
from qdrant_client import QdrantClient
from hacs_qdrant import QdrantVectorStore
# In-memory (default)
store = QdrantVectorStore()
# Local instance
client = QdrantClient(url="http://localhost:6333")
store = QdrantVectorStore(client=client)
```
### Qdrant Cloud
```python
from qdrant_client import QdrantClient
from hacs_qdrant import QdrantVectorStore
client = QdrantClient(
url="https://your-cluster.qdrant.io",
api_key="your-api-key"
)
store = QdrantVectorStore(client=client)
```
## API Reference
### QdrantVectorStore
The main vector store implementation for Qdrant.
#### Constructor
```python
QdrantVectorStore(client=None, collection_name="hacs_vectors")
```
- `client`: Optional Qdrant client instance. If None, uses in-memory storage.
- `collection_name`: Name of the Qdrant collection to use.
#### Methods
- `store_vector(vector_id, embedding, metadata)`: Store a vector with metadata
- `search_similar(query_embedding, limit, filters)`: Search for similar vectors
- `get_vector(vector_id)`: Retrieve a specific vector
- `delete_vector(vector_id)`: Delete a vector
## Integration with HACS
This package integrates seamlessly with the HACS ecosystem:
```python
from hacs_core import MemoryBlock, Evidence, Actor
from hacs_qdrant import QdrantVectorStore
from hacs_tools.vectorization import HACSVectorizer
# Your embedding model (from any provider)
embedding_model = YourEmbeddingModel()
# Qdrant vector store
vector_store = QdrantVectorStore(collection_name="clinical_vectors")
# Create vectorizer
vectorizer = HACSVectorizer(embedding_model, vector_store)
# Create test data
actor = Actor(id="doc1", name="Dr. Smith", role="physician")
memory = MemoryBlock(
id="mem1",
content="Patient shows signs of hypertension",
memory_type="clinical_observation"
)
# Vectorize and search
vector_id = vectorizer.vectorize_memory(memory, actor)
results = vectorizer.search_memories("blood pressure", limit=5)
```
## Requirements
- Python 3.10+
- qdrant-client>=1.6.0
- hacs-tools>=0.1.0
## License
Apache-2.0 License. See LICENSE file for details.
## Contributing
Contributions are welcome! Please see the main HACS repository for contribution guidelines.
## Support
For support, please open an issue in the main HACS repository.
Raw data
{
"_id": null,
"home_page": null,
"name": "hacs-qdrant",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "agents, ai, clinical, communication, embeddings, fhir, healthcare, qdrant, semantic-search, standard, vector-store, vectorization",
"author": null,
"author_email": "Solano Todeschini <solano.todeschini@gmail.com>",
"download_url": null,
"platform": null,
"description": "# HACS Qdrant Integration\n\nQdrant vector store integration for HACS (Healthcare Agent Communication Standard) vectorization.\n\n## Installation\n\n```bash\npip install hacs-qdrant\n```\n\n## Quick Start\n\n```python\nfrom hacs_qdrant import QdrantVectorStore\nfrom hacs_tools.vectorization import HACSVectorizer\n\n# Create Qdrant vector store\nvector_store = QdrantVectorStore(collection_name=\"my_collection\")\n\n# Use with any embedding model\nfrom your_embedding_provider import YourEmbeddingModel\nembedding_model = YourEmbeddingModel()\n\n# Create vectorizer\nvectorizer = HACSVectorizer(embedding_model, vector_store)\n\n# Vectorize HACS resources\nvector_id = vectorizer.vectorize_memory(memory_block, actor)\nresults = vectorizer.search_memories(\"patient symptoms\", limit=5)\n```\n\n## Features\n\n- **Local and Cloud**: Works with local Qdrant instances or Qdrant Cloud\n- **Automatic Scaling**: Automatically adjusts collection dimensions based on embeddings\n- **Metadata Support**: Full support for HACS vector metadata\n- **Performance**: Optimized for healthcare AI workloads\n\n## Configuration\n\n### Local Qdrant\n\n```python\nfrom qdrant_client import QdrantClient\nfrom hacs_qdrant import QdrantVectorStore\n\n# In-memory (default)\nstore = QdrantVectorStore()\n\n# Local instance\nclient = QdrantClient(url=\"http://localhost:6333\")\nstore = QdrantVectorStore(client=client)\n```\n\n### Qdrant Cloud\n\n```python\nfrom qdrant_client import QdrantClient\nfrom hacs_qdrant import QdrantVectorStore\n\nclient = QdrantClient(\n url=\"https://your-cluster.qdrant.io\",\n api_key=\"your-api-key\"\n)\nstore = QdrantVectorStore(client=client)\n```\n\n## API Reference\n\n### QdrantVectorStore\n\nThe main vector store implementation for Qdrant.\n\n#### Constructor\n\n```python\nQdrantVectorStore(client=None, collection_name=\"hacs_vectors\")\n```\n\n- `client`: Optional Qdrant client instance. If None, uses in-memory storage.\n- `collection_name`: Name of the Qdrant collection to use.\n\n#### Methods\n\n- `store_vector(vector_id, embedding, metadata)`: Store a vector with metadata\n- `search_similar(query_embedding, limit, filters)`: Search for similar vectors\n- `get_vector(vector_id)`: Retrieve a specific vector\n- `delete_vector(vector_id)`: Delete a vector\n\n## Integration with HACS\n\nThis package integrates seamlessly with the HACS ecosystem:\n\n```python\nfrom hacs_core import MemoryBlock, Evidence, Actor\nfrom hacs_qdrant import QdrantVectorStore\nfrom hacs_tools.vectorization import HACSVectorizer\n\n# Your embedding model (from any provider)\nembedding_model = YourEmbeddingModel()\n\n# Qdrant vector store\nvector_store = QdrantVectorStore(collection_name=\"clinical_vectors\")\n\n# Create vectorizer\nvectorizer = HACSVectorizer(embedding_model, vector_store)\n\n# Create test data\nactor = Actor(id=\"doc1\", name=\"Dr. Smith\", role=\"physician\")\nmemory = MemoryBlock(\n id=\"mem1\",\n content=\"Patient shows signs of hypertension\",\n memory_type=\"clinical_observation\"\n)\n\n# Vectorize and search\nvector_id = vectorizer.vectorize_memory(memory, actor)\nresults = vectorizer.search_memories(\"blood pressure\", limit=5)\n```\n\n## Requirements\n\n- Python 3.10+\n- qdrant-client>=1.6.0\n- hacs-tools>=0.1.0\n\n## License\n\nApache-2.0 License. See LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please see the main HACS repository for contribution guidelines.\n\n## Support\n\nFor support, please open an issue in the main HACS repository. ",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Qdrant vector store integration for HACS (Healthcare Agent Communication Standard)",
"version": "0.2.2",
"project_urls": {
"Bug Tracker": "https://github.com/solanovisitor/hacs/issues",
"Changelog": "https://github.com/solanovisitor/hacs/blob/main/docs/reference/changelog.md",
"Documentation": "https://github.com/solanovisitor/hacs/tree/main/docs",
"Homepage": "https://github.com/solanovisitor/hacs",
"Repository": "https://github.com/solanovisitor/hacs"
},
"split_keywords": [
"agents",
" ai",
" clinical",
" communication",
" embeddings",
" fhir",
" healthcare",
" qdrant",
" semantic-search",
" standard",
" vector-store",
" vectorization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e25b7409c17626cef8915894f5b678da84abf98f7efb3cd80d6c6eeb6cbf068f",
"md5": "27866193796dbecd8ce8c0b386c8c2c7",
"sha256": "e57911b0babfb43c8384c8f9c261e9dd324dcb7cda7bf57ac85347e10b0f50df"
},
"downloads": -1,
"filename": "hacs_qdrant-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27866193796dbecd8ce8c0b386c8c2c7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5173,
"upload_time": "2025-07-09T14:52:33",
"upload_time_iso_8601": "2025-07-09T14:52:33.453864Z",
"url": "https://files.pythonhosted.org/packages/e2/5b/7409c17626cef8915894f5b678da84abf98f7efb3cd80d6c6eeb6cbf068f/hacs_qdrant-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 14:52:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "solanovisitor",
"github_project": "hacs",
"github_not_found": true,
"lcname": "hacs-qdrant"
}