mentra 0.6.0

An agent runtime for tool-using LLM applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{error::RuntimeError, runtime::RuntimeStore};

use super::state::AgentMemoryState;

pub(crate) trait AgentMemoryStore: Send + Sync {
    fn save_memory(&self, agent_id: &str, state: &AgentMemoryState) -> Result<(), RuntimeError>;
}

impl<T> AgentMemoryStore for T
where
    T: RuntimeStore + ?Sized,
{
    fn save_memory(&self, agent_id: &str, state: &AgentMemoryState) -> Result<(), RuntimeError> {
        self.save_agent_memory(agent_id, state)
    }
}