## 1 Introduction  
Computer-based aids demonstrated their effectiveness in helping users with individual study tasks in several cases [1, 2, 3]. Face tracking and other image analysis techniques were combined to understand students' reactions to different teaching methodologies in [4], eye gaze tracking technologies were recently used to assess student learning styles and personalize the content used for e-learning and remote lecturing [5], and the application of eye tracking to touchless exploration of graphical content was investigated in [6].  
In recent years, high-end technologies such as augmented and virtual reality [7] and natural language recognition applied to voice assistants and smart speakers [8] moved from research laboratories to the realms of mobile and consumer electronics and industrial applications (Industry 4.0) [9], thus providing powerful foundations for innovative and, in some cases, disruptive approaches to learning and training. However, some negative effects of the massive use of digital media were also identified [10]. In particular, younger students still need to learn to focus their attention on \"conventional\" cognitive tasks such as reading and solving mathematical and geometrical problems. As a consequence, in addition to enabling innovative approaches to learning, computer-based technologies should support activities that aim to develop and improve the \"conventional\" cognitive abilities of humans at any age.  
This article describes the \"The Fun They Had\" (TFTH) software platform (\"The Fun They Had\" is a short story written by [PERSON] [11] that describes a future world in which young students attend their individual school lectures at home and teachers are robots.) and a novel application named the Mobile Interactive Coaching Agent (MICA), aimed at helping the user improve his or her focus on a reading task. The application, built upon the TFTH platform, is especially designed for handheld devices such as tablets and e-book readers. The MICA exploits AI-based interaction technologies, such as face detection and recognition, head pose detection, eye gaze tracking, speech synthesis, and speech recognition, to estimate the degree of the user's attention on reading and provide adequate gestural and verbal feedback. Furthermore, due to the underlying TFTH platform, the MICA supports other functions that are typical of widely adopted smart speakers, such as natural speech understanding and the ability to connect to smart home software and network services by integrating some functional modules derived from the Red platform, described in [12].  
Although the Red and TFTH platforms share some properties and a modular architecture, they are very different systems. In fact, the Red platform was designed to support smart home applications, while TFTH has a different objective, that being mobile assistive and coaching applications and supporting the estimation of the cognitive state of the user, which is currently considered an important feature for future e-learning solutions [13]. Moreover, TFTH supports specific functionalities, such as head pose estimation and eye gaze estimation, which are not available on the Red platform.  
The main contributions of this work are the following:  
* We describe the modular software platform TFTH, which enables the visual observation of the user, the online analysis of the acquired data, the generation of different human-like gestural and spoken feedback, and the connection to other \"smart assistant\" services. The platform runs entirely on the device; that is, the processing needed to observe the user, analyze the data and produce the feedback is performed locally without accessing remote resources.
* We describe a coaching application, called the Mobile Interactive Coaching Agent (MICA), which leverages the services of the TFTH platform to monitor the user while reading text or attending to some other screen-based cognitive task and helps the user focus his or her attention on the task at hand.