Micro-grids are the key technologies known to solve challenges such as increased electric demand, fatigue electric installations, electrical leakage and pressures and opposition from environmental advocacy groups. The current article is presenting an improved optimization algorithm based on a differential evolution algorithm to achieve the optimal response for managing distributed energy resources in micro-grids. The simulation results show that: 1) The final cost of network management in systems based on the agent is very favorable compared to a network regardless of the agent and also are economically much more useful and effective in coordinating various energy sources. 2) The results of the proposed algorithm are much better in comparison with the results of the Fireflies optimization algorithm, a differential evolution algorithm and the particle swarm algorithm. This comparison proves the high performance of the algorithm.