Apical organs are a well-known structure in almost all ciliated eumetazoan larvae, although their function is poorly known. A review of the literature indicates that this small ganglion is the "brain" of the early larva, and it seems probable that it represents the brain of the ancestral, holopelagic ancestor of all eumetazoans, the gastraea. This early brain is lost before or at metamorphosis in all groups. Protostomes (excluding phoronids and brachiopods) appear to have brains of dual origin. Their larvae develop a pair of cephalic ganglia at the episphere lateral to the apical organ, and these two ganglia become an important part of the adult brain. The episphere and the cerebral ganglia show Otx expression, whereas Hox gene expression has not been seen in this part of the brain. A ventral nervous system develops around the blastopore, which becomes divided into mouth and anus by fusion of the lateral blastopore lips. The circumblastoporal nerve ring becomes differentiated into a nerve ring around the mouth, becoming part of the adult brain, a pair of ventral nerve cords, in some cases differentiated into a chain of ganglia, and a ring around the anus. This part of the nervous system appears to be homologous with the oral nerve ring of cnidarians. This interpretation is supported by the expression of Hox genes around the cnidarian mouth and in the ventral nervous system of the protostomes. The development of phoronids, brachiopods, echinoderms, and enteropneusts does not lead to the formation of an episphere or to differentiation of cerebral ganglia. In general, a well-defined brain is lacking, and Hox genes are generally not expressed in the larval organs, although this has not been well studied.