Buildings consume 74% of the total electricity produced in the United States. A significant portion of the building electric load includes heating ventilation and air-conditioning (HVAC) systems and water heating (WH) systems. Enabling flexibility in the operations can improve overall electric grid efficiency. This paper describes a multi-agent system for supporting integration, learning, optimization, and control of HVAC and WH in supporting a future smart grid. The architecture supports a transactive-based negotiation strategy between homeowners and a microgrid controller to adjust consumption behavior and reduce electricity costs. The framework is deployed in a neighborhood and preliminary testing is underway. The agent architecture design is discussed along with the preliminary optimization results from the demonstration site.