Scientists have created artificial cells that mimic biological cells by responding to a chemical change in their surroundings.