A perspective in the Journal of the Royal Society Interface argues that advances in AI, sensing technologies and modeling are transforming the study of collective animal behavior, with implications reaching far beyond biology, from robotics to the dynamics of human crowds.