Humans have always dreamed of better, fitter, longer-lasting bodies. But while many science-fiction fantasies, from videophones to self-driving cars, have been realised, health technology has lagged behind our hopes. Artificial organs and smart pills have been a long time coming.

There are a number of reasons for this. Biology is an order of magnitude more complicated than other forms of engineering. And it is hard to innovate in health, as there are many rules to protect us from products that might otherwise kill us. The pill or device that promises a longer life needs to prove that it actually works before it can be sold. The price of patient safety is sluggish innovation. Yet, despite these obstacles, there are signs that a digital revolution in health care is imminent. It will be more personalised, and potentially more useful, than anything the world has seen before. It promises to help us manage our health and inform us about the risks ahead.

Large investments have been driving this change. Last year, equity funding to private digital-health startups grew for the seventh consecutive year and reached $6.1bn. A good proportion of that sum has been directed towards products that target consumers via their mobile phones. The early offerings were apps that would help people find doctors and schedule appointments; but, more recently, apps such as Teladoc in America, Babylon Health in Britain and Min Doktor in Sweden have started to offer access directly to qualified doctors or therapists on a mobile phone.

The most sought-after services are for sexual health and women’s health. Women, unsurprisingly, want repeat prescriptions for contraceptives without having to take the morning off to visit the doctor. But the number of people using remote medicine for other reasons is growing at a fair clip. Kaiser Permanente, a large health-care organisation in America, says that, for the first time in 2016, more than half of the interactions between patients and their doctors were virtual (by video-conference or text messages).

Britain’s Babylon Health, based in Kensington in London, is particularly ambitious. At its offices, fake greenery and flowering plants proliferate in a largely unsuccessful attempt to evoke the Hanging Gardens of Babylon. Its app answers medical queries, provides access to doctors and offers users a dashboard of their health stats drawn from the phone or supplemental devices. These data can be supplemented with results from at-home blood-testing kits that one can order via the app. These take readings of liver and kidney function, vitamin levels, bone density and cholesterol. I tried the thyroid test and drew blood with a special device that punches a tiny hole with surprisingly little pain. Then I posted the sample to Babylon. The results (all OK) popped up in the app a day later. If Babylon recommends an appointment with a doctor, it can provide one via video-conferencing almost immediately for £25 ($32). As with many other doctor-on-demand services, it is possible to share notes, or even a video from a consultation, with your regular doctor.

One of the most exciting aspects of digital health is the capacity of mobile phones to gather information as well as deliver it. They can collect data from their own sensors and screens, as well as associated devices such as watches, headbands and the growing constellation of add-ons. Increasingly, such devices are clinically validated and medically useful. Last year the US Food and Drug Administration (FDA) approved 36 connected health apps and devices. Sensimed has produced a smart contact lens that helps physicians track the progression of glaucoma in patients. Quell, which can be controlled with your smartphone, is a wearable leg band that uses nerve stimulation to treat chronic pain. Wing, a connected spirometer (a device you breathe into that measures lung function), helps asthmatics to manage their condition. Remarkably there are now portable devices that measure electrical activity in the heart and brain, and even take pictures of your insides with an ultrasound.

Propeller Health, a firm based in Madison, Wisconsin, illustrates the rapid progress some companies are making. The firm invented a sensor and associated app that attaches to an asthma inhaler. In 2010, it began to help patients with asthma and emphysema keep track of their medication. Today the app can also give patients insight into factors that might be triggering symptoms, such as high humidity or a change of environment. It also has approval from the FDA to use SMS messages or in-app notifications to help patients stick to their prescriptions and thereby pre-empt attacks.

Stefan Biesdorf, an expert in digital health at McKinsey, says that connected apps such as mySugr, a diabetes monitor, are able to assist patients in managing their diabetes more effectively, as well as to help scientists learn more about the disease itself. Collecting evidence from users can be incredibly valuable. With only a week’s worth of data in 2015, mySugr was able to demonstrate the odd effects that particular foods had on blood-sugar levels. Pizza, unexpectedly, caused blood sugar to peak four to five hours after consumption. Ultimately this app, and others like it, should be able to predict when those who live with diabetes are likely to need to take action to manage their condition.

In this way, the moderately useful app of today could eventually become a life-saver. For example, clip-on infant monitoring devices – which allow parents to track a baby’s heart rate and oxygen on their phone – might conceivably pick up evidence that would enable doctors to prevent cot deaths.

The commercial promise is so large that Google, Amazon and Apple have all been testing the waters of digital health. Amazon’s virtual assistant Alexa looks promising as a channel for diagnosis and advice for patients. Apple seems to be interested in enabling its wristwatch to monitor glucose levels. Google, through its life-sciences arm Verily, is developing both a glucose-monitoring contact lens and a watch designed to gather health-related data.

Babylon, though a mere whipper-snapper by contrast, has equally big dreams. Ali Parsa, its boss, says that today anyone using the app is “triaged” by an artificial intelligence (AI) that can answer basic queries. The chatbot contains clinically driven algorithms which are able to decide whether the complaint is serious and requires human intervention, or whether an answer can be provided from its database of health information. This approach is being tested on patients within part of Britain’s National Health Service.

Ultimately Parsa wants the AI to diagnose many of the conditions that can normally be solved by a GP. Other companies, such as IBM and Your.md are also trying to use AI in this way. Parsa says the work they are doing is like IBM’s attempts to beat Gary Kasparov, the world’s best chess player, 20 years ago. “It is not done, until it is done,” he says. In other words, its AI will be a failure until the moment of success, which could come, he claims, as soon as this year.

The drive to create an AI doctor is simple. It would allow patients around the world much greater access to medical assistance. There is a global shortage of 7.2m health-care workers, a figure that will almost double by 2035. It takes only one AI doctor capable of diagnosing even a handful of common conditions to make this shortage less of a problem. Digital diagnosis can be scaled far more rapidly than doctors can be trained. The world’s first AI doctor will be asking you to say “aaah” sooner than you think.