class RailsAiAdmin::Assistant::Retention

Deletes conversations that received no message for older_than (config.assistant_retention): the chat, its turns, messages, tool calls, queued messages and chat files. RubyLLM’s usage ledger rows are kept, without the chat and message ids, as the record of what was spent. A chat with an active turn, or with usage inside the budget window, is kept so a running turn and the current day’s spend are never lost. Review Surfaces belong to rails_tool_views and follow its own purge lifecycle.