In this paper, a distributed extremum seeking control technique is proposed to solve a class of real-time optimization problems over a network of dynamic agents with unknown dynamics. Each dynamic agent measures a cost that is shared over a network. A dynamic average consensus approach is used to provide each agent with an estimate of the total network cost. Each agent contributes to the optimization of the total cost, in a cooperative fashion, under the action of an extremum seeking controller associated with each agent. The extremum seeking control technique is based on a proportionalintegral approach that avoids the explicit need for timescale separation. A dynamic network simulation is treated to demonstrate the effectiveness of the technique.