Memory Protocol • Rust AI Agent SDK
MemoryProtocol: Protocol for memory implementations.
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:
| Name | Type |
|---|---|
role | &str |
content | &str |
history
async fn history(&self) -> Result<Vec<MemoryMessage>>Get conversation history
clear
async fn clear(&mut self) -> Result<()>Clear memory
search
async fn search(&self, query: &str, limit: usize) -> Result<Vec<MemoryMessage>>Search memory
Parameters:
| Name | Type |
|---|---|
query | &str |
limit | usize |
Source
View on GitHubpraisonai/src/protocols/mod.rs at line 0