How Nanonets bypassed API limitations to automate Revenue Cycle Management on any EHR, reducing AI costs by 90%.
At a Glance
- Customer: Nanonets (Shikhar Khanna, Founding Engineer)
- Industry: Healthcare / AI Automation
- The Win: Went from "impossible" to a working POC in 24 hours.
- The Metric: 80-90% reduction in LLM costs while running thousands of reliable workflows daily.
The Mission: Meeting Hospitals Where They Are
Nanonets is transforming Revenue Cycle Management (RCM) by automating document processing and note scribing. To reduce the administrative burden on healthcare providers, Nanonets operates with a simple philosophy: don't ask hospitals to change their software.
Instead, Nanonets integrates directly into existing Electronic Health Records (EHR) systems—including legacy platforms like eClinicalWorks (eCW), ModMed, and AdvancedMD.
The Challenge: The API Gap
While Nanonets’ AI models were powerful, accessing the data was a bottleneck. Most mid-to-large-scale hospitals run on highly customized legacy EHRs that do not provide APIs.
This created a disjointed workflow where doctors had to manually copy notes between software, or Nanonets simply couldn't fetch the patient details required for RCM.
"Before Optexity, we were literally leaving revenue on the table. We had to turn down hospitals because their EHRs didn't have APIs. We tried negotiating with providers for access, but that takes months."
— Shikhar Khanna, Founding Engineer @ Nanonets
Why Existing Solutions Failed
Before finding Optexity, the Nanonets engineering team attempted to build in-house browser automation using tools like Browserbase, Skyvern, and Browser Use. These solutions relied heavily on pure LLM agents, leading to three critical failures:
1. "Brittle" Reliability & Hallucinations
Pure LLM agents lacked context. They would hallucinate on simple tasks, make wrong decisions, or fail completely after just a few steps.
"We couldn’t get past step 5 in complex EHRs. Most of our time was spent tweaking prompts rather than building features."
2. Prohibitive Latency
Because every action required an LLM inference, workflows were agonizingly slow.
- Example: One automation ran for 7 minutes, with 1.5 minutes spent just on logging in. Even then, success wasn't guaranteed.
3. Unscalable Build Time
Tools like Browserbase required writing extensive code to handle exceptions and logging. It was impossible to scale these bespoke integrations across dozens of different hospital environments.
The Solution: Optexity’s Deterministic Engine
Nanonets turned to Optexity to handle the browser automation layer. The game-changer was Optexity’s ability to combine AI decision-making with deterministic reliability.
Instead of asking an LLM to "guess" how to click a button every single time, Optexity allowed Nanonets to record the workflow once. The platform then "locks in" the repetitive steps (login, navigation, form filling) and only summons the LLM for complex cognitive tasks.
The Implementation Timeline
- Day 0: Recorded the task on the EHR; Optexity handled the processing logic
- Day 1: Achieved a working POC
- Day 7: Deployed live, client-approved automation on Optexity’s managed infrastructure.
"With Optexity, we went from 'impossible' to a working POC in one day. We can now integrate with any EHR, and because Optexity converts steps to be deterministic, we’re saving 80-90% on LLM costs."
Why Developers Love Optexity
Shikhar highlights three reasons why Optexity succeeded where others failed
- Developer-First Schema: "Instead of just writing a prompt and hoping for the best, Optexity gives us full control. We define the automation schema like Python code. It feels logical and makes debugging easy—we know exactly why a step failed."
- Real-Time Speed: "Applications like patient scheduling require real-time execution. Because Optexity pre-builds deterministic steps, we can run automations instantly—something pure LLM agents couldn't handle."
- Production Trust: "Optexity’s team supported us like an enterprise partner. It’s easier to trust the automation because the steps are deterministic. We are now expanding to handle authentication, claims, and verification without a human ever touching the screen."


