We are new to chickens but have been raising parrots for ages. Bug sprays will kill our birds so we were desperate to find something safe around our feathered kids. We found a spray called Camicide. We can sometimes purchase it at feed stores, but it can be found online, it is also available at our local bird store.
It is safe around birds, apparently it can even be sprayed on birds without any harm. It is not safe around snakes though. Once applied across a threshold, ants don't cross for a good week. It is expensive, but does wonders for the ant problem.
The Delightful Dozen's run and coop are ant free and they have just eradicated the ants nearest their coop - love it! No spray needed around my DDozen! They are the bomb!