Learn to Memorize: Optimizing LLM-based Agents with Adaptive Memory Framework — arXiv2