| Crates.io | attuned-qdrant |
| lib.rs | attuned-qdrant |
| version | 1.0.1 |
| created_at | 2025-12-18 17:39:44.962595+00 |
| updated_at | 2025-12-18 19:42:17.349279+00 |
| description | Qdrant storage backend for Attuned |
| homepage | |
| repository | https://github.com/JtPerez-Acle/Attuned |
| max_upload_size | |
| id | 1992983 |
| size | 66,006 |
Qdrant vector database backend for Attuned.
This crate provides a StateStore implementation using Qdrant for production deployments requiring:
use attuned_qdrant::{QdrantStore, QdrantConfig};
use attuned_store::StateStore;
use attuned_core::{StateSnapshot, Source};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Connect to Qdrant
let config = QdrantConfig {
url: "http://localhost:6334".to_string(),
collection_name: "attuned_states".to_string(),
..Default::default()
};
let store = QdrantStore::new(config).await?;
// Use like any StateStore
let state = StateSnapshot::builder()
.user_id("user_123")
.source(Source::SelfReport)
.axis("cognitive_load", 0.8)
.build()?;
store.upsert_latest(state).await?;
Ok(())
}
pub struct QdrantConfig {
pub url: String, // Qdrant server URL
pub collection_name: String, // Collection for states
pub api_key: Option<String>, // Optional API key
pub vector_size: u64, // Default: 23 (canonical axes)
}
# Docker
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
# Or use Qdrant Cloud
# https://cloud.qdrant.io
Apache-2.0