Skip to main content

MemoryConfig

Defined in the Configuration module.
Rust AI Agent SDK Memory configuration

Fields

NameTypeDescription
use_short_termboolEnable short-term memory (conversation history)
use_long_termboolEnable long-term memory (persistent storage)
providerStringMemory provider (e.g., “memory”, “chroma”, “sqlite”)
max_messagesusizeMaximum number of messages to keep in short-term memory

Methods

new

fn new() -> Self
Create a new memory config with defaults

with_long_term

fn with_long_term(mut self) -> Self
Enable long-term memory

provider

fn provider(mut self, provider: impl Into<String>) -> Self
Set the memory provider Parameters:
NameType
providerimpl Into&lt;String&gt;

max_messages

fn max_messages(mut self, max: usize) -> Self
Set max messages Parameters:
NameType
maxusize