We introduce a model of mutually attracting agents in an arbitrary network, for which the long term behavior results in the emergence of several clusters. The cluster structure is independent of the initial condition and is characterized by a set of inequalities in the parameters of the model. With varying coupling strength, transitions between different cluster structures may take place. We illustrate the relation with the Kuramoto model on interconnected oscillators and we discuss an application on opinion formation.