MemoryManagerConfig

org.llm4s.agent.memory.MemoryManagerConfig
See theMemoryManagerConfig companion object
final case class MemoryManagerConfig

Configuration for memory manager behavior.

A plain value built in code; this module reads no configuration file. Build one with MemoryManagerConfig(...) (every option has a default) or a preset, and change it with the with* setters; there is no public constructor or copy, so the type can gain options without breaking callers. Every option is read by the managers that extend the shared record/retrieve operations (SimpleMemoryManager and LLMMemoryManager).

Value parameters

autoExtractEntities

When true, recordMessage (and so recordConversation) also runs extractEntities over the content of each user and assistant message it records, passing the conversation id. System and tool messages are not analysed. Extraction is best-effort: if it fails, the message stays recorded and the failure is logged as a warning. A cancellation is not a failure: it is returned, so the caller stops. SimpleMemoryManager extracts nothing, so the option only changes what LLMMemoryManager stores (one extra LLM call per message).

consolidationConfig

How consolidateMemories groups memories and handles errors

contextTokenBudget

Token budget getRelevantContext uses when the call passes no maxTokens. An explicit maxTokens always wins.

defaultImportance

Importance score given to memories recorded without one

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Set whether recordMessage also extracts entities from user and assistant messages.

Set whether recordMessage also extracts entities from user and assistant messages.

Attributes

Set how consolidateMemories groups memories and handles errors.

Set how consolidateMemories groups memories and handles errors.

Attributes

Set the token budget getRelevantContext uses when the call passes no maxTokens.

Set the token budget getRelevantContext uses when the call passes no maxTokens.

Attributes

def withDefaultImportance(importance: Double): MemoryManagerConfig

Set the importance given to memories recorded without one.

Set the importance given to memories recorded without one.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product