In adult life, people normally know what they are doing. This experience of controlling one's own actions and, through them, the course of events in the outside world is called 'sense of agency'. It forms a central feature of human experience; however, the brain mechanisms that produce the sense of agency have only recently begun to be investigated systematically. This recent progress has been driven by the development of better measures of the experience of agency, improved design of cognitive and behavioural experiments, and a growing understanding of the brain circuits that generate this distinctive but elusive experience. The sense of agency is a mental and neural state of cardinal importance in human civilization, because it is frequently altered in psychopathology and because it underpins the concept of responsibility in human societies.