Reducing the cost of energy leads to reduction in resident's comfort. Therefore, it is necessary to consider both reduction in cost and resident's dissatisfaction. Smart buildings include different systems such as communication system (CS), sensing system (SS), grid data collecting system (GDCS), building energy management system (BEMS), hybrid system (HS), temporary service systems (TSS) and permanent service systems (PSS). Considering the aforementioned systems, an agent-based model for energy management of smart buildings is presented in this work to reduce the energy cost as well as the resident's dissatisfaction.