A demand response management (DRM) system is proposed here, in which a service provider determines a mutual optimal solution for the utility and the customers in a microgrid setting. Such a system may find use with a service provider interacting with the respective customers and utilities under the existence of some DRM agreements. The service provider is an entity which acts at different levels of the electrical grid and carry out the optimization. The lowest level controls one “neighborhood” while higher levels of service providers control other lower level service providers. A microgrid consisting of a smart neighborhood of 12 customers was used as experimental case study and an advanced metering infrastructure (AMI) was implemented. Based on the formulation of an optimization problem which exploits priceresponsive demand flexibility and the AMI infrastructure, a winwin-win strategy is presented. The interior-point method was used to solve the objective function and the application of particle swarm optimization and artificial immune systems for demand response were explored. Results for a range of typical scenarios were presented to demonstrate the effectiveness of the proposed demand– response management framework.