A family of subsets of [n] is r-wise agreeing if for any r sets from the family there is an element x that is either contained in all or contained in none of the r sets. The study of such families is motivated by questions in discrete optimization. In this paper, we determine the size of the largest non-trivial r-wise agreeing family. This can be seen as a generalization of the classical Brace-Daykin theorem.