pub struct MemoryEntry {
pub id: String,
pub key: String,
pub content: String,
pub category: MemoryCategory,
pub timestamp: String,
pub session_id: Option<String>,
pub score: Option<f64>,
pub namespace: String,
pub importance: Option<f64>,
pub superseded_by: Option<String>,
pub agent_alias: Option<String>,
pub agent_id: Option<String>,
}Expand description
A single memory entry
Fields§
§id: String§key: String§content: String§category: MemoryCategory§timestamp: String§session_id: Option<String>§score: Option<f64>§namespace: StringNamespace for isolation between agents/contexts.
importance: Option<f64>Importance score (0.0–1.0) for prioritized retrieval.
superseded_by: Option<String>If this entry was superseded by a newer conflicting entry.
agent_alias: Option<String>Resolved, human-readable agent alias for this row (the HashMap key
in Config::agents, e.g. "clamps"). SQL-backed stores produce
this via LEFT JOIN agents ON agents.id = memories.agent_id;
Markdown / Qdrant / None backends populate it with the raw column
value (which is itself the alias for those backends).
Use this field for display / routing. For scope-equality checks
(e.g. inside AgentScopedMemory) use MemoryEntry::agent_id
instead since that’s stable across backend kinds (UUID for SQL,
alias for non-SQL).
agent_id: Option<String>Raw value of the storage layer’s agent column. For SQL backends
this is the memories.agent_id UUID FK to agents.id; for
Markdown / Qdrant / None this is the alias string. The scoping
wrapper compares on this field so backend-kind doesn’t matter.
Trait Implementations§
Source§impl Clone for MemoryEntry
impl Clone for MemoryEntry
Source§fn clone(&self) -> MemoryEntry
fn clone(&self) -> MemoryEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more