Peak power shaving is one of the important demand side management programs in the distribution systems. It can be achieved by shifting the demand and/or using the distributed energy storage systems (DESSs) which can be geographically located in the system equipped with the smart grid infrastructure for communication. In this paper, an agent-based distributed control (ABDC) scheme is proposed for real time peak power shaving using DESSs. In this control scheme, a distributed pinning consensus control scheme is developed to control and manage the power sharing among different batteries operated as agents while convergence in consensus is achieved. The medium voltage electricity consumption data of a practical distribution system is used to validate the effectiveness of proposed control scheme.