Diagnosing an echo case is complex. It means going through the entire study, looking for subjective markers like regurgitation, performing specific measurements to confirm a condition, sometimes going back to repeat a measurement on the same video or a different one, and finally adding observations and a case summary. I built a domain-specific harness for that, where our in-house models do the measuring, deterministic code does the grading, and a vision-capable LLM looks at the pictures and fixes what the pipeline got wrong.
Why build custom, and not use a general-purpose harness like Claude Code? Claude Code and Pi are coding harnesses, built around how developers work: skim a repo, read and write a file, run the tests and edit. They have been polished to get the most out of tools like grep, read/write and bash. Echo is an entirely different domain. A cardiologist has their own way of going through a study: picking the right views, looping over a video to find the right frame, and using the measurement tools at their disposal.
At the center of the harness is a ReAct (reason + act) loop: reason, call tools, observe, repeat. It has tools to look at frames, re-ask our models, read guidelines and change a value's status. It resolves a conflicting diagnosis by gathering more evidence and reasoning through it, again and again until the conflict is settled.
Over the years at Tricog I have built in-house models for specific tasks, but even deployed, they need a clinician's domain expertise to know where to apply them: on which videos and on which frames. For this we use a frontier vision-language model, OpenAI Astra 6. We also give it the deterministic rules already used on our platform, InstaEcho, along with the formulas that compute measurements from coordinates and traces. The deterministic rules keep the agent grounded and let it back its diagnosis with proper citations.
A full study of around 32 recordings takes about 12 minutes and $4. Most of the time is our models, and most of the cost is the agent. The rules, formulas and coverage checks take under a second, which is the point of keeping them out of the LLM.
We are barely scratching the surface here, and there are still a lot of bottlenecks. VLMs still can't take precise measurements, so you need custom models to supply them. Native image understanding is not enough either: the model needs native video understanding to reason well across a clip. And cost grows with every VLM call: the more evidence you reason over, the more it costs.