Power systems worldwide are complex and challenging environments. The increasing necessity for an adequate integration of renewable energy sources is resulting in a rising complexity in power systems operation. Multi-agent based simulation platforms have proven to be a good option to study the several issues related to these systems. In a smaller scale, a home energy management system would be effective for the both sides of the network. It can reduce the electricity costs of the demand side, and it can assist to relieve the grid congestion in peak times. This paper represents a domestic energy management system as part of a multi-agent system that models the smart home energy system. Our proposed system consists of energy management and predictor systems. This way, homes are able to transact with the local electricity market according to the energy flexibility that is provided by the electric vehicle, and it can manage produced electrical energy of the photovoltaic system inside of the home. Index Terms—Smart home, energy management system, multiagent system, optimization problem.