Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
MemoryAdapter
Defined in the memory module.
Rust AI Agent SDK
Trait for memory adapters
Methods
store_short_term
async fn store_short_term(&mut self, message: Message) -> Result<()>
Store a message in short-term memory
Parameters:
search_short_term
async fn search_short_term(&self, query: &str, limit: usize) -> Result<Vec<Message>>
Search short-term memory
Parameters:
| Name | Type |
|---|
query | &str |
limit | usize |
get_short_term
async fn get_short_term(&self) -> Result<Vec<Message>>
Get all short-term messages
clear_short_term
async fn clear_short_term(&mut self) -> Result<()>
Clear short-term memory
store_long_term
async fn store_long_term(
&mut self,
_text: &str,
_metadata: Option<serde_json::Value>,
) -> Result<()>
Store in long-term memory (optional)
Parameters:
| Name | Type |
|---|
_text | &str |
_metadata | Option<serde_json::Value> |
Source
View on GitHub
praisonai/src/memory/mod.rs at line 0