install

open override fun install(config: AgentMemory.Config, pipeline: AIAgentPipeline)(source)

Installs the AgentMemory feature in an agent.

This method sets up the memory feature with the provided configuration, creating an AgentMemory instance that integrates with the agent's pipeline.

Example usage:

val agent = AIAgents(
strategy = myStrategy,
promptExecutor = myExecutor
) {
// Install memory feature with custom configuration
install(AgentMemory) {
// Configure memory provider (required)
memoryProvider = LocalFileMemoryProvider(
config = LocalMemoryConfig("my-agent-memory"),
storage = SimpleStorage(JVMFileSystemProvider),
root = Path("memory/data")
)

// Configure scope names (optional)
featureName = "bank-assistant"
productName = "my-bank"
organizationName = "my-company"
}
}

Parameters

config

The configuration for the memory feature

pipeline

The agent pipeline to install the feature into