SpringAiChatHistoryProvider
A conversation text memory bridge between a Spring AI ChatMemoryRepository and a Koog ChatHistoryProvider.
This adapter targets repositories that persist only Spring AI messageType and text (e.g., JdbcChatMemoryRepository). It is not a lossless Koog persistence adapter — only plain-text conversational messages survive the round-trip.
Persistable message types (text-only)
Message.User (without attachments)
Message.Assistant (without attachments)
Silently dropped on store
The following Koog message types are non-persistable transport/runtime events and are filtered out before delegation to the underlying ChatMemoryRepository:
Any message carrying attachments (images, audio, video, files)
Silently skipped on load
Spring AI TOOL rows (e.g., from JDBC repositories that previously stored tool traffic) are skipped rather than causing an error, since they cannot be meaningfully mapped back to Koog messages.
Metadata fields such as timestamps, token counts, finish reasons, and custom metadata are not preserved through the round-trip.
Parameters
the Spring AI ChatMemoryRepository to delegate to
the CoroutineDispatcher used for blocking repository calls