The smart grid concept is key to the energy revolution that has been taking place in recent years. Smart Grids have been present in energy research since their emergence. However, the scarcity of data from different energy sources, hardware power, or co-simulation environments has hindered their development. With advances in multi-agent-based systems, the possibility of simulating the behavior of different energy sources, combining real building consumption, and simulated data, storage batteries and vehicle charging points, has opened up. This development has resulted in much research published using both simulated and physical data. All these investigations show that the main problem is that the machine learning algorithms do not fully match the real behavior, it is complex to use them to replicate the different actions to be performed. This paper aims to combine the approach of behavior prediction with state-of-the-art techniques, such as deep learning and deep reinforcement learning, to simulate unknown or critical system scenarios. A very important element in smart grids is the possibility of maintaining consumption within specific ranges (flexibility). For this purpose, we have made use of Tensorflow libraries that predict energy consumption and deep reinforment learning to select the optimal actions to be performed in our system. The developed platform is flexible enough to include new technologies such as smart batteries, electric vehicles, etc., and it is oriented to real-time operation, being applied in an on-going real project such as the European ebalance-plus project.