Skip to content

[Task] Adopt spring-ai-session for conversation memory and compaction #75

Description

@arefbehboudi

Problem

MessageWindowChatMemory only drops the oldest messages. Channel conversations grow without bound, and once past the context window we truncate from the front — breaking tool-call sequences mid-flight, with no summarization and no token awareness.

Also, FileSystemChatMemoryRepository stores a flat List per channel: no per-message identity, no timestamps, so nothing can later ask "what happened here since yesterday?"

Proposal

Replace MessageWindowChatMemory + MessageChatMemoryAdvisor with spring-ai-session — an event-sourced session layer with turn-aware compaction (SlidingWindow, TurnWindow, TokenCount, RecursiveSummarization strategies; TurnCount/TokenCount/Composite triggers), plus SessionEventTools, EventFilter, and TTL-based retention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions