The agent turns a blood test into a personal diet and workout plan. Now rules make the decisions and AI only writes.
Aditya Kumar, Founding Software Engineer. I built it alone, including the quality checks and stress tests.
Labs we partner with offer the agent to patients after their blood test.
A lab with 100 patients a day would have paid ₹2.19 lakh a month in AI fees. Now it pays ₹36,600, or ₹14,100 with the cheaper model.
That made each plan cost ₹73, and running it twice for the same patient could give two different plans.
Even a cheaper AI can give the same patient two different plans. Rules give the same answer every time, and I can test them. The rules are tested on 505 sample questionnaires.
With rules setting the numbers, the meal plan no longer needed the biggest model. I ran the cheaper GLM 5.2 model on 100 patients at $0.054 a plan (under ₹5). In a separate check, a second AI compared its plans with the top model's plans for the same patients (the “LLM as a judge” method), and they matched.
The server makes two PDFs at a time on purpose. When many patients arrive at once, they wait a few extra minutes and nothing breaks.
I ran a stress test on a copy of our live server, a small machine with two processors. 100 test patients sent their forms in the same minute.
plans an hour, at full speed
Once it is busy, the server finishes about 13 plans every minute. 100 patients in one minute is as many as a typical small lab sees in a whole day.
The first plans arrived after 6.8 minutes and the last after 14.1. The server never used more than about a ninth of its memory.
How many patients different labs see in a day, next to how many plans one server can make in a 12 hour day.
India has more than 1.3 lakh diagnostic labs, and most of them are small, single labs. Bigger chains need more servers: the largest national chain would need about nine.
I move the decisions into code, keep AI for the writing and use the smallest model that keeps the quality.
I turn the decisions into rules, so the same input gets the same answer, and test them on real cases before release.
I stress test it and add a waiting line, so a rush slows things down instead of breaking them.
I built this agent alone, from the first prompt to the plan on a patient's phone, tests included.
Aditya KumarFounding Software Engineer
Built with Python, FastAPI, Gemini on Vertex AI (Google Cloud), MongoDB, Playwright, the WhatsApp Cloud API and Claude Code.
Book a call →