Imaging behavior and neural activity over long time scales without immobilization of the animal is a prerequisite to understand behavior. Agarose microfluidic chambers imaging (AMI) can be used to image neural activity and behavior for all life stages of Caenorhabditis elegans.