Whether some entity has agency isn't an inherent property of that entity. It's a property of how some observer reasons about that entity's interaction with its environment.