We propose an algorithm for creating stable, ordered, swarms of active robotic agents arranged in any given pattern. The strategy involves suppressing a class of fluctuations known as "nonaffine" displacements, viz., those involving nonlinear deformations of a reference pattern, while all (or most) affine deformations are allowed. We show that this can be achieved using precisely calculated, fluctuating, thrust forces associated with a vanishing average power input. A surprising outcome of our study is that once the structure of the swarm is maintained at steady state, the statistics of the underlying flow field is determined solely from the statistics of the forces needed to stabilize the swarm.