<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 윤현서</title>
    <description>The latest articles on DEV Community by 윤현서 (@yhs0719yhs).</description>
    <link>https://dev.to/yhs0719yhs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4283793%2F07a5d613-d685-4ae9-af7c-66c23dcaae94.png</url>
      <title>DEV Community: 윤현서</title>
      <link>https://dev.to/yhs0719yhs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yhs0719yhs"/>
    <language>en</language>
    <item>
      <title>Stop Sending Full Screenshots Every Tick: ROI-Based Desktop Reflexes + Grok Vision</title>
      <dc:creator>윤현서</dc:creator>
      <pubDate>Sat, 05 Dec 2026 01:31:27 +0000</pubDate>
      <link>https://dev.to/yhs0719yhs/stop-sending-full-screenshots-every-tick-roi-based-desktop-reflexes-grok-vision-31ai</link>
      <guid>https://dev.to/yhs0719yhs/stop-sending-full-screenshots-every-tick-roi-based-desktop-reflexes-grok-vision-31ai</guid>
      <description>&lt;p&gt;Every desktop agent demo looks the same on the first tick: grab the whole screen, send it to a vision model, wait, parse the answer, click somewhere, and repeat. It works, and it gets expensive fast — one full screenshot per tick, multiplied by a VLM call, is latency and tokens you pay even when nothing on the screen has changed.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;roi-reflex-controller&lt;/code&gt; is a small TypeScript control core I built to break that loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: look at almost nothing, almost all the time
&lt;/h2&gt;

&lt;p&gt;Instead of capturing the full screen on every tick, the controller watches a handful of tiny &lt;strong&gt;Regions of Interest (ROIs)&lt;/strong&gt; — a button, a form field, a progress bar, the corner of a modal. Those checks are cheap and low latency, and the usual answer is "nothing changed", which costs close to nothing.&lt;/p&gt;

&lt;p&gt;The expensive tier is only reached when it has to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a reflex is &lt;strong&gt;uncertain&lt;/strong&gt; about what it sees,&lt;/li&gt;
&lt;li&gt;a reflex &lt;strong&gt;fails&lt;/strong&gt; or times out,&lt;/li&gt;
&lt;li&gt;or the screen state does not match what was expected.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then the controller escalates the frame to a &lt;code&gt;HighLevelReasoner&lt;/code&gt; — a single interface you can plug any vision model into. Because it runs rarely, it can afford to look at more of the screen and think harder about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grok Vision as the expensive tier
&lt;/h2&gt;

&lt;p&gt;The newest addition is &lt;code&gt;GrokHighLevelReasoner&lt;/code&gt;, an adapter that routes escalation frames to Grok Vision. The core stays model-agnostic: the reflex tier does the cheap, constant work, and the reasoner tier is swappable, so another model is a new adapter rather than a rewrite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Safety: ActionGate before anything touches the desktop
&lt;/h2&gt;

&lt;p&gt;An agent that clicks is an agent that can click the wrong thing, and a confident hallucination is exactly where a fast loop becomes dangerous. So no input executes until it passes &lt;code&gt;ActionGate&lt;/code&gt;, which enforces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;confidence thresholds&lt;/strong&gt; — low-confidence actions are rejected instead of executed,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;step budgets&lt;/strong&gt; — a run has a bounded number of actions,&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;repeat limits&lt;/strong&gt; — the same action cannot loop forever.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gate is the part that decides whether the loop can be left running unattended.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo and tests
&lt;/h2&gt;

&lt;p&gt;The repo ships a synthetic PNG demo, so you can watch the whole loop without a real desktop: the ROI checks, an escalation, and an action being rejected. Unit tests cover the reflex, escalation, and gate paths — 17/17 passing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/yhs0719yhs/roi-reflex-controller" rel="noopener noreferrer"&gt;https://github.com/yhs0719yhs/roi-reflex-controller&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are building desktop agents and paying for a screenshot on every tick, I would like to hear how you handle the cheap tier — and any holes you can find in the gate. Stars and issues are both welcome.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
