Platyhelminthes
Being aware of its environment is not very important, because it does not need to search for food or be aware of potential predators. However, the brain and peripheral nerve network of free-living flatworms represent the most primitive nervous systems currently under investigation. It consists of a small but well-defined brain and numerous peripheral motoneurones connected by longitudinal nerve cords and transverse commissures. So to answer your answer your question, this nervous system enables flatworms to perceive environmental changes and to respond to internal and external stimuli.