docs.rs failed to build reasonkit-mem-0.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ReasonKit Mem
Memory & Retrieval Infrastructure for ReasonKit
The Long-Term Memory Layer ("Hippocampus") for AI Reasoning
Documentation | ReasonKit Core | Website
ReasonKit Mem is the memory layer ("Hippocampus") for ReasonKit. It provides vector storage, hybrid search, RAPTOR trees, and embedding support.
Features
- Vector Storage - Qdrant-based dense vector storage with embedded mode
- Hybrid Search - Dense (Qdrant) + Sparse (Tantivy BM25) fusion
- RAPTOR Trees - Hierarchical retrieval for long-form QA
- Embeddings - Local (BGE-M3) and remote (OpenAI) embedding support
- Reranking - Cross-encoder reranking for precision
Installation
Add to your Cargo.toml:
[]
= "0.1"
= { = "1", = ["full"] }
Usage
Basic Usage (Embedded Mode)
use Storage;
async
Storage with Custom Configuration
use ;
use PathBuf;
async
Hybrid Search with KnowledgeBase
use KnowledgeBase;
use ;
use Utc;
async
Using Embeddings
use ;
use KnowledgeBase;
use Arc;
async
Embedded Mode Documentation
For detailed information about embedded mode, see docs/EMBEDDED_MODE_GUIDE.md.
Architecture
The RAPTOR Algorithm (Hierarchical Indexing)
ReasonKit Mem implements RAPTOR (Recursive Abstractive Processing for Tree-Organized Retrieval) to answer high-level questions across large document sets.

The Memory Dashboard

Integration Ecosystem

Technology Stack
| Component | Technology | Purpose |
|---|---|---|
| Qdrant | qdrant-client 1.10+ | Dense vector storage |
| Tantivy | tantivy 0.22+ | BM25 sparse search |
| RAPTOR | Custom Rust | Hierarchical retrieval |
| Embeddings | BGE-M3 / OpenAI | Dense representations |
| Reranking | Cross-encoder | Final precision boost |
Project Structure
reasonkit-mem/
├── src/
│ ├── storage/ # Qdrant vector + file-based storage
│ ├── embedding/ # Dense vector embeddings
│ ├── retrieval/ # Hybrid search, fusion, reranking
│ ├── raptor/ # RAPTOR hierarchical tree structure
│ ├── indexing/ # BM25/Tantivy sparse indexing
│ └── rag/ # RAG pipeline orchestration
├── benches/ # Performance benchmarks
├── examples/ # Usage examples
├── docs/ # Additional documentation
└── Cargo.toml
Feature Flags
| Feature | Description |
|---|---|
default |
Core functionality |
python |
Python bindings via PyO3 |
local-embeddings |
Local BGE-M3 embeddings via ONNX Runtime |
API Reference
Core Types (re-exported at crate root)
use ;
Storage Module
use ;
Embedding Module
use ;
Retrieval Module
use ;
License
Apache License 2.0 - see LICENSE

Part of the ReasonKit Ecosystem
ReasonKit Core | ReasonKit Web | Website
"See How Your AI Thinks"