pub struct MemoryConfig {Show 18 fields
pub backend: MemoryBackendKind,
pub workspace: String,
pub embedding_provider: String,
pub embedding_model: String,
pub gemini_api_key: Option<String>,
pub index_sessions: bool,
pub multimodal_embeddings: bool,
pub embedding_cache_dir: String,
pub chunk_size: usize,
pub chunk_overlap: usize,
pub paths: Vec<MemoryIndexPath>,
pub session_max_messages: usize,
pub session_max_chars: usize,
pub temporal_decay_lambda: f64,
pub llm_query_expansion: bool,
pub wiki_enabled: bool,
pub wiki_fresh_days: u32,
pub wiki_stale_days: u32,
}Fields§
§backend: MemoryBackendKindMemory search backend: “sqlite” (default), “markdown”, or “none”
workspace: String§embedding_provider: StringEmbedding provider: “local” (fastembed, default), “openai”, “gemini”, or “none”
embedding_model: String§gemini_api_key: Option<String>Gemini API key for embeddings (supports ${ENV_VAR} syntax)
index_sessions: boolIndex completed session transcripts for memory_search (default: false)
multimodal_embeddings: boolEnable multimodal embeddings for images (requires gemini-embedding-2-preview model)
embedding_cache_dir: StringCache directory for local embedding models (optional) Default: ~/.cache/localgpt/models Can also be set via FASTEMBED_CACHE_DIR environment variable
chunk_size: usize§chunk_overlap: usize§paths: Vec<MemoryIndexPath>Additional paths to index (relative to workspace or absolute) Each path uses a glob pattern for file matching
session_max_messages: usizeMaximum messages to save in session memory files (0 = unlimited) Similar to OpenClaw’s hooks.session-memory.messages (default: 15)
session_max_chars: usizeMaximum characters per message in session memory (0 = unlimited) Set to 0 to preserve full message content like OpenClaw
temporal_decay_lambda: f64Temporal decay factor for search scoring. Older memories get lower scores using: score * exp(-lambda * age_days) Default: 0.0 (disabled) 0.1 = ~50% penalty for 7-day old memory 0.05 = ~50% penalty for 14-day old memory
llm_query_expansion: boolEnable LLM-based query expansion for memory search. Costs one extra LLM call per search but produces better keywords from conversational queries. Default: false.
wiki_enabled: boolEnable the Memory Wiki structured knowledge layer (claims, evidence, staleness). Default: false.
wiki_fresh_days: u32Days after last update before a wiki claim transitions from Fresh to Aging. Default: 30.
wiki_stale_days: u32Days after last update before a wiki claim transitions from Aging to Stale. Default: 90.
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MemoryConfig
impl Debug for MemoryConfig
Source§impl Default for MemoryConfig
impl Default for MemoryConfig
Source§impl<'de> Deserialize<'de> for MemoryConfig
impl<'de> Deserialize<'de> for MemoryConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnsafeUnpin for MemoryConfig
impl UnwindSafe for MemoryConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().