When the energy of the products is higher than the energy of the reactants then it means the reaction is endothermic. In the graph it can be seen as having a higher energy at the end than the initial energy. If the opposite is observed then the reaction is exothermic.