Skip to main content

MemoryProtocol

Defined in the protocols module.
Rust AI Agent SDK Protocol for memory implementations.

Methods

store

async fn store(&mut self, role: &str, content: &str) -> Result<()>
Store a message in memory Parameters:
NameType
role&str
content&str

history

async fn history(&self) -> Result<Vec<MemoryMessage>>
Get conversation history

clear

async fn clear(&mut self) -> Result<()>
Clear memory
async fn search(&self, query: &str, limit: usize) -> Result<Vec<MemoryMessage>>
Search memory Parameters:
NameType
query&str
limitusize

Source

View on GitHub

praisonai/src/protocols/mod.rs at line 0