In this paper, we study phase transitions for weakly interacting multiagent systems. By investigating the linear response of a system composed of a finite number of agents, we are able to probe the emergence in the thermodynamic limit of a singular behavior of the susceptibility. We find clear evidence of the loss of analyticity due to a pole crossing the real axis of frequencies. Such behavior has a degree of universality, as it does not depend on either the applied forcing or on the considered observable. We present results relevant for both equilibrium and nonequilibrium phase transitions by studying the Desai-Zwanzig and Bonilla-Casado-Morillo models.