Research has shown that mindfulness is an important cognitive skill that energizes other cognitive abilities such as attention control, retention, thinking and emotional regulation. Development of mindfulness involves training the mind to apply attention to the present moment in a non-judgmental manner. In this context, we identify attention as the primary characteristic of mindfulness among other cognitive features. The utility of training attention is evident in real life situations such as listening to others, driving a car, conducting a medical surgical procedure, and so forth. The major hindrance to the cultivation of attention is the inability to instantaneously catch the moment at which the mind drifts away from the object of attention. Therefore, we argue that devising a method for detecting the moment at which the attention is distracted would be bene icial to the cultivation of attention. We have conducted research to develop a software framework that can model attention pertaining to a particular task and give an alert when attention is distracted. The framework has been designed to capture attention-related Electroencephalography (EEG) brain wave signals in response to a speci ic task and to train an Arti icial Neural Network (ANN). The trained ANN can be used to receive EEG signals during a task, and to determine the attentiveness of an individual. Accordingly, a vibration alert is sent to a mobile phone of an individual to serve as a signal for the person to re-focus attention. The framework has been used to model attention during a lecture, and an experiment was conducted to assess attentiveness of students. The experimental results determined that 75% of students were able to maintain the attention during a lecture and vibration alert has been effectively supportive to regain the attention. Hence, we conclude that our software framework can be used to model regaining of attention in a session that requires the focused attention.