Development of a robotic system, which through the examination of the pupils, monitors students' attention levels during lectures and online lessons is being carried out by researchers.
It mimics the techniques human teachers use to hold their pupils' attention and promises to end dozing off during a boring class.
Tests have suggested that the robot can enhance how much students remember from their lessons.
Intelligent tutoring systems that use virtual teachers to interact with students could play a vital role in the growing field of online education.
The problem with online courses is that it is generally impossible to know if the student is concentrating and engaging with the lesson.
In contrast with virtual teachers, human teachers have a series of tricks for keeping their classes focused - changing the pitch or tone of their voice, for instance, or gesturing to stress on certain points and engage with their audience.
Bilge Mutlu and Dan Szafir at the University of Wisconsin-Madison wanted to find out whether a robot could use some of the same techniques to boost how much a student retains.
"We wanted to look at how learning happens in the real world," New Scientist quoted Mutlu as saying.
"What do human teachers do and how can we draw on that to build an educational robot that achieves something similar?"
The duo programmed a Wakamaru humanoid robot to tell students a story in a one-on-one situation and then tested them afterwards to determine how much did they remember.
EEG sensor was used to check the engagement levels by monitoring the FP1 area of the brain that manages learning and concentration.
When a considerable decrease in certain brain signals indicated that the student's attention level had fallen, the system sent a signal to the robot to set off a cue.
"We can't do it just at any given moment, we have to try and do it like human teachers do," said Mutlu.
The robot teacher first told a short story about the animals that constitute the Chinese zodiac, in an attempt to get a baseline EEG reading.
Then, the robot narrated a longer 10-minute story based on a little-known Japanese folk tale called My Lord Bag of Rice, which the student was unlikely to have heard before.
During this story, the robot raised its voice or used arm gestures to get back the student's concentration if the EEG levels dipped.
These comrised pointing at itself or towards the listener - or using its arms to point to a high mountain, for example.
Two other groups were tested but the robot either gave no cues, or scattered them arbitrarily throughout the storytelling.
Afterwards, the students were asked a few questions about the Chinese zodiac to distract them before being asked a string of questions pertaining to folk tale.
As per the team's expectations, the students who were given a cue by the robot when their attention was waning were much better at recalling the story than the other two groups, answering an average of 9 out of 14 questions correctly, as compared with just 6.3 when the robot gave no cues at all.
The idea of recapturing students' fading attention in this way would have "significant implications for the field of education", said Andrew Ng, director of Stanford University's Artificial Intelligence Lab in California and co-founder of online classroom Coursera.
"One-on-one tutoring has been repeatedly shown to give dramatic results in student learning, but the main problem with it is the cost, and that it's just difficult to scale.
"The vision of automatically measuring student engagement so as to build a more interactive teacher is very exciting," Ng added.