Skip to main content

AgentStateMemoryExt

Trait AgentStateMemoryExt 

Source
pub trait AgentStateMemoryExt {
    // Required methods
    fn remember_kv<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        provider: &'life1 dyn KvMemoryProvider,
        key: &'life2 str,
        value: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn recall_kv_into_context<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        provider: &'life1 dyn KvMemoryProvider,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn archive_semantic<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        provider: &'life1 dyn SemanticMemoryProvider,
        text: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn recall_semantic_into_context<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        provider: &'life1 dyn SemanticMemoryProvider,
        query: &'life2 str,
        limit: usize,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn inject_summary_context<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        provider: &'life1 dyn SummaryMemoryProvider,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn summarize_evicted_messages<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        agent: &'life1 Agent,
        provider: &'life2 dyn SummaryMemoryProvider,
        evicted: &'life3 [Arc<Message>],
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

The grand unified extension trait that empowers AgentState with 3D cognitive memory.

Required Methods§

Source

fn remember_kv<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, provider: &'life1 dyn KvMemoryProvider, key: &'life2 str, value: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn recall_kv_into_context<'life0, 'life1, 'async_trait>( &'life0 mut self, provider: &'life1 dyn KvMemoryProvider, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn archive_semantic<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 dyn SemanticMemoryProvider, text: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn recall_semantic_into_context<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, provider: &'life1 dyn SemanticMemoryProvider, query: &'life2 str, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn inject_summary_context<'life0, 'life1, 'async_trait>( &'life0 mut self, provider: &'life1 dyn SummaryMemoryProvider, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn summarize_evicted_messages<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, agent: &'life1 Agent, provider: &'life2 dyn SummaryMemoryProvider, evicted: &'life3 [Arc<Message>], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Black Magic: Automatically digests evicted messages into a rolling summary using the Agent itself!

Implementations on Foreign Types§

Source§

impl AgentStateMemoryExt for AgentState

Source§

fn remember_kv<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, provider: &'life1 dyn KvMemoryProvider, key: &'life2 str, value: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn recall_kv_into_context<'life0, 'life1, 'async_trait>( &'life0 mut self, provider: &'life1 dyn KvMemoryProvider, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn archive_semantic<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 dyn SemanticMemoryProvider, text: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn recall_semantic_into_context<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, provider: &'life1 dyn SemanticMemoryProvider, query: &'life2 str, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn inject_summary_context<'life0, 'life1, 'async_trait>( &'life0 mut self, provider: &'life1 dyn SummaryMemoryProvider, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn summarize_evicted_messages<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, agent: &'life1 Agent, provider: &'life2 dyn SummaryMemoryProvider, evicted: &'life3 [Arc<Message>], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Implementors§