With the increase in global energy consumption, the demand-side management (DSM) system has grown into an important research topic because of its ability to reduce the total electricity cost and peak-to-average ratio (PAR) by rescheduling loads. Besides, the large amount of sensor data in the home area network (HAN) helps to record the energy demand and achieve the DSM capacity, and the machine learning skills such as reinforcement learning can be applied to solve the DSM problem. However, determining a suitable energy management strategy is complicated because the user behaviors are uncertain. In this study, a real-time multi-agent DSM system based on HAN was proposed to find a suitable control policy for reducing the energy cost in a smart home. This system integrated the Deep Q-Network (DQN) agents that adaptively learn the preference of appliance usage to control different types of appliances and energy storage system. The simulation results show that the proposed DSM system reduced peak value, PAR value, and electricity cost by 28.9%, 20.9%, and 28.6% respectively. This system can also be applied to REDD dataset and achieved 74.9% cost reduction.