tramai-memory-store
Version: 0.6.0
Status: Internal — not published to Maven Central
Role: Durable ChatMemoryStore implementations (JdbcChatMemoryStore, RedisChatMemoryStore).
Availability
tramai-memory-store is not a published artifact in 0.6.0. It carries the module catalogue classification maturity: internal, publishability: internal — there is no dev.tramai:tramai-memory-store coordinate to declare, and the page documents the capability rather than a consumer dependency.
If you need persistent conversation history in your own application, implement the published dev.tramai.core.memory.ChatMemoryStore SPI against your own storage and plug it into PersistentChatMemory (see tramai-memory).
Purpose
The module holds the durable stores TramAI uses when conversation history must outlive the JVM:
JdbcChatMemoryStore(dataSource, table, objectMapper, clockMillis)— conversation history in a relational table; the application supplies theDataSourceand creates the table (JdbcChatMemoryTabledescribes the columns)RedisChatMemoryStore(jedisPool, keyPrefix, objectMapper)— conversation history in Redis
Both implement the SPI from tramai-core:
interface ChatMemoryStore {
fun getMessages(conversationId: String): List<Message>
fun appendMessages(conversationId: String, messages: List<Message>)
fun deleteConversation(conversationId: String)
fun listConversations(limit: Int, offset: Int): List<String>
}
Conversation identifiers must be non-blank; implementations throw IllegalArgumentException otherwise.
How it is used inside the repository
PersistentChatMemory(store, cache) reads through the supplied store and writes through to it, with an optional in-memory cache in front. The repo's own worker and platform integrations wire the JDBC store this way; consumer applications are expected to follow the same pattern with their own store implementation.
