Expand description
§Alaya
A neuroscience and Buddhist psychology-inspired memory engine for conversational AI agents.
Alaya (Sanskrit: alaya-vijnana, “storehouse consciousness”) provides three memory stores, a Hebbian graph overlay, hybrid retrieval with spreading activation, and adaptive lifecycle processes — all without coupling to any specific LLM or agent framework.
§Quick Start
use alaya::{AlayaStore, NewEpisode, Role, EpisodeContext, Query};
let store = AlayaStore::open_in_memory().unwrap();
// Store an episode
store.store_episode(&NewEpisode {
content: "Rust has zero-cost abstractions.".to_string(),
role: Role::User,
session_id: "session-1".to_string(),
timestamp: 1700000000,
context: EpisodeContext::default(),
embedding: None,
}).unwrap();
// Query memories
let results = store.query(&Query::simple("Rust")).unwrap();
assert!(!results.is_empty());Structs§
- Alaya
Store - The main entry point. Owns a SQLite connection and exposes the full store / query / lifecycle API.
- Category
- Category
Id - Consolidation
Report - Episode
- Episode
Context - Episode
Id - Forgetting
Report - Impression
- Impression
Id - Interaction
- Input to the perfuming process. The agent constructs this from whatever interaction format it uses (Signal message, Discord message, HTTP request, etc.)
- Knowledge
Filter - Link
- LinkId
- Memory
Status - NewEpisode
- NewImpression
- NewSemantic
Node - NoOp
Provider - A no-op provider for when no LLM is available. Consolidation and perfuming simply skip the LLM-dependent steps.
- NodeId
- Node
Strength - Perfuming
Report - Preference
- Preference
Id - Purge
Report - Query
- Query
Context - Scored
Memory - Semantic
Node - Transformation
Report
Enums§
Traits§
- Consolidation
Provider - The agent provides this trait to support intelligent consolidation. Alaya never calls an LLM directly — the agent owns the LLM connection.