Sri Krishna says in the Bhagavad-Gita:
The Gunas of Prakriti [in the form of the body, the organs and the mind] perform all actions. With the understanding deluded by egoism, a person thinks, 'I am the doer.' But one with true insight into the domains of gunas and karma, knowing that the gunas as senses merely rest on the gunas as objects, does not become attached.