Learn-by-interact: A Data-Centric Framework for Self-Adaptive Agents in Realistic Environments