ChatMemory
A feature that allows storing and loading conversation history between an agent and a user.
ChatMemory enables agents to persist and retrieve past conversations, allowing for continuity across multiple agent sessions.
Example usage:
val agent = AIAgent(...) {
installChatMemory {
chatHistoryProvider = MyChatHistoryProvider()
}
}Content copied to clipboard
Example with a sliding window to limit the number of stored messages:
val agent = AIAgent(...) {
installChatMemory {
chatHistoryProvider = MyChatHistoryProvider()
windowSize(20) // keep only the last 20 messages
}
}Content copied to clipboard
Types
Link copied to clipboard
object Feature : AIAgentGraphFeature<ChatMemoryConfig, ChatMemory> , AIAgentFunctionalFeature<ChatMemoryConfig, ChatMemory> , AIAgentPlannerFeature<ChatMemoryConfig, ChatMemory>
Companion object implementing agent feature, handling ChatMemory creation and installation.