Swarms are electrical enemies who fire at you dropping your energy. To pacify them simply aim them and fire with
(same command to revive animals and trees).
1 successful hit is enough to pacify the swarm. Best idea is to move left/right to avoid energy missiles and fire between one attack and the next one.