Not all will need regulatory clearance, and some are already being used or tested in patients with heart problems, stroke, H.I.V., diabetes and other conditions.
Because digital tools require effort, like using an app or wearing a patch, some experts said they might be most welcomed by older people who want help remembering to take pills and by people taking finite courses of medication, especially for illnesses like tuberculosis, in which nurses often observe patients taking medicine.
The technology could potentially be used to monitor whether post-surgical patients took too much opioid medication or clinical trial participants correctly took drugs being tested.
Insurers might eventually give patients incentives to use them, like discounts on copayments, said Dr. Eric Topol, director of Scripps Translational Science Institute, adding that ethical issues could arise if the technology was "so much incentivized that it's almost is like coercion."
Another controversial use might be requiring digital medicine as a condition for parole or releasing patients committed to psychiatric facilities.
Abilify is an arguably unusual choice for the first sensor-embedded medicine. It is prescribed to people with schizophrenia, bipolar disorder and, in conjunction with an antidepressant, major depressive disorder.
Many patients with these conditions do not take medication regularly, often with severe consequences. But symptoms of schizophrenia and related disorders can include paranoia and delusions, so some doctors and patients wonder how widely digital Abilify will be accepted.
"Many of those patients don't take meds because they don't like side effects, or don't think they have an illness, or because they become paranoid about the doctor or the doctor's intentions," said Dr. Paul Appelbaum, director of law, ethics and psychiatry at Columbia University's psychiatry department.
"A system that will monitor their behavior and send signals out of their body and notify their doctor?" he added. "You would think that, whether in psychiatry or general medicine, drugs for almost any other condition would be a better place to start than a drug for schizophrenia."
The newly approved pill, called Abilify MyCite, is a collaboration between Abilify's manufacturer, Otsuka, and Proteus Digital Health, a California company that created the sensor.
The sensor, containing copper, magnesium and silicon (safe ingredients found in foods), generates an electrical signal when splashed by stomach fluid, like a potato battery, said Andrew Thompson, Proteus's president and chief executive.
After several minutes, the signal is detected by a Band-Aid-like patch that must be worn on the left rib cage and replaced after seven days, said Andrew Wright, Otsuka America's vice president for digital medicine.
The patch sends the date and time of pill ingestion and the patient's activity level via Bluetooth to a cellphone app. The app allows patients to add their mood and the hours they have rested, then transmits the information to a database that physicians and others who have patients' permission can access.
Otsuka has not determined a price for Abilify MyCite, which will be rolled out next year, first to a limited number of health plans, Mr. Wright said. The price, and whether digital pills improve adherence, will greatly affect how widely they are used.
Questions about the technology's ability to increasecompliance remain.
Dr. Jeffrey Lieberman, chairman of psychiatry at Columbia University and NewYork-Presbyterian Hospital, said many psychiatrists would likely want to try digital Abilify, especially for patients who just experienced their first psychotic episode and are at risk of stopping medication after feeling better.
But he noted it has only been approved to track doses, and has not yet been shown to improve adherence.
"Is it going to lead to people having fewer relapses, not having unnecessary hospital readmissions, being able to improve their vocational and social life?" he asked.
He added, "There's an irony in it being given to people with mental disorders than can include delusions. It's like a biomedical Big Brother."
Abilify, a widely used drug, went off patent recently, and while other companies can sell the generic form, aripiprazole, Otsuka, has exclusive rights to embed it with Proteus's sensor, said Robert McQuade, Otsuka's executive vice president and chief strategic officer.
"It's not intended for all patients with schizophrenia, major depressive disorder and bipolar," he added. "The physician has to be confident the patient can actually manage the system."
Dr. McQuade said, "We don't have any data currently to say it will improve adherence," but will likely study that after sales begin.
Proteus has spent years bringing its sensor to commercial use, raising about $400 million from investors, including Novartis and Medtronic, Mr. Thompson said.
Until now, the sensor could not be embedded in pills, but pharmacies could be commissioned to place it in a capsule along with another medication.
In 2016, the encapsulated sensor started being used outside of clinical trials, but commercial use is still limited, Mr. Thompson said.
Nine health systems in six states have begun prescribing it with medications for conditions including hypertension and hepatitis C, the company said, adding that it has been found to improve adherence in patients with uncontrolled hypertension and others.
AiCure, a smartphone-based visual recognition system in which patients document taking medicine, has had success with tuberculosis patientstreated by the Los Angeles County Health Department and is working with similar patients in Illinois, said Adam Hanina, AiCure's chief executive.
He said AiCure has shown promising results with other conditions, including in schizophrenia patients whose pill-taking would otherwise require direct observation.
A Florida company, etectRx, makes another ingestible sensor, the ID-Cap, which has been or is being tested with opioids, H.I.V. medication and other drugs.
Made of magnesium and silver chloride, it is encapsulated with pills and avoids using a patch because it generates "a low-power radio signal that can be picked up by a little antenna that's somewhere near you," said Harry Travis, etectRx's president, who said the company plans to seek F.D.A. clearance next year.
The signal is detected by a reader worn around the neck, but etectRx aims to fit readers into watchbands or cellphone cases.
"I get questions all the time, 'Hey is the government going to use this, and can you track me?'" said Eric Buffkin, an etectRx senior vice president. "Frankly, there is a creepiness factor of this whole idea of medicine tracking.
"The thing I tell them first and foremost is there's nothing to reach out of this technology to pry your mouth open and make you take a pill. If you are fundamentally opposed to this idea of sharing the information, then say, 'No thank you.'"
Seeking to address concerns about privacy and coercion, Otsuka officials contracted with several bioethicists. Among them, I. Glenn Cohen, a Harvard law professor, said safeguards adopted include allowing patients to instantly stop physicians and others from seeing some or all of their data.
Asked whether it might be used in circumstances like probation or involuntary hospitalization, Otsuka officials said that was not their intention or expectation, partly because Abilify MyCite only works if patients want to use the patch and app.
How patients will view Abilify MyCite is unclear. Tommy, 50, of Queens, N.Y., who takes Abilify for schizoaffective disorder, participated in a clinical trial for digital Abilify.
Tommy, who withheld his last name to protect his privacy, encountered minor issues, saying the patch was "a little bit uncomfortable" and once gave him a rash.
A compliant patient, Tommy said he does not need monitoring. "I haven't had paranoid thoughts for a long time — it's not like I believe they're beaming space aliens," he said. If offered digital Abilify, he said, "I wouldn't do it again."
But the method might appeal to patients who want to prove their compliance, build trust with their psychiatrist, or who feel "paranoid about getting accused of not taking their medicine."
Steve Colori, 31, of Danvers, Mass., who wrote a memoir about his illness, "Experiencing and Overcoming Schizoaffective Disorder," said he took Abilify years ago for symptoms including believing,"I was a messiah."
Although he sometimes stopped taking medication, he would consider digital pills "overbearing and I think it stymies someone and halts progress in therapy."
William Jiang, 44, a writer in Manhattan with schizophrenia, took Abilify for 16 years. He said he steadfastly takes medication to prevent recurrence of episodes of paranoia when "I was convinced everybody was trying to murder me."
He said some noncompliant patients might take digital Abilify, especially to avoid Abilify injections recommended to patients who skip pills.
"I would not want an electrical signal coming out of my body strong enough so my doctor can read it," Mr. Jiang said.
"But right now, it's either you take your pills when you're unsupervised, or you get a shot in the butt. Who wants to get shot in the butt?"