klieo-memory-qdrant 2.1.0

Qdrant-backed implementation of klieo-core's LongTermMemory.
Documentation
#![deny(missing_docs)]
#![deny(rust_2018_idioms)]
#![deny(rustdoc::broken_intra_doc_links)]

//! Qdrant-backed implementation of `klieo_core::memory::LongTermMemory`.
//!
//! `MemoryQdrant::connect(url)` is the capability-shaped default —
//! connects to a Qdrant gRPC URL, ensures the per-scope collection
//! exists with the embedder's vector dimension, and returns an
//! `Arc<dyn LongTermMemory>` ready to drop into
//! `klieo_core::AgentContext`. Defaults to [`DummyEmbedder`] and a
//! standard [`QdrantConfig`].
//!
//! For a custom [`QdrantConfig`] (API key, collection prefix,
//! plaintext-remote opt-in) or a real [`Embedder`], reach for
//! [`MemoryQdrant::new`] directly.
//!
//! # Quickstart
//!
//! ```no_run
//! use klieo_memory_qdrant::MemoryQdrant;
//!
//! async fn example() {
//!     let mem = MemoryQdrant::connect("http://127.0.0.1:6334").await.unwrap();
//!     let _ = mem.long_term;
//! }
//! ```
//!
//! # Advanced wiring — custom config + embedder
//!
//! ```no_run
//! use klieo_memory_qdrant::{MemoryQdrant, QdrantConfig, DummyEmbedder};
//! use std::sync::Arc;
//!
//! async fn example() {
//!     let cfg = QdrantConfig::new("http://qdrant.internal:6334")
//!         .with_api_key("supersecret")
//!         .with_collection_prefix("triage");
//!     let mem = MemoryQdrant::new(cfg, Arc::new(DummyEmbedder)).await.unwrap();
//!     let _ = mem.long_term;
//! }
//! ```
//!
//! # What's implemented
//!
//! Only `LongTermMemory`. `ShortTermMemory` and `EpisodicMemory` are
//! not Qdrant-shaped — see `klieo-memory-sqlite` and
//! `klieo-memory-neo4j` for those.

pub mod embedder;
pub use embedder::{DummyEmbedder, Embedder};

#[cfg(any(test, feature = "test-utils"))]
pub use embedder::FakeEmbedder;

pub mod client;
pub use client::QdrantConfig;

pub mod error;

pub mod long_term;
pub use long_term::QdrantLongTerm;

pub mod factory;
pub use factory::MemoryQdrant;