Abstract data types (ADTs) represent the core for any software application, and a proper use of them is an essential requirement for developing a robust and efficient system. Moreover, a proper instantiation of a data structure that implements an abstract data type can greatly impact the performance of the system. In this paper we propose a learning approach for the dynamic configuration of data structures instances in a software system. In order to adapt a data structure to the system's current execution context, a neural network will be used and an agent based system is proposed. We experimentally evaluate our system on a case study, emphasizing the advantages of the proposed approach.