Memory Config • Rust AI Agent SDK
MemoryConfig: Memory configuration
MemoryConfig
Defined in the config module.
Rust AI Agent SDK
Memory configuration
Fields
| Name | Type | Description |
|---|---|---|
use_short_term | bool | Enable short-term memory (conversation history) |
use_long_term | bool | Enable long-term memory (persistent storage) |
provider | String | Memory provider (e.g., “memory”, “chroma”, “sqlite”) |
max_messages | usize | Maximum number of messages to keep in short-term memory |
Methods
new
fn new() -> SelfCreate a new memory config with defaults
with_long_term
fn with_long_term(mut self) -> SelfEnable long-term memory
provider
fn provider(mut self, provider: impl Into<String>) -> SelfSet the memory provider
Parameters:
| Name | Type |
|---|---|
provider | impl Into<String> |
max_messages
fn max_messages(mut self, max: usize) -> SelfSet max messages
Parameters:
| Name | Type |
|---|---|
max | usize |
Source
View on GitHubpraisonai/src/config.rs at line 27