Wireless Sensor Network (WSN) has encapsulated the major attention from the research group owing to its potential features as well as some of its unsolved issues. From the various issues, an energy issue is particularly found to be a root cause of majority of the problems. In the past, there are various research attempts to enhance the network lifetime of WSN, but very few of the studies has proved fruitful. Moreover performing optimization of energy from routing as well as load-balancing perspectives are not witnessed any standard research attempts. Hence, this paper discusses about a framework that uses standard radio and energy model and performs energy optimization by introducing a novel routing agent. The routing agent is incorporated within aggregator node and base station to perform dynamic reconfiguration in case of energy depletion. Compared with standard LEACH algorithm, the proposed technique has better energy efficiency within optimal data aggregation duration.