Skip to content
2nd Place | Work & Productivity

Pulse

An AI teammate that listens during cardiac arrest and holds the state the team leader is juggling: rhythm, shocks, drug timings, hands-off time. Deterministic engine, no LLM in the clinical loop.

Core trick

A deterministic state machine advances CPR clock, shock count, and drug timers from transcribed phrases, keeping the LLM out of the clinical loop.

Tags

Built with

codexfastapigpt-5.5gpt-5.6groqnext.jsopenaiplaywrightpydanticpytestpythonreacttailwindcsstypescriptuvuvicornwhisper

Description

Inspiration I'm a cardiologist. During a cardiac arrest, the team leader is tracking rhythm, shock count, drug timings, how long compressions have been paused and which cycle we're on — all at once, in their head, while people are shouting. The tools we have record what happened. None of them understand what's happening. I wanted the thing that doesn't get tired and doesn't lose count. What it does Pulse listens to the room during a cardiac arrest and maintains clinical state. Spoken phrases become evidence. Evidence becomes clinical events. A deterministic state machine advances from those events, and the dashboard shows the team leader what's true right now and what's due next: CPR clock and cycle number, started by the words "CPR started" Rhythm and pathway — say "rhythm is VF" and it moves to the shockable branch itself Shock count, and a hands-off timer that starts climbing after every shock and keeps climbing until compressions come back Medication timeline with ACLS timing, so it surfaces "Also due: consider amiodarone" after the third shock before anyone asks A full audit trail; every accepted event can be undone It handles the way people actually speak, including the code-switched Egyptian Arabic of a real Cairo resus room, where a doctor says "الريذم VF" rather than any textbook phrase. How we built it Built with Codex across GPT-5.5 and GPT-5.6 sessions. I wrote a constitution first — AGENT.md — fixing the boundaries the agent was never allowed to cross: the AI does not own clinical state, spoken evidence is gated before it can act, and every accepted event must be auditable. Then Codex implemented one vertical slice at a time, each with tests: the state machines, the evidence and fusion layer, multilingual normalization, the confirmation policy, the audio pipeline. The architectural decision I care most about: there is no language model in the clinical loop. The LLM helps read messy speech. It never decides what happened. Clinical state is advanced by deterministic code, which is why the behaviour is reproducible and testable. Stack: FastAPI + Pydantic backend, Next.js + TypeScript frontend, pluggable speech recognition, everything runnable offline with a deterministic fake ASR so anyone can evaluate it without credentials. Challenges we ran into Real speech isn't scripted speech. The first phrase matcher worked on the phrases I wrote and failed on the phrases I say. Fixed by testing against replays of real recorded clinician speech instead of my own test strings. Silence hallucinated. Empty audio segments were producing confident transcripts that tried to mutate clinical state. That's the most dangerous class of bug in this app, and it now fails closed. Echo duplicates inflated the shock count. One shout of "shock delivered" heard twice became two shocks. There's now a deduplication window per event type — 15 seconds for shocks, 10 for CPR and rhythm.
drmohpioneer/pulse★ 22 forksPythonNOASSERTIONCreated Jul 18, 2026 · last push Jul 21, 2026

README excerpt

# Pulse

**An AI clinical teammate for cardiac arrest.**

Pulse listens to a resuscitation room through a single phone, works out what is
actually happening, and keeps the team's shared picture of the arrest correct
and current.

> ⚠️ **Research prototype. Not a medical device. Not for clinical use, and not
> for use on real patients.** Pulse is unvalidated software built for the OpenAI
> Build Week challenge.

**▶ Demo film (2:21):** https://youtu.be/Ou2HArr33Ag

![Pulse tracking a shockable arrest — amiodarone surfaced before anyone asked](assets/dashboard-amiodarone-due.jpg)

---

## The problem

During a cardiac arrest, the team leader is running an algorithm in their head
while the room is loud, crowded, and moving. They have to track the rhythm, the
CPR cycle, how many shocks have been given, when the last dose of epinephrine
went in, whether it is time to reassess, and which reversible causes have been
ruled out. All of it at once, all of it from memory, all of it while making
decisions that decide whether the patient lives.

The information that would answer every one of those questions is already being
said out loud in the room. Nobody is holding on to it.

Existing tools do not solve this. A CPR timer counts seconds and knows nothing
about the patient. An AI scribe writes a document for afterwards. A chatbot
waits to be asked a question by someone whose hands are busy.

Pulse is none of those. It is a teammate that listens continuously, maintains
the state of the ar

Team