Stable flocking of mobile agents. I. Fixed topology