One contribution of 16 to a discussion meeting issue 'Homology and convergence in nervous system evolution'. Centralized nervous systems (NSs) and complex brains are among the most important innovations in the history of life on our planet. In this context, two related questions have been formulated: How did complex NSs arise in evolution, and how many times did this occur? As a step towards finding an answer, we describe the NS of several representatives of the Xenacoelomorpha, a clade whose members show different degrees of NS complexity. This enigmatic clade is composed of three major taxa: acoels, nemertodermatids and xenoturbellids. Interestingly, while the xenoturbellids seem to have a rather 'simple' NS (a nerve net), members of the most derived group of acoel worms clearly have ganglionic brains. This interesting diversity of NS architectures (with different degrees of compaction) provides a unique system with which to address outstanding questions regarding the evolution of brains and centralized NSs. The recent sequencing of xenacoelomorph genomes gives us a privileged vantage point from which to analyse neural evolution, especially through the study of key gene families involved in neurogenesis and NS function, such as G protein-coupled receptors, helixloop-helix transcription factors and Wnts. We finish our manuscript proposing an adaptive scenario for the origin of centralized NSs (brains).