Memory store abstraction, token-budgeted retrieval, and LLM-powered compaction