garudust_memory/lib.rs
1//! SQLite-backed persistent memory and user profiles for Garudust AI agents.
2//!
3//! Provides two storage layers:
4//!
5//! * **[`FileMemoryStore`]** — Markdown files under `~/.garudust/` for long-term
6//! facts and user profile. Readable and editable by humans.
7//! * **[`SessionDb`]** — SQLite database for conversation history, tool call
8//! logs, and session metadata.
9//!
10//! # Example
11//!
12//! ```no_run
13//! use std::path::PathBuf;
14//! use garudust_memory::FileMemoryStore;
15//! use garudust_core::memory::MemoryStore;
16//!
17//! #[tokio::main]
18//! async fn main() -> anyhow::Result<()> {
19//! let home = PathBuf::from(std::env::var("HOME").unwrap_or_default());
20//! let store = FileMemoryStore::new(&home);
21//! let profile = store.read_user_profile().await?;
22//! println!("Profile: {profile}");
23//! Ok(())
24//! }
25//! ```
26
27pub mod file_store;
28pub mod migrations;
29pub mod session_db;
30
31pub use file_store::FileMemoryStore;
32pub use session_db::SessionDb;