We analyze the conditions for agency in natural and artificial systems. In the case of basic (natural) autonomous systems, self-construction and activity in the environment are two aspects of the same organization, the distinction between which is entirely conceptual: their sensorimotor activities are metabolic, realized according to the same principles and through the same material transformations as those typical of internal processes (such as energy transduction). The two aspects begin to be distinguishable in a particular evolutionary trend, related to the size increase of some groups of organisms whose adaptive abilities depend on motility. Here a specialized system develops, which, in the sensorimotor aspect, is decoupled from the metabolic basis, although it remains dependent on it in the self-constructive aspect. This decoupling reveals a complexification of the organization. In the last section of the article this approach to natural agency is used to analyze artificial systems by posing two problems: whether it is possible to artificially build an organization similar to the natural, and whether this notion of agency can be grounded on different organizing principles.