Using Agentic AI to Collect Pharmacy Stock Information
In this blog
Choosing the right AI project
A big part of what I do today during this AI surge is helping companies determine where AI can be successfully deployed in an enterprise setting. There are many factors that contribute to answering this question, beyond just "can AI do it?" These include the required data, costs, security and solution maintenance. Choosing the right problems to solve with AI is crucial to a project's overall success.
About the Pharmacy Stock Checker
To illustrate a common and compelling use case, we built a sample application inspired by a real challenge in healthcare: clinics often spend significant time tracking down which pharmacy has the medications they are prescribing in stock. They want to direct their patients to where to pick up their medications, but they can't always be certain these pharmacies have them available. According to our own healthcare experts at WWT, this is a significant issue across the industry.
"Prescription delays were never just an administrative nuisance—they were a constant drain on time, attention and trust. When a medication couldn't be filled because it was out of stock, restricted by a PBM, or tied up in a retail pharmacy supply issue, the work didn't disappear. It bounced back to the clinic in the form of patient calls, inbox messages, pharmacy faxes and urgent interruptions between visits. Front- and back-office staff spent hours tracking down alternatives or clarifying status, and when those pathways broke down, it ultimately landed back on the clinician to re-prescribe, reconsider therapy or intervene directly. None of that work made patients healthier, yet it fractured already limited clinical time.
What's striking is how much of this burden is driven by manual, reactive workflows that were never designed for today's level of supply chain volatility. Every shortage or formulary change triggers a cascade of human effort across roles, often requiring the same steps to be repeated with different people. From a clinical standpoint, the cost isn't just wasted time—it's delayed care, rushed decision-making and growing burnout. This is why prescription management is such a compelling use case for AI. Done well, it's not about replacing people; it's about absorbing the constant noise created by supply disruptions so clinicians and staff can focus on decisions that actually require human judgment."
How we built it
The use case was an excellent fit for AI, but we knew it would require weaving together several cloud services in order to make it work. We designed a conceptual workflow for this sample application as follows:
- The clinic would input the phone numbers of local pharmacies they wished to query. These would be saved for future use.
- When a prescription was issued, the clinic would enter the prescription name and dosage. They would then select the pharmacies they wanted to call and hit the Call button.
- The AI would automatically call the pharmacies, conduct a conversation with them, asking if the medication was in stock. (During this time, the clinician would be free to work on other tasks.)
- The AI would collect the answer and end the call. It would then update a web-based dashboard indicating whether that pharmacy had the medication.
- The clinician would consult the dashboard and inform the patient where their medication was available.
Given these guidelines, we decided to use the Google Gemini Live API to handle the application's voice components. It would initiate the phone call, listen for the answer, and record it into the dashboard. We utilized Google Gemini Code Assist to construct a base framework for the web app. When you use AI for initial app development, the most critical component is laying out in detail the app's purpose and all the features you want it to include. This gives you a strong base to work from to tweak the application through manual or AI-driven updates.
We brought the code into Google Antigravity (our IDE) and prepared for deployment. However, even with our specific guidelines, additional code corrections were needed. These revolved around the WebSocket connection between Gemini and Twilio (our platform for making the outbound call). While AI did an excellent job creating the plumbing of the application, it was vital for our team to understand the underlying code in order to make specific changes to bring the application online.
For hosting, we utilized Google Cloud Run, which integrates seamlessly with Antigravity. Using the IDE's console, we pushed updates (via containers) directly to Cloud Run. This abstracted away much of the complexity of container hosting, giving us scalability without the management overhead.
With the application online, we went through a phase of user acceptance testing and made further adjustments to refine the app. The simple workflow established earlier allowed changes to be made extremely quickly and reduced the time between feedback and application updates.
The result
By choosing the right problem for AI to address and scoping the solution to a specific outcome, we delivered the application with extremely fast time-to-value. The project's end result was a simple, highly effective AI application designed to check pharmacy supplies. In a real-world deployment, this type of solution would save clinicians time and resources during the workday and meaningfully improve patient care.
Conclusion
WWT builds AI healthcare solutions like this for customers around the globe. World Wide Technology's healthcare practice partners with health systems, life sciences organizations and payers to modernize clinical, operational and digital foundations across the full technology lifecycle. Combining deep clinical expertise—including MD and PhD advisors—with advanced engineering, WWT helps healthcare organizations design and scale solutions across AI and data, digital experience, cloud infrastructure, cybersecurity and interoperability. Our approach is grounded in real-world care delivery, enabling organizations to move from strategy to execution while improving patient and clinician experience, strengthening resilience and accelerating innovation at enterprise scale.
In this scenario, our expertise across both the technical components of cloud and AI and our experience in the healthcare vertical enabled the project's success. We believe it's vital to have experts on both these fronts to deliver impactful enterprise solutions in today's market. The extraordinary pace of technological change will likely continue, and our culture of innovation keeps our customers on the cutting edge, delivering AI solutions with real business outcomes.