pub struct MemoryConfig {
pub short_term_limit: u32,
pub working_limit: u32,
pub long_term_limit: u32,
pub compression_ratio: f64,
}Expand description
Configuration for the agent’s memory tiers.
Controls how much memory the agent allocates to each tier and how aggressively to compress when limits are reached.
§Example
use pe_core::cognitive_memory::MemoryConfig;
let config = MemoryConfig::default();
assert_eq!(config.short_term_limit, 8192);Fields§
§short_term_limit: u32Max tokens for short-term memory (current conversation).
working_limit: u32Max tokens for working memory (session scratchpad).
long_term_limit: u32Max tokens for long-term memory (cross-session, compressed).
compression_ratio: f64How aggressively to compress (0.0 = keep everything, 1.0 = compress hard).
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MemoryConfig
impl PartialEq for MemoryConfig
Source§fn eq(&self, other: &MemoryConfig) -> bool
fn eq(&self, other: &MemoryConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MemoryConfig
impl Serialize for MemoryConfig
impl StructuralPartialEq for MemoryConfig
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
Mutably borrows from an owned value. Read more