pub struct MemoryNode {Show 15 fields
pub id: MemoryId,
pub agent_id: AgentId,
pub memory_type: MemoryType,
pub embedding: Embedding,
pub content: String,
pub created_at: Timestamp,
pub accessed_at: Timestamp,
pub access_count: u32,
pub salience: Salience,
pub confidence: Confidence,
pub space_id: SpaceId,
pub attributes: HashMap<String, AttributeValue>,
pub tags: Vec<String>,
pub valid_from: Option<Timestamp>,
pub valid_until: Option<Timestamp>,
}Expand description
A memory node: the atomic unit of knowledge in MenteDB.
Combines vector embeddings, graph connections, temporal properties, and flexible attributes in a single primitive.
Fields§
§id: MemoryIdUnique identifier.
agent_id: AgentIdThe agent that owns this memory.
memory_type: MemoryTypeMemory type classification.
embedding: EmbeddingEmbedding vector for semantic similarity search.
content: StringHuman-readable content.
created_at: TimestampWhen this memory was created.
accessed_at: TimestampWhen this memory was last accessed.
access_count: u32How many times this memory has been accessed.
salience: SalienceCurrent salience score (decays over time).
confidence: ConfidenceConfidence in this memory’s accuracy.
space_id: SpaceIdThe memory space this belongs to.
attributes: HashMap<String, AttributeValue>Flexible key-value attributes.
Tags for bitmap indexing.
valid_from: Option<Timestamp>When this fact became true in the real world. None means valid since creation.
valid_until: Option<Timestamp>When this fact stopped being true. None means still valid.
Implementations§
Source§impl MemoryNode
impl MemoryNode
Source§impl MemoryNode
impl MemoryNode
Sourcepub fn is_valid_at(&self, at: Timestamp) -> bool
pub fn is_valid_at(&self, at: Timestamp) -> bool
Returns true if this memory is temporally valid at the given timestamp.
Sourcepub fn invalidate(&mut self, at: Timestamp)
pub fn invalidate(&mut self, at: Timestamp)
Mark this memory as no longer valid.
Sourcepub fn is_invalidated(&self) -> bool
pub fn is_invalidated(&self) -> bool
Returns true if this memory has been invalidated.
Trait Implementations§
Source§impl Clone for MemoryNode
impl Clone for MemoryNode
Source§fn clone(&self) -> MemoryNode
fn clone(&self) -> MemoryNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more