Skip to main content

Module memory

Module memory 

Source
Expand description

Cross-session memory: the MemoryManager plugin, the MemoryStore trait backends implement, and extraction of memories from the conversation.

Ready-made stores are in vended_memory_stores.

Re-exports§

pub use crate::injection::InjectionConfig;
pub use crate::injection::InjectionConfigBuilder;
pub use crate::injection::InjectionContext;
pub use crate::injection::InjectionTrigger;
pub use crate::types::Toggle;
pub use extraction::ExtractionConfig;
pub use extraction::ExtractionConfigBuilder;
pub use extraction::ExtractionFire;
pub use extraction::ExtractionResult;
pub use extraction::ExtractionTrigger;
pub use extraction::ExtractionTriggerContext;
pub use extraction::Extractor;
pub use extraction::ExtractorContext;
pub use extraction::IntervalTrigger;
pub use extraction::IntervalTriggerOptions;
pub use extraction::IntervalTriggerOptionsBuilder;
pub use extraction::InvocationTrigger;
pub use extraction::MemoryContentBlockType;
pub use extraction::MemoryMessageFilter;
pub use extraction::ModelExtractor;
pub use extraction::ModelExtractorOptions;
pub use extraction::ModelExtractorOptionsBuilder;

Modules§

extraction
Automatic memory extraction: triggers decide when a store’s unsaved messages are written, extractors decide how.

Structs§

AddMessagesContext
Context the manager passes to MemoryStore::add_messages with a batch (AddMessagesContext). Fields may be added without changing the method.
AggregateError
Several failures reported as one: the message names what failed and errors holds each cause.
MemoryAddOptions
Options for MemoryManager::add (MemoryAddOptions).
MemoryAddOptionsBuilder
Use builder syntax to set the inputs and finish with build().
MemoryAddToolConfig
Configuration of the add_memory tool (MemoryAddToolConfig).
MemoryAddToolConfigBuilder
Use builder syntax to set the inputs and finish with build().
MemoryEntry
One memory entry retrieved from or stored to a memory store (MemoryEntry).
MemoryFormat
Renders retrieved entries into the injected text (MemoryInjectionConfig.format); an error fails open. A custom format that emits markup does its own escaping.
MemoryInjectionConfig
Memory context injection (MemoryInjectionConfig): before a model call the manager searches memory and folds the top results into that call’s input only; they never enter the stored conversation or session.
MemoryInjectionConfigBuilder
Use builder syntax to set the inputs and finish with build().
MemoryManager
Cross-session memory for agents (MemoryManager): manages one or more MemoryStores and exposes the search_memory and add_memory tools, any tools the stores provide, memory injection before model calls and automatic extraction.
MemoryManagerConfig
Configuration for the MemoryManager (MemoryManagerConfig).
MemoryManagerConfigBuilder
Use builder syntax to set the inputs and finish with build().
MemoryQuery
Derives the injection search query from the conversation (MemoryInjectionConfig.query): Ok(None) or blank skips the call, an error fails open.
MemorySearchOptions
Options for MemoryManager::search (MemorySearchOptions).
MemorySearchOptionsBuilder
Use builder syntax to set the inputs and finish with build().
MemoryToolConfig
A custom name or description for a memory tool (MemoryToolConfig).
MemoryToolConfigBuilder
Use builder syntax to set the inputs and finish with build().
SearchOptions
Options for MemoryStore::search (SearchOptions).
SearchOptionsBuilder
Use builder syntax to set the inputs and finish with build().

Enums§

MemoryManagerSource
The memory manager an agent uses: an instance, or a config the agent builds one from.

Traits§

MemoryStore
A memory store backend (MemoryStore, with the declarative MemoryStoreConfig properties as methods).