A technique called optogenetics is being used in the laboratory to observe and control what brain circuits are doing in real time.