Machines powered by artificial intelligence (AI) increasingly mediate our social, cultural, economic, and political interactions. Understanding the behavior of AI systems is essential to our ability to control their actions, reap their benefits, and minimize their harms. We argue this necessitates a broad scientific research agenda to study machine behavior that incorporates but expands beyond the discipline of computer science and requires insights from across the sciences. Here we first outline a set of questions fundamental to this emerging field. We then explore the technical, legal, and institutional constraints facing the study of machine behavior.