The global warming and the increase of fossil fuel prices make the minimization of energy generation an important objective. Thus, smart grids are becoming more and more relevant in a context where we want to regulate the demand according to the available energy. This regulation can be operated thanks to Demand Side Management (DSM) tools. While different models and architectures have been developed for smart grids, only few papers used holonic architectures. For this, we propose in this paper a holonic architecture for smart grids. This type of architectures is relevant to smart grids as it allow the various actors in the grids to work even in the cases of technical problems. Holons in the proposed model are composed of five interconnecting agents that ensure flexibility on the various aspects. This model has been tested and has proven to work on 3 different scenarios. The first scenario simulates a grid in its healthy state. The second one simulates a grid where a region can be disconnected from a blackout for example. The third one simulates a grid with production mismanagement. Results show how the grid distributes the available energy depending on the available production, priorities (if any) and the assurance of the distribution across the various requesting holons.