Inside the Loop, Issue 25 | Daniel C. Pettus | 12 October 2026
Ami, Take One
I took Ai MedAgent home: a first pass at a consumer version on an iPhone, written with help using AI in a week with tools already on my Mac. It ran. Apple’s Health app humbled it. The part that matters was never built. Take two is coming, and so is a bigger step in critical care.
Readers of the last few issues know Ai MedAgent as a critical care idea: a reasoning layer that watches a running infusion (an IV drug being pumped into a patient) against the order, the labs and the patient’s own trend, and speaks to the nurse only when something changes. This issue is about what happened when I tried to take that idea home, to the kitchen table, where most medicine actually gets taken.
Short version: I built a first pass, it ran on a phone, and it taught me more in a week than the concept paper did in a month. It is not finished and it is not dead. It is on the bench. One housekeeping note before we start: every number, every medicine and every device you see in this article belongs to a simulated patient.
First, the part I keep underselling
A few readers have told me, kindly, that they never picked up from earlier issues that AI is the backbone of all of this. That is my fault, and I am done being shy about it. AI is the only reason Ai MedAgent exists at all. The concept is mine and so is the judgment, but the thing that reads a running infusion, the labs, the order and the public library at the same time and reasons over them in real time is a large language model, the kind of AI behind the chat assistants most people have now tried, and nothing I built in a career of building devices could do that. The code that turns the method into working software was written by an AI, with me describing what it had to do and arguing with it until it did. The public data in the next few sections is read by an AI. The question Ami writes for your doctor is the kind of sentence only a reasoning model can write from your own records. Take the AI out and what is left is a slide deck and a retired engineer. I built things for a career and none of them could reason. This can. That is the whole story, and I should have said it in the first issue.
Why bother, and where the idea came from
The obvious reason first. An ICU patient has a nurse, a pharmacist and a monitor watching every drop. The rest of us have a pill organizer and good intentions. The chemistry is the same; the oversight is not. If reasoning over data helps at the bedside, it ought to help at the breakfast table.
The less obvious reason is in the photograph below. In the late 1990s, at iMetrikus, we built AirWatch, a hand-held lung monitor for people with asthma. You blew into it, it showed your reading and the percentage of your own best, and it kept a seven-day grid in green, yellow and red. It sent the readings down a phone line, and your doctor got a report by fax and internet [1]. And when you hit a hundred percent, a small character on the screen put on a crown. All the hard work was hidden behind that face. That is the design inspiration for Ami, thirty years on: one face, one honest verdict, and the machinery out of sight.

AirWatch also taught me the second half of the idea. Around 2001, at the same company, I used the Unified Medical Language System for the first time. The UMLS is the National Library of Medicine’s metathesaurus, a dictionary of dictionaries begun in 1986, a single key that ties together more than a hundred medical vocabularies so that a drug, a lab or a diagnosis means the same thing no matter which system wrote it down [2]. It was, and is, free. It was also enormous. We loaded it off a stack of CDs. Making it useful to a consumer and a clinician at the same time took a room full of programmers, a complicated database integration that broke every time a vocabulary was reissued, and a large and redundant server farm that hummed in a locked room and cost more than the people. That was my first use of public data to add to what a patient and a doctor knew, and it was a brute-force achievement.

The drawing above is mine, dated June 2002, version three, for the hosting center at AboveNet in San Diego where all of this ran. It is worth a minute, because it is what a connected health application cost to deploy then, and the concept was exactly the one in this article: acquire data from providers and from consumers, normalize it with the UMLS, reason over it, and hand the knowledge back to the person and the clinician over the internet. Read it left to right. Two banks of modems, 192 of them on eight telephone trunk lines, because the devices in people’s homes phoned in. Two redundant firewalls and two load balancers at the front door. Two application servers, each with two processors and four gigabytes of memory, which was a lot. A Citrix gateway so clinicians could reach the system from their offices, and separate FTP and email servers behind their own firewalls. Then the two database engines on the right: one for transactions, one for analytics, each with its own disk array, both carrying the UMLS. Four protected zones, a monitoring system we called Big Brother, and a locked cage in somebody else’s building. By my count, sixteen servers and two disk arrays, before the people who kept them alive.

Nearly every piece of that room has since been replaced. The second drawing shows the same deployment today. The modem racks are gone because the Health app already holds what the devices used to phone in. The application servers are the phone in your pocket. The two database engines are the Health app on one side and the National Library of Medicine’s own servers on the other, which now serve RxNorm and the UMLS to anyone who asks. The firewalls, the Citrix gateway, the FTP and email servers and Big Brother are all Apple’s problem, which is what the App Store is. The programmers are mostly replaced by AI coding, with one person describing the work. The analytics engine is a few cloud functions, small programs that run on rented computers only when called and cost nothing when idle. The brittle integration is a weekly download of RxNorm, the Library’s dictionary of drug names, and a question put to the same public services, read by a reasoning model, an AI that can work through a problem rather than just look up an answer, and that does not care which vocabulary a word came from [3]. The problem that took a building in 2001 fits in a weekend in 2026. That is not a small change. It is the whole reason a retired engineer can try this at all.
Meet Ami
Ami is the home version. One face, one sentence, every morning. Most days the face is quiet and the sentence says nothing changed, which is the point: a smoke detector that chirps every day gets its battery pulled. On the day something does change, the face changes, the sentence says what, and a button offers the one question worth asking your doctor, already written, with the source underneath it. You read it, copy it into your patient portal, the website or app your doctor’s office gives you for messages and results, and send it. Ami never sends anything itself.
Underneath, it reads what the phone already holds. Since 2018 an iPhone has been able to carry your hospital’s records inside the Health app, in FHIR (pronounced “fire”), the standard format hospitals now use to pass a patient’s records between systems, and UC San Diego Health was among the first twelve systems to connect [4]. A ring or a watch writes sleep and heart rate into the same place. Ami reads from there, on the phone, and keeps nothing on a server, because it has no server. There is not a line of network code in it.
And a ruler, because I have spent enough years near FDA to respect the fence. Ami never says a medicine caused anything, never suggests a dose or a time, and never uses a diagnostic threshold. It reads, compares, and asks.
The other lens
The data from your doctors and your devices is wonderful. It is also only half the picture, and the half most people never see is free, because your tax dollars already paid for it. Sitting on public servers right now, maintained by the National Library of Medicine, FDA, CDC and CMS, is a very rich set of health information that looks at your medicines and your conditions from a different lens: not what your chart says about you, but what the world knows about the things in your chart.
For scale. PubMed, the Library’s index of medical research, holds more than forty million citations [5]. ClinicalTrials.gov, the public registry of medical studies, lists close to half a million of them [6]. MedlinePlus, the Library’s plain-language service, covers more than a thousand conditions and fifteen hundred medicines, and in one recent year 418 million people used it [7]. DailyMed carries the current FDA prescribing information for the drugs on the US market, the same label your pharmacist reads [8]. RxNorm is refreshed every week [3]. FDA publishes its recalls and its drug shortages as open data feeds, CMS publishes what Medicare drug plans cover and what pharmacies actually pay for each drug, and CDC publishes the adult vaccine schedule [9]. None of it is behind a paywall. None of it knows your name.
The problem was never that this library did not exist. The problem, for an ICU patient and for a person at the kitchen table alike, has been the three steps in front of it: how to get at it, how to normalize it so a drug on your list matches a drug in the library, and how to reason over what comes back. In 2001 that took the room I just described. It now costs pennies. A real-time question from a reasoning model into these data marts (large public collections of data built to be searched), organizing what returns and reasoning over the findings against one person’s list, runs for a few cents on the larger models and a fraction of a cent on the smaller ones, at the published rates [10]. That is the secret sauce, whether the person is on a ventilator or at the kitchen table. It is also the thread through my patent filings: the five provisional applications behind Ai MedAgent all rest on the same invention, a reasoning model working over these public data marts joined to a person’s own data, in an ICU bed or at a kitchen table. The critical care model looks more complex, and in many ways it is, but the data exists and it is already flowing. The home market is less controlled, not less rich. The theory is to put the same reasoning power in both rooms.
A small fee and a name problem
I had never built an iPhone app. The entry fee is a modest annual registration as an Apple Developer, plus an identity check that rejected my passport and then my driver’s license before I worked out why: my Apple account said Dan and my documents say Daniel. Apple is strict about who you are. Change the name, pass the check, pay the fee. One afternoon.
The tools were the easy part. Xcode, Apple’s own programming environment, is a free download that runs natively on the Mac, and the language, Swift, is Apple’s too. The app is seven files, written the way I described in Issue 24: I said what the thing had to do, the machine wrote the code, and I argued with it until it did the right thing [11]. The first build failed with seven errors because a library that used to come along for free no longer does. One line fixed it. The first run on the phone produced a popup that said Unable to Verify App, which cleared after I deleted the app, restarted the phone and ran it again from the cable. Welcome to iOS development, everyone said.
Why Apple, and not Android? Two reasons, one small and one that matters. The small one: my office is an Apple shop, a Mac Studio, a few Mac Pros and the laptops, so the tools were already on the desk. The one that matters is privacy and security for a first launch. An iPhone app ships as compiled, signed machine code, which is hard to take apart, while most Android apps ship as an intermediate form that free tools can turn back into readable source in minutes [12]. The Health app’s data sits in Apple’s most protected storage class and is end-to-end encrypted when it syncs [13]. None of that makes Android impossible; a private and secure Android version can be built and will be. It means that for take one, Apple’s stricter architecture gives me the simplest honest sentence about privacy, and the simplest sentence is the one a consumer will believe.
Then it ran, on a real phone, reading a ring, a watch and a clinic’s records through the Health app, with no server anywhere. The tools were built in and easy. Getting it right for a consumer, as you are about to see, is not.

The first morning
The first thing the test run reported was a nineteen-hour night. Nobody sleeps nineteen hours. A Health app on an ordinary phone holds sleep from a ring, a watch and the phone itself, and in a household that shares one Apple account to keep purchases simple, from a second person’s watch as well. Ami had added them all up. That is a real lesson about home data and it took three fixes: read one source per night and merge the overlaps; let the person switch off a device that is not theirs; and show, under a gear icon, exactly what Ami can see and where each piece came from. I had designed Ami on the assumption that a phone holds one person’s data. Many phones do not.
The second thing it reported was every prescription the connected clinic had ever written, going back years. Accurate, and useless, until it was sorted into what the person takes now and what they took once, with a switch on each row in case Ami guessed wrong. The hospital version of Ai MedAgent never has this problem; a pharmacist reconciled the list before the first dose. At home, the list is the problem.
Then I opened Apple’s own Health app to check my work, and that is where the story turns.
Apple already built the floor
Since iOS 16 in 2022 the Health app has had a Medications feature. You point the camera at the bottle, it reads the label, you set the schedule, it reminds you on your watch, logs each dose, and flags interactions, including with alcohol [14]. Alongside that sit the hospital records I mentioned, every lab and every prescription, nicely laid out. Put the first pass of Ami next to it and Ami is a subset with a friendlier face. A consumer would open the two side by side and reasonably ask why they needed the second one. I asked myself the same question and did not like my answer. Add the market: the App Store carried 2,172,472 apps last year [15].
That is the honest result of take one. Not that the idea is wrong, but that the floor is higher than it was, Apple owns it, and anything worth building has to start above it. The other lens is above it. The first pass never got there.
A consumer is not an ICU patient
My issue with Ami was never whether I could finish the development. It is that the consumer is not the same person as the patient in the ICU, in what they perceive as valuable and in what they will tolerate on a phone screen. The nurse wants everything; the consumer wants nothing, until the one morning she wants exactly one thing.
I may also have made an early developer’s mistake. I wrote up the concept and asked a few people I trust to read it. They were generous with their time, and their responses were what I would call predictable: privacy, security, too many apps already, and too invasive. Those are fair instincts. They are also, for Ami specifically, backwards, and the fault is mine for not showing it. So let me show it now, against the things already in most homes.

The video doorbell sends what it sees to the company’s servers, and in 2023 the Federal Trade Commission found that employees and contractors had been able to watch customers’ videos without their knowledge [16]. A home alarm installer’s technician pleaded guilty in 2021 to using his access to watch inside about two hundred customers’ homes [17]. The golf app on many phones records every spot its owner stood, ties it to a name, an email and a phone number, and by its own App Store privacy label uses that data to track its owner across other companies’ apps [18]. The receipt-rewards app pays you in points because brands pay it for what you bought [19]. Each of those is a product people like and keep, and I am not telling anyone to delete them. I am pointing out that none of them is private, and nobody calls them invasive.
Ami shares nothing about you with any outside source. As built, there is not a line of network code in it. When the other lens is added, the one thing that will leave the phone is a question about medicines and conditions, de-identified, meaning stripped of anything that says who you are: no name, no account, no contacts and no identifier attached, sent to the public library and to a reasoning model that keeps nothing. The reasoning is over the medicines, not over you. If I ever ship Ami, saying that clearly and first is the job, and I plainly did not do it the first time. Maybe I should also have waited until it was buttoned up in my own eyes before asking. I am no Steve Jobs, but when he was asked about the difficulty of designing products by focus group he said that a lot of times people don’t know what they want until you show it to them [20]. Not sure. But maybe.
I have been here before. Around 2000, iMetrikus launched MyHealthChannel, a free consumer website for people with chronic conditions, with a personal health journal and information tailored to the person’s own history [21]. We later had a Yahoo partnership behind it, discounts included, as I recall. Consumers were hard to win over then, even when the technology was useful, and nothing I saw this month suggests that has changed. Been here before. Never give up.
Why the hospital version is different
Walk back into the ICU and every one of the home problems disappears. The data is already flowing: the pump, the monitor, the lab system, the order. The list is reconciled. The user is a nurse who is paid to look and a pharmacist who is paid to care. The moment is now, because the drug is running now. Nobody installs anything and nobody has to be persuaded that a second app is worth having, because there is no app. There is a quiet layer that reasons over what is already there and speaks when something changes. Better therapy, in real time, by reasoning instead of reacting: that is the case Ai MedAgent was built to make, and the home experiment made it sharper, not weaker.

On regulation, since it is easy to blame for a pause: most of the public-data layer sits inside FDA’s fence. The agency’s January 2026 wellness guidance and its software policy leave room for medication tracking, for drug interaction information written for patients, and for preventive reminders from established authorities [22][23]. What sits outside the fence is the sentence I most wanted to write: your heart rate plus your beta blocker (a common heart and blood pressure medicine) suggests. That one is a medical device, and it should be. The boundary is real, and the next pass will be built with it in view, not against it.
Now what
Ai MedAgent for critical care is my primary focus and it keeps moving. The next enhancement is what I am calling Smart Formulary and Smart Orders: using AI to read the hospital’s own drug library (its approved list of drugs, concentrations and dose limits, loaded into every pump), the pharmacy order and the pump’s limits together, before the first drop, so that the order the pharmacist verifies is an order the pump can actually run, and so that the gap between them is caught by a reasoning model instead of by a nurse at two in the morning. The method is in my fourth provisional patent application, the first filing that holds a date while the full application is prepared. Announcements to follow.
Ami will see improvements too. It has a way to go, and I did not give take one enough runway before judging it. The goal has not changed: a non-invasive butler that watches, quietly, for the health-related things your own records and the public library could tell you about, and speaks only when one of them touches your life. It will be a challenge in the consumer market. I have been here before, and the technology has never been better. Never give up.
Questions, and a promise
Questions, and I promise to read every answer.
Answers, arguments and better ideas go to aimedagent.net/contact. Pick “something else” in the first box and I will know what it is about. More to come.
About me
Daniel Pettus spent forty years in medical device and health IT leadership at Alaris, CareFusion and BD, was a founding member of the iMetrikus team, and contributed to IHE Patient Care Device interoperability standards. He is co-inventor on US patent 7,375,647 and has filed five provisional applications on the reasoning method behind Ai MedAgent™. He writes Inside the Loop from Murrieta, California.
The serious version of the day job is a book. The Technology Was Never the Problem: forty years of trying to connect medical devices to the record, and what finally changed. pettusbook.com.
Ai MedAgent™ is a research demonstration of a patent-pending method. Advisory only. Not a medical device. Not FDA cleared. Synthetic patients and simulated feeds. See it at aimedagent.net. Ami is an unreleased experiment and is not available to download.
Footnotes on request: https://aimedagent.net/contact


