From Experience to Strategy: Empowering LLM Agents with Trainable Graph Memory