Agency refers not to the intentions people have in doing things but to their capability of doing those things in the first place. The concept is associated with freedom, autonomy, free will, action, and creativity.
While often framed as an individual quality, i.e. personal agency, agency is typically a social mechanism and a social outcome. For example, having the agency to cycle across town depends on someone having invented bicycles, others manufacturing them, the availability of safe roads, etc. (See structuration theory.)
Agency is dissimilar from control. Control is turning the light off. When another person is affected by the light being turned off, the situation is about agency not control, i.e. the opportunity to negotiate with the other person over if or when the light should be turned off.