pub struct MemoryItem {
pub id: Uuid,
pub text: String,
pub user_id: Option<String>,
pub agent_id: Option<String>,
pub run_id: Option<String>,
pub metadata: Value,
pub created_at: String,
pub updated_at: String,
pub score: Option<f32>,
pub last_accessed_at: Option<String>,
pub access_count: u32,
pub memory_type: Option<String>,
}Expand description
A single memory item stored in the system.
Fields§
§id: Uuid§text: String§user_id: Option<String>§agent_id: Option<String>§run_id: Option<String>§metadata: Value§created_at: String§updated_at: String§score: Option<f32>§last_accessed_at: Option<String>Last time this memory was accessed (written or retrieved).
access_count: u32Number of times this memory has been retrieved (rehearsal count).
memory_type: Option<String>Category of this memory (factual, preference, procedural, episodic).
None for memories created before typing was introduced.
Trait Implementations§
Source§impl Clone for MemoryItem
impl Clone for MemoryItem
Source§fn clone(&self) -> MemoryItem
fn clone(&self) -> MemoryItem
Returns a duplicate of the value. Read more
1.0.0 · 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 MemoryItem
impl Debug for MemoryItem
Source§impl<'de> Deserialize<'de> for MemoryItem
impl<'de> Deserialize<'de> for MemoryItem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<MemoryItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<MemoryItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for MemoryItem
impl Serialize for MemoryItem
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for MemoryItem
impl RefUnwindSafe for MemoryItem
impl Send for MemoryItem
impl Sync for MemoryItem
impl Unpin for MemoryItem
impl UnsafeUnpin for MemoryItem
impl UnwindSafe for MemoryItem
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