This paper presents an intelligent agency (set of agents) to harmonize the local demand and on-site energy resources. Demand Response is one such resource that has a significant potential in managing the distribution systems with large number of intermittent sources of energy. Demand response is a load management strategy to flatten the system load curve by motivating the customers to adjust their elastic loads in accordance with the price signals or operator's request. In this work, the elastic loads are classified into three categories viz. shiftable, curtailable and adjustable loads. The proposed agency organizes a double auction energy market where the local generators, storage systems and loads trade with each other. Besides administering energy auction, the agency executes demand response programs by using an aggregator model. The applicability of the agency model is validated using a case study system and the results of the simulation study show that the model can successfully utilise the flexibility of the elastic loads to lower the mismatch between generation and load while meeting the comfort criteria declared by the owner.