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 moreSource§impl Debug for MemoryEntry
impl Debug for MemoryEntry
Source§impl<'de> Deserialize<'de> for MemoryEntry
impl<'de> Deserialize<'de> for MemoryEntry
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MemoryEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MemoryEntry, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for MemoryEntry
impl Serialize for MemoryEntry
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for MemoryEntry
impl RefUnwindSafe for MemoryEntry
impl Send for MemoryEntry
impl Sync for MemoryEntry
impl Unpin for MemoryEntry
impl UnsafeUnpin for MemoryEntry
impl UnwindSafe for MemoryEntry
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more