We propose a simple model of a social network based on the so-called knights-and-knaves puzzles. The model describes the formation of networks between two classes of agents where links are formed by agents introducing their neighbors to others of their own class. We show that if the proportion of knights and knaves is within a certain range, the network self-organizes to a perfectly bipartite state. However, if the excess of one of the two classes is greater than a threshold value, bipartiteness is not observed. We offer a detailed theoretical analysis of the behavior of the model, investigate its behavior in the thermodynamic limit and argue that it provides a simple example of a topology-driven model whose behavior is strongly reminiscent of first-order phase transitions far from equilibrium.