Today, most energy-intensive processes have a high degree of optimization. However, in some of these processes large amounts of energy are inevitably released due to the way in which this energy is used. One of the most obvious examples is produced in the power plants during the process of obtaining electrical energy through the transformation of some kind of energy (chemical, kinetic, thermal, lighting, and nuclear or solar energy, among others). This released energy can be used in other processes that may need it so that no additional energy is needed. One of the possible uses of this energy is its use in greenhouses. Greenhouses need large amounts of energy to recreate the climatic conditions that crops need, which are not those of the weather station. To take advantage of the energy released from the power stations in greenhouses, a system based on agents has been developed that manages energy and allows it to be reused. This paper explains how the system allows us to reuse energy by a power plant and how the agents that integrate the system by means of communication with sensors and actuators and the use of data analysis algorithms allow us to use this energy in greenhouses, providing a reduction of the energy they need without the system. The system has been tested in several greenhouses with a pepper crop.