The Mindful Agent