This paper presents the implementation of distributed energy resource management in smart grid operation. The approach utilizes the advantages of using multi agent systems for profitable operation of a smart grid in the energy market. The trading strategy adopted for the continuous double auction is a profit-maximizing adaptive bidding strategy based on risk and competitive equilibrium price prediction. The auctioneer manages the usage of distributed energy resources by receiving bids from buyers and asks from sellers. An artificial immune system based algorithm is applied on a typical study case network to optimize the generation assuming realistic market prices for power and distributed generators bids reflecting realistic operational costs. Simulation results clearly indicate that the agent based management is effective in coordinating the various distributed energy resources economically and profitably.