In the dynamic landscape of renewable energies, microgrid systems emerge as a promising avenue for fostering sustainable local energy generation. However, the effective management of energy resources holds the key to unlocking their full potential. This study assumes the task of creating a multi-objective optimization algorithm for microgrid energy management. At its core, the algorithm places a premium on seamlessly integrating renewable energy sources and orchestrating efficient storage coordination. Leveraging the prowess of a multi-agent system, it allocates and utilizes energy resources. Through the combination of renewable sources, storage mechanisms, and variable loads, the algorithm promotes energy efficiency and ensures a steady power supply. This transformative solution is underscored by the algorithm's remarkable performance in practical simulations and validations across diverse microgrid scenarios, offering a prevue into the future of sustainable energy utilization.