Scientists are working on computers with the ability to boost our brain function when they notice us getting tired, and the technology could eventually be used to tailor our user experience depending on how stressed or how worn-out we're feeling.

It works via a technique called functional near infrared spectroscopy, or fNIRS. Two sensors on the scalp beam a harmless red light into the skull. This red light analyses the amount of blood vessels in the brain, and from this it can determine the levels of oxygen present at any given moment. High oxygen levels mean the brain is working hard, and low levels mean it's basically cruising along on autopilot.

The system has already been used with a Google Glass app that holds back notifications if the brain is already busy on other tasks. But now a research team from Tufts University wants to go further, perhaps even boosting the brain's cognitive state when it appears to be flagging.

This part of the process is called transcranial direct current stimulation (tDCS), and involves one milliamp of electric current being pushed through the brain via electrodes fixed to the head. The tDCS process has already been used to treat depression, stroke, and tinnitus, and the researchers think it could be used to help us interact with our devices.

"We want to just crank [brain activity] up for a minute or two and then crank it down," lead researcher Rob Jacob told New Scientist. "We're looking for this very fine-grained control… We're looking to measure you with fNIRS and, based on what we measure, slowly tweak this. It's a sort of two-way communication with the brain."

One of the first tests of the system could involve users piloting a squadron of virtual drones: when it senses the operator's concentration starting to dip, a small boost of neuron activity could be applied. The technology is still at its early stages - other research suggests that the technique might not work for everyone and some tDCS results have been inconsistent - but the system can be improved and refined over time.

"I think of the human and the computer as two powerful information processors connected by a narrow channel," says Jacob. "Our goal is to improve the bandwidth between the two."

The system has to be carefully calibrated to each individual - a lengthy process which is one of the barriers that needs to be overcome before something like this can be delivered to the masses. On the plus side, it's cheap and simple to set up: this isn't something you need a degree in biology or thousands of dollars to make.

It may take some time before our tech gadgets can respond to fluctuations in our brain activity, but in the not-too-distant future our computers may know us better than ever - and could even be boosting our cognitive capabilities when we need it.