# klieo-memory-qdrant

Qdrant-backed implementation of klieo-core's `LongTermMemory`.

Part of the [klieo](https://crates.io/crates/klieo) Rust agent framework.

## Features

- High-dimensional vector search via Qdrant
- Implements `LongTermMemory` — swap for `klieo-memory-sqlite` without changing agent code
- Configurable collection, API key, embedder id

## Quickstart

```toml
[dependencies]
klieo-memory-qdrant = "2"
```

```rust
use klieo_memory_qdrant::MemoryQdrant;

# async fn run() -> Result<(), Box<dyn std::error::Error>> {
let mem = MemoryQdrant::connect("http://127.0.0.1:6334").await?;
// mem.long_term → Arc<dyn LongTermMemory>
# let _ = mem;
# Ok(()) }
```

`MemoryQdrant::connect(url)` bakes in `DummyEmbedder` (zero-vector,
FIFO recall) and a default `QdrantConfig` — paste-and-run with no
extra dependency. Swap for a real embedder + custom config via
`MemoryQdrant::new`.

## Advanced wiring — custom config + embedder

```rust
use klieo_memory_qdrant::{MemoryQdrant, QdrantConfig, DummyEmbedder};
use std::sync::Arc;

# async fn run() -> Result<(), Box<dyn std::error::Error>> {
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?;
# let _ = mem;
# Ok(()) }
```

`ShortTermMemory` and `EpisodicMemory` are not implemented here — see
`klieo-memory-sqlite` and `klieo-memory-neo4j` for those.

## Status

`2.x` — stable; public API follows SemVer 2.0.0.
See [`docs/SEMVER.md`](https://github.com/mohrimic/klieo/blob/main/docs/SEMVER.md).

## License

MIT — see [`LICENSE`](https://github.com/mohrimic/klieo/blob/main/LICENSE).
