← Shrivathsan Sakthisundaram

Stop 1 · the clinic

Filed 200+ faxes with an agent that refuses to guess.

Beacon HealthYC W26

Software Engineer Intern · Aug 2026 to present · Remote

Beacon Health, drawn as the clinic in the townBeacon Health, drawn as the clinic in the town

AI agents for primary-care admin work inside the EHR.

The problem
Clinic staff filed every incoming fax by hand, and the first screen-clicking agent guessed when it wasn't sure.
What I did
Rebuilt it as code-based tools with guardrails that match patients, block duplicates, and refuse to guess.
The result
200+ faxes filed in its first 2 weeks at about 80% lower estimated cost; now runs twice a day, 7 days a week.
faxes filed, first 2 weeks
200+faxes filed, first 2 weeks
lower est. cost per fax
~80%lower est. cost per fax
checkout success, live sessions
33% → 100%checkout success, live sessions

What I did

What I built at Beacon

Beacon Health (YC W26) · Software Engineer Intern · Aug 2026 to present

What happens when it breaks

Checkout agent · 33% → 100% of live-session runs

One real run, traced. Tap a step.

trace · fax_agent.run141s · ✓ filed
search_patients · second lookread tool+58s · 3s

Second Look: search by date of birth alone, re-read the name from the fax, and accept only if exactly one active chart fits.

strategy
DOB only, name re-read
result
matched: exactly 1 active chart
if ambiguous
never filed, left for staff
Tap a step. Sanitized, illustrative timings.

Case study · the fax agent

From a screen-clicking agent that guessed, to code-based tools that refuse to.

The problem

Clinic staff filed every incoming fax by hand: 10 to 15 a day, 89 waiting in the inbox on one October morning. Each one means reading it, finding the patient, picking the document type and title, checking it is not a duplicate, filing it, deleting the cover page, and sometimes messaging the right staff group.

v1, and why it broke

The first agent took screenshots, let the model decide where to click, and repeated. Two machines ran fixed slices of the inbox. It worked until it did not:

  • It guessed a date it could not read (21st or 31st), filed it under July instead of October, and a physician caught it.
  • It removed a required result tag because the EHR's description seemed to contradict the finding.
  • It could not see earlier runs, so re-sent faxes were filed twice.
  • Sessions expired about every 12 hours and runs stopped at the login page. One run crashed at fax 23 of 25 with no log.
  • About 12 minutes of run time per filed fax.

The redesign

The planner now calls typed tools that use the EHR's own web requests from inside the signed-in page. Nine tools at first, fourteen now. Reading is cheap and repeatable. Every write needs a permit issued for that run, and every write is read back.

BEFORE · COMPUTER USEscreenshotevery actionLLM picks a clickno memory of past runsmouse + keyboardon the EHR UItext logsometimes missingAFTER · CODE-BASED TOOLSschedule6am + 6pm, dailyplanner LLMdecides next callread toolsinbox · pages · chartscode guardrailsmatch · dupes · dateswrite toolslock → file → read backledger rowper fax8am daily reportno PHI

Guardrails, in code, not in the prompt

  • Patient match: file only when exactly one active chart matches last name, first name and date of birth. Fallbacks: a second look by DOB alone with the name re-read; name plus printed sex and age when no DOB is printed. Two matches means a human.
  • Duplicates: blocked on the same title, same type on the same date, same order number, home health plans within 14 days, or the same study within 7 days. A block lifts only after the run has read the existing report and named it as a different document.
  • Dates: the document date must fall within 12 months of the received date. Unclear dates are skipped, never estimated.
  • Locks: a page locked by staff is never overridden. Locks the run takes are the only ones it releases.

Coverage, from evidence

I read 2,514 rows of staff activity logs across 623 charts and built a table of each fax type, the document type and title staff actually use, and who gets messaged. The coverage proposal covered 30 of the 42 faxes staff were still filing by hand. The clinic approved it on October 15, moved the schedule to twice a day, seven days a week, and a physician's corrections became code rules the same week.

Cost, honestly

The real tradeoff is a step-heavy planner that re-sends a large prompt every step, plus occasional mistakes. A delete audit found 27 of 30 agent deletes correct. Deleted items stay recoverable, and deletes were turned off until two review findings are fixed. Mistakes get caught by a read-back after every write, a per-fax ledger, a daily audit report, and a side-by-side comparison before any delete.

computer use (v1)estimated from run time$5.45 to 6.65code-based tools (v2)measured from tokens + VM time$1.22 to 1.40phase 1 targetapproved Oct 18; first samples $0.20 to $0.37< $0.30

What's next

  • Phase 1 (approved): one call per fax, prompt cut from 46.8k to 9.9k characters. Target under an estimated $0.30 per fax.
  • Phase 2 (estimated target $0.05): no planner. Code loops the inbox, the model reads each page once and answers only judgment questions, and it must match a graded set of about 104 decided faxes field by field before it writes anything.