This project aims to transform how individuals and communities participate in electricity exchange by introducing an advanced artificial intelligence (AI) framework. As distributed energy resources become more prevalent, consumers increasingly act as “prosumers” who both generate and consume electricity. Furthermore, new entities such as aggregators are emerging to represent groups of prosumers in the energy trades. These evolutions turn traditional distribution systems into dynamic, decentralized networks that support local, peer-to-peer energy trading, which is a core concept of transactive energy. However, modeling these entities in energy trades is challenging due to the nonlinear characteristics of the distribution networks, as well as the uncertainty in the states of the system, driven by environmental conditions and the diverse behavior of market participants. The intellectual merit of this project includes: (1) development of an AI-driven framework that determines the model for aggregators, learns optimal bidding and trading strategies for the participants, and adapts to the evolving system conditions; (2) proposed domain adaptation to efficiently transfer knowledge between problem setups, such as simulated and real-world environments or different conditions and market participant behaviors; (3) introduction of explainable deep reinforcement learning using an innovative “attention map” mechanism to visualize learned knowledge and effectively incorporate human feedback