pub struct AgentMemory {
pub short_term: Vec<String>,
pub long_term: HashMap<String, String>,
pub working_memory: HashMap<String, Value>,
}Expand description
Memory storage for agents.
Provides three types of memory for different use cases:
- Short-term: Recent observations and context
- Long-term: Persistent facts and knowledge
- Working: Arbitrary data for active processing
Fields§
§short_term: Vec<String>Recent observations and temporary context.
long_term: HashMap<String, String>Persistent knowledge stored as key-value pairs.
working_memory: HashMap<String, Value>Arbitrary JSON data for active processing.
Trait Implementations§
Source§impl Clone for AgentMemory
impl Clone for AgentMemory
Source§fn clone(&self) -> AgentMemory
fn clone(&self) -> AgentMemory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentMemory
impl Debug for AgentMemory
Source§impl Default for AgentMemory
impl Default for AgentMemory
Source§fn default() -> AgentMemory
fn default() -> AgentMemory
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentMemory
impl<'de> Deserialize<'de> for AgentMemory
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentMemory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentMemory, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AgentMemory
impl Serialize for AgentMemory
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 AgentMemory
impl RefUnwindSafe for AgentMemory
impl Send for AgentMemory
impl Sync for AgentMemory
impl Unpin for AgentMemory
impl UnsafeUnpin for AgentMemory
impl UnwindSafe for AgentMemory
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