<?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 老毛 (@zephyrdeng).</description>
    <link>https://dev.to/zephyrdeng</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%2F4135237%2F93d5288a-5ab1-467a-8939-03384d38021e.jpg</url>
      <title>DEV Community: 老毛</title>
      <link>https://dev.to/zephyrdeng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zephyrdeng"/>
    <language>en</language>
    <item>
      <title>One typed call per DOM step: a System One inner loop inside ego-browser</title>
      <dc:creator>老毛</dc:creator>
      <pubDate>Mon, 21 Sep 2026 07:56:56 +0000</pubDate>
      <link>https://dev.to/zephyrdeng/one-typed-call-per-dom-step-a-system-one-inner-loop-inside-ego-browser-3n7k</link>
      <guid>https://dev.to/zephyrdeng/one-typed-call-per-dom-step-a-system-one-inner-loop-inside-ego-browser-3n7k</guid>
      <description>&lt;p&gt;Browser agents have a dumb habit: they spend a full LLM turn — screenshot,&lt;br&gt;
chain of thought, function call — to do something a radio button could have&lt;br&gt;
told you. Click "next page". That costs seconds and a pile of tokens, every&lt;br&gt;
single step.&lt;/p&gt;

&lt;p&gt;jev-ultrafast (the standalone browser agent) showed a different shape: keep&lt;br&gt;
the loop dumb and fast. Don't ask a model to reason about the page; ask a&lt;br&gt;
typed decision layer to pick the next action from a fixed menu. I ported&lt;br&gt;
that loop into ego-jev, an agent skill for ego lite — so the fast path runs&lt;br&gt;
inside a real browser with your sessions and logins, and the slow, smart&lt;br&gt;
agent is still there when a step actually needs it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The step shape
&lt;/h2&gt;

&lt;p&gt;Each iteration does four things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Take an ego-browser snapshot of the page.&lt;/li&gt;
&lt;li&gt;Number every interactive element. The a11y tree gives refs like &lt;code&gt;@5&lt;/code&gt;. On
top of that, a DOM walk finds "dark matter" — divs with click handlers,
&lt;code&gt;cursor:pointer&lt;/code&gt; cards, shadow-root and iframe content that never gets a
ref — and tags them &lt;code&gt;d1&lt;/code&gt;, &lt;code&gt;d2&lt;/code&gt;, ...&lt;/li&gt;
&lt;li&gt;Send one System One request that answers several questions at once: which
operation (click/fill/select/scroll/wait/done/escalate), and — speculatively —
which target each operation would use. Only the selected operation's target
is ever executed, so two decisions cost one network round trip.&lt;/li&gt;
&lt;li&gt;ego executes the pick: &lt;code&gt;page.click("@5")&lt;/code&gt;, &lt;code&gt;fill&lt;/code&gt;, &lt;code&gt;selectOption&lt;/code&gt;, or a
coordinate click for DOM-tagged elements.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On the TypeSafe endpoint this lands at roughly 300–550 ms per step with&lt;br&gt;
20–120 candidate elements — versus multi-second reasoning turns plus a&lt;br&gt;
screenshot upload each step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it refuses to do
&lt;/h2&gt;

&lt;p&gt;The loop escalates instead of improvising: login/2FA pages, payment,&lt;br&gt;
deletion, upload, free-text writing, low confidence, repeated no-ops, and a&lt;br&gt;
guard word list ("pay", "delete", "下单", "确认订单"…) all bail back to the&lt;br&gt;
outer agent with a reason string. &lt;code&gt;done&lt;/code&gt; is also just a claim — the caller&lt;br&gt;
passes a &lt;code&gt;verify&lt;/code&gt; function that checks the real end state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx skills add ZephyrDeng/ego-jev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You need ego lite and either TYPESAFE_API_KEY or AI_GATEWAY_API_KEY. If you&lt;br&gt;
don't have a key, &lt;code&gt;scripts/selftest.mjs&lt;/code&gt; runs the whole loop inside&lt;br&gt;
ego-browser with a scripted decider — same mechanics, nothing to configure.&lt;/p&gt;

&lt;p&gt;The interesting question to me is where the boundary should sit: which steps&lt;br&gt;
deserve a smart model and which deserve a 0.4s lookup. If you run it on&lt;br&gt;
something real, I'd like to hear where it escalates.&lt;br&gt;
&lt;a href="https://github.com/ZephyrDeng/ego-jev" rel="noopener noreferrer"&gt;https://github.com/ZephyrDeng/ego-jev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
