1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! # Cerebro 🧠
//!
//! **Cerebro** is a blazing-fast, storage-agnostic semantic memory engine
//! for AI Agents and LLM applications, written in pure Rust.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use cerebro::prelude::*;
//! use std::sync::Arc;
//!
//! #[tokio::main]
//! async fn main() {
//! let chunker = Arc::new(RecursiveCharacterChunker::new(512, 50));
//! let embedder = Arc::new(MockEmbedder::new(1536));
//! let store = Arc::new(MemoryVectorStore::new());
//!
//! let engine = MemoryEngine::new(chunker, embedder, store);
//!
//! let doc = Document::new("Rust ensures memory safety without a garbage collector.");
//! engine.ingest_document(doc).await.unwrap();
//!
//! let results = engine.query("memory safety", 5).await.unwrap();
//! for (node, score) in results {
//! println!("Score {:.3}: {}", score, node.chunk.text);
//! }
//! }
//! ```
// Re-export core types at the crate root
pub use *;
pub use *;
/// Convenience prelude — `use cerebro::prelude::*` to import everything you need.