pub struct MemoryEntry {Show 24 fields
pub id: String,
pub memory_type: MemoryType,
pub tier: MemoryTier,
pub content: String,
pub content_hash: u64,
pub tags: Vec<String>,
pub source: String,
pub session_id: Option<String>,
pub importance: f32,
pub pinned: bool,
pub protection: ProtectionLevel,
pub auto_classified: bool,
pub session_appearances: u32,
pub user_corrected: bool,
pub seen_in_sessions: Vec<String>,
pub created_at: DateTime<Utc>,
pub accessed_at: DateTime<Utc>,
pub modified_at: DateTime<Utc>,
pub access_count: u32,
pub decay_score: f32,
pub compaction_level: u8,
pub compacted_from: Vec<String>,
pub related_ids: Vec<String>,
pub contradicts: Option<String>,
}Expand description
A single memory entry with lifecycle and auto-protection metadata.
Fields§
§id: StringUnique ID.
memory_type: MemoryTypeMemory type (auto-classified if not explicitly set).
tier: MemoryTierCurrent tier (auto-managed by Dream).
content: StringContent (Markdown).
content_hash: u64Content hash for deduplication.
Tags (auto-extracted from content).
source: StringCreator (agent name, “compaction”, “system”, “dream”, “auto-classify”).
session_id: Option<String>Related session ID.
importance: f32Base importance (0.0–1.0), set by type or auto-computed.
pinned: boolWhether user explicitly pinned (optional override).
protection: ProtectionLevelAuto-computed protection level. Dream recomputes each run.
auto_classified: boolWhether the type was auto-classified (vs explicit).
session_appearances: u32Number of distinct sessions this entry appeared in.
user_corrected: boolWhether the user has corrected/contradicted this entry’s topic.
seen_in_sessions: Vec<String>Session IDs that have accessed this entry (for dedup of session_appearances). Max 100 entries; oldest evicted first.
created_at: DateTime<Utc>Creation timestamp.
accessed_at: DateTime<Utc>Last access timestamp.
modified_at: DateTime<Utc>Last modification timestamp.
access_count: u32Access count.
decay_score: f32Current decay score (0.0–1.0), computed by DecayEngine.
compaction_level: u8Compaction level (0 = raw, 1 = daily, 2 = weekly, 3 = monthly, 4 = root).
compacted_from: Vec<String>IDs of entries this was compacted from.
IDs of related memory entries.
contradicts: Option<String>Contradicts a previous entry (ID of the contradicted entry).
Trait Implementations§
Source§impl Clone for MemoryEntry
impl Clone for MemoryEntry
Source§fn clone(&self) -> MemoryEntry
fn clone(&self) -> MemoryEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more