Recent research has proposed a set of advanced Energy Management System (EMS) for microgrids, including Model Predictive Control (MPC), Mixed-Integer Linear Programming (MILP), decentralized methods like droop control, as well as metaheuristics such as ACO (Ant Colony. Recent research has proposed a set of advanced Energy Management System (EMS) for microgrids, including Model Predictive Control (MPC), Mixed-Integer Linear Programming (MILP), decentralized methods like droop control, as well as metaheuristics such as ACO (Ant Colony. This article proposes an Energy Management System (EMS) for smart microgrids with a decentralized multi-agent system (MAS) based on a bio-inspired T-Cell optimization algorithm. The proposed system allows real-time control and dynamic balancing of loads while addressing the challenges of. Solar photovoltaic microgrids are reliable and eficient systems without the need for energy storage. However, dur-ing power outages, the generated solar power cannot be used by consumers, which is one of the major limitations of conventional solar microgrids. This results in power disruption. This paper presents a unique test environment in which a hardware-based microgrid environment is physically coupled with a large-scale real-time simulation framework. The setup combines the advantages of developing new solutions using hardware-based experiments and evaluating the impact on. This research project, conducted jointly by the Provincial Electricity Authority (PEA) and the Asian Institute of Technology (AIT), developed an AI-Based Smart Microgrid Platform System aimed at increasing the stability and efficiency of electricity generation and distribution.