Karika 30
yugapaccatuṣṭayasya tu vr̥ttiḥ kramaśaśca tasya nirdiṣṭā। dr̥ṣṭē tathāpyadr̥ṣṭē trayasya tatpūrvikā vr̥ttiḥ ॥30॥
The mental acts (vr̥ttiḥ) are produced by the simultaneous functioning of the four (intellect, ego, mind, and senses) directed by what are sensed and not sensed, influenced by the three qualities based on previous mental acts (vr̥ttiḥ).
Sensed + Not sensed + three qualities based on previous mental acts = current mental acts
Agents involved: intellect, ego, mind, and senses.