<?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: rebornace</title>
    <description>The latest articles on DEV Community by rebornace (@rebornace).</description>
    <link>https://dev.to/rebornace</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%2F4127161%2F90390741-aa85-460d-a5fd-8e6e7f58bcb0.jpg</url>
      <title>DEV Community: rebornace</title>
      <link>https://dev.to/rebornace</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rebornace"/>
    <language>en</language>
    <item>
      <title>Browser Use in DSH Agent Enhancer: Click, Debug, and Replay Saved Flows</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Sat, 21 Nov 2026 06:40:24 +0000</pubDate>
      <link>https://dev.to/rebornace/browser-use-in-dsh-agent-enhancer-click-debug-and-replay-saved-flows-a7j</link>
      <guid>https://dev.to/rebornace/browser-use-in-dsh-agent-enhancer-click-debug-and-replay-saved-flows-a7j</guid>
      <description>&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt; is a desktop plugin for DSH. Its Browser Use layer gives your agent a dedicated browser. It can click, type, and submit. Login state stays in its own profile, so your everyday browser is left alone.&lt;/p&gt;

&lt;p&gt;You do not need scripting or API knowledge. Do the task once in the dedicated window, and the agent can follow the same steps. Save the recording as a flow, rerun it by name, and hand it to a scheduled task without approving every action.&lt;/p&gt;

&lt;p&gt;The practical rule: &lt;strong&gt;if you click through the same web admin every day or every week, it is worth handing over.&lt;/strong&gt; Here are scenarios that work right after install:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Repetitive work&lt;/th&gt;
&lt;th&gt;How it helps&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;E-commerce ops&lt;/td&gt;
&lt;td&gt;Export yesterday's orders, refunds, and inventory at 8:00 every day&lt;/td&gt;
&lt;td&gt;Three saved flows plus the built-in scheduler, running unattended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finance / reconciliation&lt;/td&gt;
&lt;td&gt;Export admin data and statements on the 1st of each month, then reconcile three tables&lt;/td&gt;
&lt;td&gt;Automated except for the password step; if it gets stuck, it leaves a record&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recruiting / HR&lt;/td&gt;
&lt;td&gt;Go through new resumes and filter by keywords every Monday&lt;/td&gt;
&lt;td&gt;Read-only tabs: it can read, but cannot change anything&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Marketing / competitive research&lt;/td&gt;
&lt;td&gt;Check competitor pricing and campaign pages every morning&lt;/td&gt;
&lt;td&gt;Extract plus screenshots, with changes written straight into the chat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dev / QA&lt;/td&gt;
&lt;td&gt;Re-click the same reproduction steps in the admin UI&lt;/td&gt;
&lt;td&gt;Record once, rerun by name during regression; fix once after a redesign&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Handover / onboarding&lt;/td&gt;
&lt;td&gt;Explain "where to click first" again and again&lt;/td&gt;
&lt;td&gt;A teammate demos once; the steps become a flow anyone can run next month&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three patterns cover most of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Turn repetitive work into one sentence.&lt;/strong&gt; Record once, save, run on schedule, and check the result in the morning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read-only pages that must not change.&lt;/strong&gt; Order details, reports, production dashboards: it can read and scroll, but clicks do nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the "how" around.&lt;/strong&gt; A teammate demos once, the steps become a flow; when the site changes, it finishes the job and you click Remember once.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under the hood, the actions come from a set of &lt;code&gt;browser_*&lt;/code&gt; tools: &lt;code&gt;browser_navigate&lt;/code&gt; opens a page, &lt;code&gt;browser_snapshot&lt;/code&gt; reads it, &lt;code&gt;browser_click&lt;/code&gt; / &lt;code&gt;browser_type&lt;/code&gt; operate it, &lt;code&gt;browser_scroll&lt;/code&gt; / &lt;code&gt;browser_wait&lt;/code&gt; / &lt;code&gt;browser_extract&lt;/code&gt; handle long pages, &lt;code&gt;browser_list_tabs&lt;/code&gt; / &lt;code&gt;browser_follow_tab&lt;/code&gt; switch tabs, &lt;code&gt;browser_network&lt;/code&gt; / &lt;code&gt;browser_console&lt;/code&gt; / &lt;code&gt;browser_emulate&lt;/code&gt; debug it, &lt;code&gt;browser_demonstrate&lt;/code&gt; records a demo, and &lt;code&gt;browser_demo_recipes&lt;/code&gt; manages saved flows. When you need to take over and log in yourself, use &lt;code&gt;browser_ask_user&lt;/code&gt;; there are also &lt;code&gt;browser_screenshot&lt;/code&gt; and &lt;code&gt;browser_status&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This post starts with what it can do, then walks through six areas: operation, troubleshooting, demo recording, saved flows, scheduled tasks, and boundaries. Each section ends with a concrete use case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6x0iuki3hl5pd06pjo5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6x0iuki3hl5pd06pjo5g.png" alt="Browser Use: click, debug, and remember flows" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Operation: multiple tabs, read-only tabs, idle cleanup
&lt;/h2&gt;

&lt;p&gt;Say "open the browser" in the chat, or Alt-click (Option-click on Mac) a link in the conversation, and the dedicated window starts. It has its own profile, so you log in once and stay logged in. On Mac it uses Chrome or Safari; on Windows, Chrome or Edge. It is completely separate from your daily browser. On Mac, selecting Safari drives the WebKit engine, not the Safari app you use every day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiple tabs.&lt;/strong&gt; The sidebar lists every tab; click one to switch. When navigating, you can choose to open a new tab. If a task needs to compare orders, inventory, and shipping, you do not have to cram everything into one page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read-only tabs.&lt;/strong&gt; One click in the sidebar makes a tab read-only: the agent can look, but it cannot click, type, or navigate within that tab. Opening a new tab and scrolling still work. Check-only pages — reports, order details — are the safest place to use it. Even a saved flow replay is blocked by this restriction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Idle cleanup.&lt;/strong&gt; Idle tabs can close automatically after 10, 30, or 60 minutes, or never. The tab you are currently viewing, session-bound tabs, and the last remaining tab are never closed. The dedicated window does not pile up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it for:&lt;/strong&gt; reconciling orders across three admin pages. Open orders, inventory, and shipping in separate tabs; make inventory read-only so nobody accidentally clicks "Adjust stock"; come back from lunch and idle tabs are gone, but the login is still there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting: debug tools and page emulation
&lt;/h2&gt;

&lt;p&gt;When the Export button does nothing, guessing is the worst approach. Turn on Debug &amp;amp; Page Emulation in settings (off by default):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Network&lt;/strong&gt;: method, URL, status code, duration, failure reason;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Console&lt;/strong&gt;: output, uncaught exceptions, source location;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Page emulation&lt;/strong&gt;: dark mode, reduced motion, viewport size.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It reads only what it needs: no request headers, cookies, or response bodies. Tokens and codes in URLs, plus links in the console, are redacted.&lt;/p&gt;

&lt;p&gt;Startup failures do not require digging through logs either. The status bar and sidebar show the reason and the next step: feature not enabled, browser not started, WebKit missing, no usable browser on the machine, profile directory locked, and so on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it for:&lt;/strong&gt; a dead Export button. Check whether the network call returns 500 or times out, then look for console errors. Switch to a narrow viewport to rule out an overlay covering the button. Once you know the cause, change the agent's action instead of trying blindly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo recording: do it once, it remembers
&lt;/h2&gt;

&lt;p&gt;Some admin tasks are easier to show than to describe. Turn on Demo Recording in settings (off by default), click "Start demo" in the sidebar, and use the dedicated window normally. When you are done, click "End and view steps".&lt;/p&gt;

&lt;p&gt;It records clicks, typing, Enter presses, and page navigations. It can record across tabs, and other tabs opened during the demo are captured. When finished, you can copy the steps or click "Send to agent" to insert them into the input box (the current conversation needs at least one message first, otherwise it asks you to send one). You can also say "let me show you" in the chat, and the agent can start a recording itself.&lt;/p&gt;

&lt;p&gt;Password, CAPTCHA, token, and card-number fields are stored as &lt;code&gt;***&lt;/code&gt; only. It does not take screenshots or record network requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it for:&lt;/strong&gt; handing over monthly reconciliation. Ask a teammate to demo it once: open the reconciliation page, pick the month, export, download, and check the three tables. Send the steps to the agent, and next month nobody has to ask "where do I click first?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Saved flows: from a one-off demo to a reusable run
&lt;/h2&gt;

&lt;p&gt;After recording, click "Save as flow" and give it a name, such as "Weekly report export". There are three ways to run it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click Run under "Saved flows" in the sidebar;&lt;/li&gt;
&lt;li&gt;Say &lt;code&gt;Run "Weekly report export"&lt;/code&gt; in the chat. The agent finds it by name and asks for approval once per run by default; Full Access or unattended mode stops the repeated prompts;&lt;/li&gt;
&lt;li&gt;Hand it to the built-in Automation Tasks with unattended mode, and it runs on schedule. The next section explains how to wire that up.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It works across sessions and restarts. If the current page is not the page where recording started, it returns there first. Data stays local and only redacted steps are stored; password fields remain &lt;code&gt;***&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The sidebar row keeps only Run and "⋯"; rename and delete live in the menu, and delete asks for confirmation. Expanding the row shows editable values, run mode, and steps. Replay supports dropdowns and checkboxes. If several controls share a name and cannot be distinguished, it stops and lists the candidates instead of clicking the first one by name.&lt;/p&gt;

&lt;h3&gt;
  
  
  Parameters: plain language, not variable names
&lt;/h3&gt;

&lt;p&gt;After saving, values worth changing — dates, email addresses, search terms — are detected automatically. Parameter names come straight from the page labels ("Start date"), so you do not have to invent variable names.&lt;/p&gt;

&lt;p&gt;Date fields get a date picker. You can also say "last week", "this month", or "last quarter", and the agent converts it to a real date. When a value is missing, it asks in plain language: "Which start date should I use this time?"&lt;/p&gt;

&lt;p&gt;Each value's default and display name can be changed; it can be set to "Ask me each time" or switched back to a fixed value. Every change goes into version history, and the last change can be undone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Repair: when the site changes, it finishes the job
&lt;/h3&gt;

&lt;p&gt;If the site renames a control or inserts an extra dialog, the flow gets stuck. The agent finishes the task, then offers a suggestion:&lt;/p&gt;

&lt;p&gt;"The control in step 4 changed; it is now called 'Start date'. Remember this for next time?"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remember&lt;/strong&gt;: write the repair back into the flow and use it next time;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Just this once&lt;/strong&gt;: leave the flow as it was.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repair changes only how the control is located. It does not change values or step order. Password fields do not participate, and are never stored in the flow. Every write-back creates a version that can be undone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run results: what happened last time
&lt;/h3&gt;

&lt;p&gt;Each saved flow records its last run: time, success / stopped at step N / failure. If it did not finish, the row shows a "Last run incomplete" badge. It stores counts and the reason it stopped, not page content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it for:&lt;/strong&gt; a weekly report export. Record once, save "Weekly report export", set "Start date" to Ask me each time, say &lt;code&gt;Run "Weekly report export" with last week's start date&lt;/code&gt; on Monday morning, and check the run result. If the site changes, repair it once, remember it, and the next run uses the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scheduled tasks: a flow is not "placed inside" a task
&lt;/h2&gt;

&lt;p&gt;First, a common misconception: &lt;strong&gt;a saved flow is not an asset you drag into a scheduled task. When the schedule fires, the task only says one sentence.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The built-in Automation Tasks scheduler creates a new session with fixed permissions: &lt;strong&gt;Workspace Modify&lt;/strong&gt; with approval prompts. The task itself cannot change permissions. So when our flow runs, an approval prompt will appear — and nobody is there to click it. The task stalls.&lt;/p&gt;

&lt;p&gt;The fix is not to loosen global permissions. Turn on &lt;strong&gt;Unattended&lt;/strong&gt; for that one flow. It applies only to the site recorded in that flow, with a default budget of 20 minutes / 30 actions. When time or actions run out, it goes back to per-action approval. It is off by default; it cannot be enabled if the flow has no recorded site; password fields still stop and wait; it does not apply to another site or another session; if a run is denied, the site grant is revoked immediately.&lt;/p&gt;

&lt;p&gt;These two numbers can be changed in &lt;strong&gt;Settings → Agent Enhancer → Features → Browser Agent&lt;/strong&gt;: authorization duration 5–60 minutes, action limit 10–200. Defaults stay unless you change them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting "Weekly report export" on a schedule (5 steps)
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run it manually once.&lt;/strong&gt; Sidebar "Saved flows" → expand "Weekly report export" → Run. Confirm it finishes within the authorization window and does not ask for input.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On the same flow, click "Allow unattended".&lt;/strong&gt; The "Unattended" badge appears next to the name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Create a built-in task.&lt;/strong&gt; Open "Automation Tasks", create one, and set it to Monday 08:00.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The prompt is one sentence:&lt;/strong&gt; &lt;code&gt;Run "Weekly report export"&lt;/code&gt;. You can include the site: &lt;code&gt;Run "Weekly report export" on example.com&lt;/code&gt;. It checks the site recorded in the flow and refuses to run on the wrong one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check the result on Monday morning.&lt;/strong&gt; Expand the flow in the sidebar; "Run mode" shows the last run time and whether it succeeded, stopped at step N, or failed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What actually happens when the schedule fires
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The task creates a new session; permissions are still Workspace Modify with approval.&lt;/li&gt;
&lt;li&gt;The agent finds the flow by name and issues a temporary site pass for &lt;strong&gt;the site recorded in the flow&lt;/strong&gt; (default 20 minutes / 30 actions).&lt;/li&gt;
&lt;li&gt;The dedicated browser launches itself. Login state is still in its own profile; no need to sign in again.&lt;/li&gt;
&lt;li&gt;The flow replays in the recorded order, and the result is written back to the flow.&lt;/li&gt;
&lt;li&gt;If a site change blocks it, the agent finishes the remaining steps and leaves a repair suggestion. &lt;strong&gt;Unattended mode does not write the repair back automatically&lt;/strong&gt;; click Remember when you have time.&lt;/li&gt;
&lt;li&gt;On a password or CAPTCHA, it stops and records the step where it stopped. That step is never auto-approved.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Three easy traps
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The flow is too long.&lt;/strong&gt; The default pass covers 30 actions. Raise "Action limit" in settings (max 200); if that is still not enough, split "Export orders / Export refunds / Export inventory" into smaller flows. At the default budget, a 40-step flow falls back to per-action approval halfway through and then stalls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A parameter is still set to "Ask me each time".&lt;/strong&gt; Nobody is there to answer during a scheduled run, and the agent will not invent a value. For scheduled flows, either fix the value or put it in the prompt: &lt;code&gt;Run "Weekly report export" with start date set to last week&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No site recorded.&lt;/strong&gt; Older flows that did not record a site have "Allow unattended" grayed out. Record the flow again to enable it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use it for:&lt;/strong&gt; an automatic weekly report at 8:00 on Monday. Enable unattended only for "Weekly report export", tune the budget to that flow, and check the run result afterward. Other tasks and other sites still require approval each time.&lt;/p&gt;

&lt;p&gt;If the session already uses Full Access, actions no longer prompt one by one; Auto Review goes through the built-in reviewer; View Only is refused with an explanation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Boundaries: what it won't do
&lt;/h2&gt;

&lt;p&gt;It can act, but it does not have unlimited permission. By default, every action that changes external state needs approval. It stops at a login wall and waits for you to click "I'm done, continue"; it does not bypass it.&lt;/p&gt;

&lt;p&gt;Demo recording captures actions only: no screenshots, no network requests. Debugging does not read request headers, cookies, or response bodies; URL parameters are redacted. Saved flows live locally and contain only redacted steps; passwords never enter a flow and never participate in repair. Read-only tabs prevent changes at the entry point, and flow replays are subject to the same restriction. Turn the feature off and it removes the tools and closes the dedicated window; no background window is left behind.&lt;/p&gt;

&lt;p&gt;The dedicated window does not label itself as an automation environment, so sites with login bot checks, such as Bilibili, no longer reject it for that reason. This is not a generic anti-detection patch; sites that check more signals still need a separate look.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it for:&lt;/strong&gt; hand a read-only report page to the agent for checking; when a submission is needed, let it stop and wait for you; give a scheduled task one flow and a limited window. Narrow permissions are what make it safe to let go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Up and running in 5 minutes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Settings → Plugins, search &lt;code&gt;dsh-agent-enhancer&lt;/code&gt; → install or update to the latest version, then restart the desktop app when prompted.&lt;/li&gt;
&lt;li&gt;On the plugin page, confirm "Agent Enhancer" is enabled. Then go to Settings → Agent Enhancer → Features → Browser Agent (off by default) and turn it on. Choose the dedicated browser: on Mac, Auto / Chrome / Safari; on Windows, Auto / Chrome / Edge. Before selecting Safari (WebKit) on Mac, run &lt;code&gt;npx playwright install webkit&lt;/code&gt;; the status bar tells you if it is missing.&lt;/li&gt;
&lt;li&gt;In the chat, say "open the browser", or Alt-click (Option-click on Mac) a link. Run one demo recording first; if it feels right, save it as a flow.&lt;/li&gt;
&lt;li&gt;Run the flow manually once. When it is stable, enable "Allow unattended", raise the budget in settings if needed, and create a built-in Automation Task with &lt;code&gt;Run "flow name"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Do not start with Full Access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Command line (installs the latest version by default):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dsh plugin --profile desktop add dsh-agent-enhancer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compatible with DSH desktop 0.2.2.x.&lt;/p&gt;

&lt;p&gt;Start by walking it through one demo recording. After that, it remembers the run for you.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/dsh-agent-enhancer" rel="noopener noreferrer"&gt;npm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/rebornace/dsh-agent-enhancer/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>deepseek</category>
      <category>automation</category>
    </item>
    <item>
      <title>DSH Agent Enhancer 0.3.13: Multi-Tab Browsing and Importing Someone Else's Web Chat</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Sat, 14 Nov 2026 05:34:36 +0000</pubDate>
      <link>https://dev.to/rebornace/dsh-agent-enhancer-0313-multi-tab-browsing-and-importing-someone-elses-web-chat-3pij</link>
      <guid>https://dev.to/rebornace/dsh-agent-enhancer-0313-multi-tab-browsing-and-importing-someone-elses-web-chat-3pij</guid>
      <description>&lt;p&gt;Version 0.3.13 changes three things: browser control can hold multiple tabs, the connector page shows connection status, and web chat can import someone else's shared conversation. It is compatible with the official dsh-v0.2.2-rc.3 released on November 13.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F441d2o5jfac902vy4drl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F441d2o5jfac902vy4drl.png" alt="DSH Agent Enhancer 0.3.13 overview" width="800" height="689"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser control: multiple tabs, and Safari on Mac
&lt;/h2&gt;

&lt;p&gt;Browser control is the only feature that ships off by default. With it enabled, the agent gets a dedicated Chrome or Edge window: it can navigate, read pages, click and take screenshots, every change needs your approval, and it stops at login walls instead of bypassing them.&lt;/p&gt;

&lt;p&gt;That window can now hold several pages at once. Opening a new tab is one of the options when navigating, and the right sidebar lists every open tab so you can switch with a single click.&lt;/p&gt;

&lt;p&gt;The browser menu follows the platform: Chrome or Edge on Windows, Chrome or Safari on Mac. On Mac, Safari is driven through Playwright's WebKit engine rather than Safari.app itself, so the login state stays separate — and WebKit has to be installed, which the sidebar tells you how to do if it is missing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connectors: status visible, restart and probe
&lt;/h2&gt;

&lt;p&gt;The Connectors page in the left sidebar lists MCP servers. The list and detail views now show runtime status, and the detail view offers "Restart connection" and "Probe". When a server is already connected, probing reads the live instance, so a stale URL left in the config no longer turns into a false failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Web chat: import someone else's share link
&lt;/h2&gt;

&lt;p&gt;The left sidebar embeds the official web chat at &lt;a href="https://chat.deepseek.com" rel="noopener noreferrer"&gt;chat.deepseek.com&lt;/a&gt;, and a conversation there can be moved into a workspace session to continue. Imports now come in two forms: your own current conversation, read through the logged-in session, and anyone's public share link, pasted in directly.&lt;/p&gt;

&lt;p&gt;The preview still shows only questions and answers. Thinking, web search, page opening and link reading returned by the API are written into the session as well, so the process is visible after the move. Full &lt;code&gt;deepseek_data-*.zip&lt;/code&gt; archives are left to the official "DeepSeek Session Import" plugin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version and install
&lt;/h2&gt;

&lt;p&gt;Compatible with DSH &lt;code&gt;&amp;gt;=0.2.2-rc.2 &amp;lt;0.3.0-0&lt;/code&gt;, which covers rc.3.&lt;/p&gt;

&lt;p&gt;Install: Settings → Plugins, search &lt;code&gt;dsh-agent-enhancer&lt;/code&gt; or "Agent Enhance" → install → restart the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the plugin already covers
&lt;/h2&gt;

&lt;p&gt;Prompt history · draft optimization · next-message prediction · quote from selection · checkpoint restore · undo restore&lt;/p&gt;

&lt;p&gt;Soft pause · run notifications · context usage · token usage · in-preview editing · extra folders&lt;/p&gt;

&lt;p&gt;Skills · connectors · session delete · web chat · browser control (off by default)&lt;/p&gt;

&lt;p&gt;Fifteen toggles, all on by default except browser control. Usage and screenshots are in the README.&lt;/p&gt;

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

&lt;p&gt;GitHub&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;npm&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Changelog&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/rebornace/dsh-agent-enhancer/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-agent-enhancer/blob/main/CHANGELOG.md&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>deepseek</category>
      <category>productivity</category>
    </item>
    <item>
      <title>TraceScope 0.3.6: USB crash capture for crashes that never reach the APM</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Thu, 12 Nov 2026 02:09:25 +0000</pubDate>
      <link>https://dev.to/rebornace/tracescope-036-usb-crash-capture-for-crashes-that-never-reach-the-apm-3nb8</link>
      <guid>https://dev.to/rebornace/tracescope-036-usb-crash-capture-for-crashes-that-never-reach-the-apm-3nb8</guid>
      <description>&lt;p&gt;TraceScope is an MIT-licensed plugin for DeepSeek Harness with three capabilities: functional impact analysis, design diff analysis, and crash analysis. Version 0.3.6 adds &lt;strong&gt;Local crash capture&lt;/strong&gt;, a crash source that doesn't wait for crash reporting.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/rebornace/dsh-tracescope" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-tracescope&lt;/a&gt; | npm: &lt;code&gt;@rebornace/dsh-tracescope&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A source that doesn't wait for reporting
&lt;/h2&gt;

&lt;p&gt;Crash analysis already works against APM services such as Firebase Crashlytics: it lists issues, opens the details, parses the stack, and writes the AI conclusion back.&lt;/p&gt;

&lt;p&gt;Every one of those services only knows about crashes that were reported and aggregated. A crash that never got that far simply isn't in the list.&lt;/p&gt;

&lt;p&gt;0.3.6 adds &lt;strong&gt;Local crash capture&lt;/strong&gt;. Crashes and ANRs are pulled straight from a USB-connected device. Collection runs locally inside the plugin, with no APM dependency and no upload to an APM. Once a crash has been captured, it goes through the same analysis, write-back and defect-filing flow as the reported ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plug in a device, crashes show up in the list
&lt;/h2&gt;

&lt;p&gt;The sidebar's &lt;strong&gt;Data source&lt;/strong&gt; section has a new &lt;strong&gt;Local crash capture&lt;/strong&gt; entry. Choose Android or iOS, refresh the device, start recording. Crashes and ANRs raised during the recording are written locally and appear in the list; opening the source loads the history automatically, with the count shown next to the title.&lt;/p&gt;

&lt;p&gt;Opening an entry shows the parsed stack, plus possible matches for the files in that stack against the configured code directory. A miss is only a soft hint: the full stack still reaches the analysis.&lt;/p&gt;

&lt;p&gt;A few things worth knowing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Captures go to &lt;code&gt;~/.tracescope/crash-inbox/shared/&lt;/code&gt;. TraceScope doesn't upload them to Crashlytics or any other APM. Whether the app's own APM SDK reports anything is decided by the app's configuration and has nothing to do with this capture.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Android capture goes through adb. If adb isn't installed, refreshing the device downloads platform-tools for you; no full SDK setup needed. USB debugging has to be on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Captures stay on the machine that recorded them, and the list only shows entries in that machine's local directory. iOS capture needs macOS (libimobiledevice); Windows can't record iOS. Android capture works on Windows and macOS alike.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Two analysis entries, two kinds of output
&lt;/h2&gt;

&lt;p&gt;Capture on its own only fetches the crash. With an entry open, analysis offers two options:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Entry&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Write reproduce steps&lt;/strong&gt; (primary)&lt;/td&gt;
&lt;td&gt;repro steps, environment info&lt;/td&gt;
&lt;td&gt;symptom only, no root-cause guessing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Locate &amp;amp; fix&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;root cause, blast radius, minimal fix&lt;/td&gt;
&lt;td&gt;meant for changing code&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Both quietly tidy the stack and drop the prompt into the session; the conclusion shows up in the sidebar once the agent calls the write-back tool. From there it can be copied, exported as Markdown, or filed as a defect on GitHub Issues, GitLab Issues, or a generic webhook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;DeepSeek Harness desktop&lt;/strong&gt;: install &lt;code&gt;@rebornace/dsh-tracescope&lt;/code&gt; from the plugin page, open the TraceScope sidebar, pick &lt;strong&gt;Local crash capture&lt;/strong&gt;, connect a device and start recording.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP clients&lt;/strong&gt; (Cursor, Claude Code, Codex, or any MCP-capable agent): add this to the config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"tracescope"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"npx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"-y"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"@rebornace/tracescope-mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart, then call &lt;code&gt;tracescope_open_panel&lt;/code&gt; to get the same three-mode workbench the sidebar has. Local capture needs a connected device, so run it from the desktop sidebar or that workbench. Node.js 20 or newer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Platform support today
&lt;/h2&gt;

&lt;p&gt;All three backends sit behind extension points rather than being tied to one vendor:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Surface&lt;/th&gt;
&lt;th&gt;Available now&lt;/th&gt;
&lt;th&gt;Can extend to (examples)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Crash sources&lt;/td&gt;
&lt;td&gt;Local crash capture (USB), Firebase Crashlytics&lt;/td&gt;
&lt;td&gt;Sentry, other APM services&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tracker / issue platforms&lt;/td&gt;
&lt;td&gt;GitHub Issues, GitLab Issues, generic webhook&lt;/td&gt;
&lt;td&gt;Jira, other issue trackers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Design sources&lt;/td&gt;
&lt;td&gt;Figma&lt;/td&gt;
&lt;td&gt;Other design tools on request&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;New crash sources will be added over time; trackers and design sources come in on request. Opening an issue with the platform name, its auth method, whether it has a public API, and the use case is the fastest way to get one prioritized. Roadmap details live in the repo docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Crash collection now has two kinds of sources: online from APM services such as Firebase Crashlytics, and on-device over USB. Both feed the same parse / write-back / file-a-defect flow. What the plugin does hasn't changed: it automates the fetching, parsing and locating, and &lt;strong&gt;lowers the barrier to applying AI analysis to app quality&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Issues and PRs are welcome.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/rebornace/dsh-tracescope" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-tracescope&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;README (English): &lt;a href="https://github.com/rebornace/dsh-tracescope/blob/main/README.en.md" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-tracescope/blob/main/README.en.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Guide (English): &lt;a href="https://github.com/rebornace/dsh-tracescope/blob/main/docs/GUIDE.en.md" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-tracescope/blob/main/docs/GUIDE.en.md&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Issues: &lt;a href="https://github.com/rebornace/dsh-tracescope/issues" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-tracescope/issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MCP package: &lt;a href="https://www.npmjs.com/package/@rebornace/tracescope-mcp" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@rebornace/tracescope-mcp&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>deepseek</category>
      <category>agents</category>
    </item>
    <item>
      <title>DSH Agent Enhancer Addendum: Moving Web Chat into Your Desktop Session</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Mon, 09 Nov 2026 15:01:35 +0000</pubDate>
      <link>https://dev.to/rebornace/dsh-agent-enhancer-addendum-moving-web-chat-into-your-desktop-session-17pb</link>
      <guid>https://dev.to/rebornace/dsh-agent-enhancer-addendum-moving-web-chat-into-your-desktop-session-17pb</guid>
      <description>&lt;p&gt;The 0.3.10 release adds exactly one thing: &lt;strong&gt;web chat&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it exists
&lt;/h2&gt;

&lt;p&gt;When you open &lt;code&gt;chat.deepseek.com&lt;/code&gt;, you usually aren't there to get work done. You ask something offhand, paste a paragraph, think out loud — it's ordinary conversation.&lt;/p&gt;

&lt;p&gt;Ideas tend to surface in that loose mode. Somewhere in the middle of it you think, "this could actually become something." And what you need at that moment is the context scattered across the last few dozen turns: how I framed it, what I tried, where I got stuck. It's all on the web page — but the place where you can actually act on it is the desktop app.&lt;/p&gt;

&lt;p&gt;Copy-pasting it over means dropped pieces and shuffled order, and you clean up the mess yourself. It usually ends one of two ways: you drop the idea, or you re-explain everything from scratch in the desktop app.&lt;/p&gt;

&lt;p&gt;0.3.10 turns that chore into one click: the conversation becomes a titled session in the desktop app, context included, and you keep going.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvkrtg18wnbx62ktwjqke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvkrtg18wnbx62ktwjqke.png" alt="Web chat: embedded in the sidebar, one click to the workspace" width="800" height="638"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;A web chat entry in the left sidebar.&lt;/strong&gt; Click it and &lt;code&gt;chat.deepseek.com&lt;/code&gt; loads inline — no browser switch, no separate window, same place as your session list. You sign in once; the session is kept locally, so you don't log in again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The core is "To workspace".&lt;/strong&gt; Once the web conversation is worth keeping, this moves it into the desktop app:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Pick the source: the &lt;strong&gt;current conversation&lt;/strong&gt;, or paste a &lt;strong&gt;share link&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check the &lt;strong&gt;preview&lt;/strong&gt; to confirm what's being imported&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose a target &lt;strong&gt;workspace&lt;/strong&gt; (or create one)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The desktop app opens a &lt;strong&gt;titled session&lt;/strong&gt; you can keep working in&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So the plans, outlines and lists you talked through on the web become a session that can call tools, edit files and roll back — no more copy-paste.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two things to know
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prefer share links.&lt;/strong&gt; Scraping the current page can come back incomplete; a share link usually gets the full thread. If you want fewer surprises, use the share link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's still web quota.&lt;/strong&gt; This feature moves content over. It does not wire your web quota into the local API — model calls from the desktop app still take the route they always did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Toggle and updating
&lt;/h2&gt;

&lt;p&gt;It's &lt;code&gt;webChatBridge&lt;/code&gt; on the Features page, &lt;strong&gt;on by default&lt;/strong&gt; — turn it off in Settings if you don't want it.&lt;/p&gt;

&lt;p&gt;If you already have it installed, check for updates under &lt;strong&gt;Settings → Built-in plugins → Agent Enhance → About&lt;/strong&gt;, or install &lt;code&gt;0.3.10&lt;/code&gt; over the top, then fully quit and restart the desktop app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Roadmap
&lt;/h2&gt;

&lt;p&gt;Two tracks from here: &lt;strong&gt;polish what's already shipped&lt;/strong&gt;, and &lt;strong&gt;Computer Use&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Polishing existing features
&lt;/h3&gt;

&lt;p&gt;The feature set is mostly in place. The next round isn't about adding more — it's about making each of the delivered capabilities smoother. No new entry points this cycle; the focus is on how the existing ones feel. Less friction beats more switches.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Computer Use
&lt;/h3&gt;

&lt;p&gt;The biggest piece after the Browser Agent: letting the agent operate desktop applications and windows beyond the browser.&lt;/p&gt;

&lt;p&gt;It deliberately comes after the browser — desktop control carries a higher risk of unintended actions. First the guardrails get proven in the browser (changes need approval, login walls stop and wait for you, everything stays interruptible), then they move to the desktop. Computer Use follows the same direction: controllable actions, approval for critical steps, no automatic bypass of logins or captchas.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;npm: &lt;a href="https://www.npmjs.com/package/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>deepseek</category>
      <category>opensource</category>
      <category>dsh</category>
    </item>
    <item>
      <title>DSH Agent Enhancer 0.3.9: the agent in your DeepSeek Harness desktop can now drive its own browser</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Mon, 09 Nov 2026 05:52:36 +0000</pubDate>
      <link>https://dev.to/rebornace/dsh-agent-enhancer-039-the-agent-in-your-deepseek-harness-desktop-can-now-drive-its-own-browser-1n8m</link>
      <guid>https://dev.to/rebornace/dsh-agent-enhancer-039-the-agent-in-your-deepseek-harness-desktop-can-now-drive-its-own-browser-1n8m</guid>
      <description>&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt; is a plugin for the official DeepSeek Harness (DSH) desktop client. This release, &lt;strong&gt;0.3.9&lt;/strong&gt;, brings four things: a &lt;strong&gt;Browser Agent&lt;/strong&gt;, a &lt;strong&gt;skills manager&lt;/strong&gt;, &lt;strong&gt;MCP connectors&lt;/strong&gt;, and &lt;strong&gt;soft pause plus run alerts&lt;/strong&gt;. Prompt history, rollback, billing, context and model routing were covered in earlier posts and are not repeated here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpdi0w5ckiqc1ntdivac1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpdi0w5ckiqc1ntdivac1.png" alt="DSH Agent Enhancer 0.3.9: Browser Agent and new capabilities" width="800" height="967"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Browser Agent: it gets a browser of its own
&lt;/h2&gt;

&lt;p&gt;The agent can already edit files in your workspace, but anything on the web was out of reach: dashboards that require a login, forms that need a few clicks before they return anything, information scattered across several pages. The Browser Agent gives it a window.&lt;/p&gt;

&lt;p&gt;It runs its own Chrome or Edge with a separate profile directory, so logins persist and nothing collides with the browser you use day to day. Note that this is &lt;strong&gt;not&lt;/strong&gt; the web viewer in the official sidebar — that one is for looking, this one is for operating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You never start it manually.&lt;/strong&gt; Use a &lt;code&gt;browser_*&lt;/code&gt; tool in a conversation, or &lt;code&gt;Alt+click&lt;/code&gt; a link, and the window comes up by itself. To switch between Chrome and Edge, change it in settings or the right sidebar; a running window switches over immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logins are yours to do.&lt;/strong&gt; Hit a site that needs signing in and the window waits on the login page. Sign in yourself, click &lt;strong&gt;"I'm done"&lt;/strong&gt;, and the agent continues from where the page is. It will not work around captchas for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consequential actions ask first.&lt;/strong&gt; Anything that changes external state — submitting a form, sending a message — plus &lt;code&gt;Alt+opening&lt;/code&gt; a link, triggers an approval dialog. Screenshots and page DOM are never sent to telemetry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parallel sessions.&lt;/strong&gt; A session is tied to a browser tab, and switching tabs can either &lt;strong&gt;Follow&lt;/strong&gt; the current session or &lt;strong&gt;Stay&lt;/strong&gt; on the page you picked.&lt;/p&gt;

&lt;p&gt;A few things it is good for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Checking orders, reports or config values on an internal dashboard you have already signed into&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Opening a page, filling it in, and submitting — with your approval before it sends&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Opening a few tabs, cross-checking data between two pages, and writing the conclusion back into the chat&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quoting text from a page straight into your next prompt&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Skills and connectors: two new sidebar entries
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Skills&lt;/strong&gt;: install from GitHub (&lt;code&gt;owner/repo&lt;/code&gt;) or a Zip, with visible progress you can cancel, targeting the user or project directory. Once installed, invoke them through the official &lt;code&gt;/&lt;/code&gt; command. GitHub sources can check for updates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connectors (MCP)&lt;/strong&gt;: add Stdio or Remote services in &lt;code&gt;mcp.json&lt;/code&gt;, toggle each one in the list, and open the detail view to see which tools a service exposes.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Soft pause and run alerts: two small, frequently used switches
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Soft pause&lt;/strong&gt;: there is a pause button on the toolbar of your latest message. Press it and &lt;strong&gt;subsequent model calls are held back&lt;/strong&gt;, while anything already streaming or already running as a tool finishes normally. Resume when you are ready — what you save is the tokens that would have been spent next. This differs from the official Stop, which cuts the current turn off outright.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run alerts&lt;/strong&gt;: when a long task finishes, when something is waiting for your approval, or when a session errors out, you get pulled back from whatever window you moved to. The default level is &lt;strong&gt;"when unfocused"&lt;/strong&gt;, which covers dual monitors and switching to other apps; notifications go through the system notification center, and if one cannot be delivered you get a toast when you return to the window.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. What was already there
&lt;/h2&gt;

&lt;p&gt;Prompt history / one-click optimization / next-prompt prediction / select-to-quote, rollback (conversation only or with files, undoable), in-workspace file editing and extra folders, session delete, token billing and per-account balance, context occupancy with compaction, and Auto model routing. Details are in the earlier posts.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Install
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Settings → Plugins&lt;/strong&gt;, use the add-plugin flow to install &lt;code&gt;dsh-agent-enhancer&lt;/code&gt;, then fully quit the desktop client and restart it.&lt;/p&gt;

&lt;p&gt;Or from the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dsh plugin --profile desktop add dsh-agent-enhancer@0.3.9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Targets the &lt;code&gt;desktop&lt;/code&gt; profile; requires DSH Desktop 0.2.2-rc.1 or above. If you still have the old &lt;code&gt;dsh-composer-enhancer&lt;/code&gt; package installed, remove it first, and quit all desktop windows and tray processes before installing.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Boundaries
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Browser Agent is off by default and is a high-risk capability. It supports Chrome and Edge only, will not get past login walls or captchas, and requires approval for consequential actions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Soft pause only holds back model steps that have not started yet, and does not survive a restart. The official Stop remains a hard interrupt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rollback tracks UTF-8 text files only; it does not touch processes, terminals, untracked files or binaries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extra folders do not widen the agent sandbox; session delete cannot be undone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The estimated "¥" in billing and the context detail figures are approximations, not exact billing data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;npm: &lt;a href="https://www.npmjs.com/package/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>deepseek</category>
      <category>dsh</category>
      <category>opensource</category>
    </item>
    <item>
      <title>DSH Agent Enhancer 0.3.5: select-to-quote, in-app file editing, session delete and more for the DeepSeek Harness desktop</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Fri, 06 Nov 2026 11:29:16 +0000</pubDate>
      <link>https://dev.to/rebornace/dsh-agent-enhancer-035-select-to-quote-in-app-file-editing-session-delete-and-more-for-the-2096</link>
      <guid>https://dev.to/rebornace/dsh-agent-enhancer-035-select-to-quote-in-app-file-editing-session-delete-and-more-for-the-2096</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt; is a plugin for the official DeepSeek Harness (DSH) desktop client, current version &lt;strong&gt;0.3.5&lt;/strong&gt; , MIT licensed. It adds prompt history, one-click prompt optimization, next-prompt prediction, select-to-quote, conversation &amp;amp; file rollback, in-workspace file editing, extra folders, session delete, token usage billing, per-account balance, context inspection with one-click compaction, and Auto model routing. All entry points live inside the official session and settings UI — no separate window, no client replacement.&lt;br&gt;
GitHub:  &lt;code&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/code&gt; ｜ npm:  &lt;code&gt;dsh-agent-enhancer&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Capabilities at a glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recall a prompt already sent in this session&lt;/td&gt;
&lt;td&gt;Prompt history&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;↑↓&lt;/code&gt; to navigate, &lt;code&gt;Alt+R&lt;/code&gt; to search; Enter fills the draft, does not send&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A draft is too vague to execute&lt;/td&gt;
&lt;td&gt;Prompt optimization&lt;/td&gt;
&lt;td&gt;Fills in steps, scope and constraints; undoable; chips preserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Not sure what to ask next&lt;/td&gt;
&lt;td&gt;Next-prompt prediction&lt;/td&gt;
&lt;td&gt;Gray suggestion after a reply, &lt;code&gt;Tab&lt;/code&gt; to accept; one per turn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want to bring a quoted passage into the next prompt&lt;/td&gt;
&lt;td&gt;Select-to-quote&lt;/td&gt;
&lt;td&gt;Select text in conversation / preview / editor / terminal → "Quote text"; does not call the model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to go back to a previous turn&lt;/td&gt;
&lt;td&gt;Conversation &amp;amp; file rollback&lt;/td&gt;
&lt;td&gt;Preview before confirming; conversation only or + tracked files; undoable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want to edit workspace files from inside the plugin&lt;/td&gt;
&lt;td&gt;In-workspace file editing&lt;/td&gt;
&lt;td&gt;Preview toolbar "Edit" → Monaco; highlight / search / &lt;code&gt;Ctrl+S&lt;/code&gt; / autosave&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want an extra local folder in the sidebar&lt;/td&gt;
&lt;td&gt;Extra folders&lt;/td&gt;
&lt;td&gt;Guide capsule mounts a local folder; browse via official preview / edit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Want to permanently delete a session&lt;/td&gt;
&lt;td&gt;Session delete&lt;/td&gt;
&lt;td&gt;Sidebar session ⋯ → delete; also clears plugin local data for that session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to see token spend and account balance&lt;/td&gt;
&lt;td&gt;Token billing + per-account balance&lt;/td&gt;
&lt;td&gt;Local summary, estimated "¥" from official pricing; balances shown separately&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to inspect context usage&lt;/td&gt;
&lt;td&gt;Context ring + details + compaction&lt;/td&gt;
&lt;td&gt;Splits system prompt / tools / messages; one-click official &lt;code&gt;/compact&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefer not to pick a model tier manually&lt;/td&gt;
&lt;td&gt;Auto routing&lt;/td&gt;
&lt;td&gt;Maps to Instant / Thinking / Pro; optional small-model classifier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need per-feature toggles or updates&lt;/td&gt;
&lt;td&gt;Settings page&lt;/td&gt;
&lt;td&gt;Tabs: Features / Models &amp;amp; routing / About; nine feature switches; npm update check&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Feature notes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzwlv6yi6ko9rcetr6iol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzwlv6yi6ko9rcetr6iol.png" alt="DSH Agent Enhancer 0.3.5 feature overview" width="800" height="1148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Writing prompts: history, optimization, prediction, select-to-quote
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prompt history&lt;/strong&gt;: press &lt;code&gt;↑&lt;/code&gt; at the first line of the input box or &lt;code&gt;↓&lt;/code&gt; at the last line to browse prompts already sent in the currently loaded session; &lt;code&gt;Esc&lt;/code&gt; exits. &lt;code&gt;Alt+R&lt;/code&gt; opens search (on some environments &lt;code&gt;Ctrl+R&lt;/code&gt; also works). Enter only fills the draft — it never sends.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One-click optimization&lt;/strong&gt;: click the optimize button on the right side of the input. A vague draft is rewritten into a prompt with steps, scope and constraints; an already clear draft gets only minor edits. With a selection, only the selection is optimized. The result is undoable, and reference chips keep their content and order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Next-prompt prediction&lt;/strong&gt;: after each reply, a gray suggestion appears in the input; press &lt;code&gt;Tab&lt;/code&gt; to accept. At most one per turn, and it disappears as soon as you start typing or switch sessions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select-to-quote&lt;/strong&gt;: in a settled conversation message, official file preview, Monaco editor, or sidebar terminal, select text and click the floating &lt;strong&gt;Quote text&lt;/strong&gt; button to insert it as an atomic quote block into the input. This action &lt;strong&gt;does not call the model&lt;/strong&gt;. Streaming assistant replies and HTML / PDF / Excel previews are not yet selectable.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Rollback: go back to a previous turn
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Next to a message (or from the checkpoint timeline in the right sidebar), click &lt;strong&gt;Restore to here&lt;/strong&gt;. A preview shows what will be rolled back, which files are involved, and whether there are conflicts — nothing changes before you confirm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scope is &lt;strong&gt;conversation only&lt;/strong&gt; or &lt;strong&gt;conversation + tracked files&lt;/strong&gt;. After restore, that turn's user prompt is filled back into the draft, so you can edit and resend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To revert, use &lt;strong&gt;Undo restore&lt;/strong&gt; in the input &lt;code&gt;+&lt;/code&gt; or &lt;code&gt;/&lt;/code&gt; menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restore only changes what is currently visible; the official session log and statistics stay intact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Out of scope: processes, terminals, untracked files, binary files, external services.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Workspace: file editing, extra folders, session delete
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;In-workspace file editing&lt;/strong&gt;: in the official file preview toolbar, click &lt;strong&gt;Edit&lt;/strong&gt; to open a Monaco editor with syntax highlighting, search, &lt;code&gt;Ctrl+S&lt;/code&gt; manual save, and autosave after a pause. You can always switch back to the official preview view.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extra folders&lt;/strong&gt;: mount a local folder via the guide capsule on the right. Browsing that folder then goes through the official preview / edit flow. This &lt;strong&gt;does not widen the Agent sandbox&lt;/strong&gt; — the agent's access scope stays the same as the official client.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Session delete&lt;/strong&gt;: in the sidebar session list, click ⋯ → &lt;strong&gt;Delete session&lt;/strong&gt; to permanently delete the session and clear its plugin local data. This cannot be undone.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Usage &amp;amp; cost: billing and balance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click the &lt;strong&gt;Token usage&lt;/strong&gt; meter next to the session to open the right sidebar billing panel: input / output / cached-read token totals, trends over time, per-function share (history / optimize / predict / compaction / main chat), and per-model and per-call details. Time range: &lt;strong&gt;today / 7 days / 30 days / all time&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The estimated "&lt;strong&gt;¥&lt;/strong&gt;" value is computed from official pricing as a reference, not a billing receipt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under &lt;strong&gt;Settings → Models&lt;/strong&gt;, the DeepSeek account (Platform wallet) and API Key balance are shown separately, two decimal places, refreshable on click.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The usage meter and billing panel can be turned off in &lt;strong&gt;Settings → Features&lt;/strong&gt; (&lt;code&gt;usage&lt;/code&gt; switch); per-account balance is unaffected.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Context: occupancy, details, compaction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An &lt;strong&gt;occupancy ring&lt;/strong&gt; in the session shows how much of the context window is used.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click into the &lt;strong&gt;details&lt;/strong&gt;: system prompt / tools / messages listed separately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you need to free space, trigger the official &lt;strong&gt;compact&lt;/strong&gt; (&lt;code&gt;/compact&lt;/code&gt;) directly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Model routing: Auto tier selection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;Auto&lt;/strong&gt; in the model list; auxiliary requests (optimize / predict / compaction) can also be set to Auto or pinned to a specific model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In settings, map Auto to &lt;strong&gt;Instant / Thinking / Pro&lt;/strong&gt; tiers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Default decisions use built-in Chinese/English heuristics. An optional small-model classifier can be enabled; when it fails, routing falls back to the heuristic and does not block the main request.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Settings &amp;amp; maintenance: tabs, toggles, update check
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Settings → Built-in plugins → Agent Enhance&lt;/strong&gt; is split into three underlined tabs: &lt;strong&gt;Features / Models &amp;amp; routing / About&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;Features&lt;/strong&gt; tab provides nine independent switches: prompt history, one-click optimize, next-prompt prediction, select-to-quote, rollback, context inspect, token usage, session delete, and in-workspace file editing (extra folders follow the file-editing switch).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;About&lt;/strong&gt; tab: npm installs can check for updates directly; local link installs are given manual step instructions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Common usage
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Bringing a quoted passage into the next prompt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Select a passage in a settled reply, click "Quote text", and it enters the input as a quote block. This step consumes no tokens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Editing a config file from inside the plugin&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the file from official preview, click "Edit" in the toolbar to enter Monaco, press &lt;code&gt;Ctrl+S&lt;/code&gt; or pause to autosave; switch back to official preview anytime.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mounting an extra project folder&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use the extra-folders capsule to select a local folder; browsing its files then goes through the plugin's preview / edit entry, without widening the Agent sandbox.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning up sessions you no longer need&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sidebar session ⋯ → Delete session clears both the session and its plugin local data. Save anything you want to keep before confirming.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Going back to a previous turn&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the agent went in the wrong direction, click &lt;strong&gt;Restore to here&lt;/strong&gt;, review the preview (conversation only or with files), confirm to go back; if you change your mind, use undo restore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checking cost distribution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the billing panel, inspect the 30-day token share by function and model, then move auxiliary requests onto a cheaper model.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install &amp;amp; compatibility
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;In the DSH desktop app (recommended)&lt;/strong&gt;: open &lt;strong&gt;Settings → Plugins&lt;/strong&gt; and use the add-plugin flow to install &lt;code&gt;dsh-agent-enhancer&lt;/code&gt;, then fully quit and restart the desktop client.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt; (if you have the &lt;code&gt;dsh&lt;/code&gt; CLI):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dsh plugin --profile desktop add dsh-agent-enhancer@0.3.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The plugin targets the &lt;strong&gt;Desktop (&lt;/strong&gt;&lt;code&gt;desktop&lt;/code&gt;&lt;strong&gt;) profile&lt;/strong&gt;. Do not install into the &lt;code&gt;web&lt;/code&gt; profile — the command may report success, but the desktop client will not load it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compatibility: &lt;strong&gt;DSH Desktop 0.2.2-rc.1 and above&lt;/strong&gt; (&lt;code&gt;&amp;gt;=0.2.2-rc.1 &amp;lt;0.3.0-0&lt;/code&gt;), Node &lt;code&gt;^22.19.0 || &amp;gt;=24.0.0&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you previously installed the old package &lt;code&gt;dsh-composer-enhancer&lt;/code&gt;, uninstall it first.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quit all desktop windows and tray processes before installing / upgrading / uninstalling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All capabilities are on by default and can be toggled individually in &lt;strong&gt;Settings → Built-in plugins → Agent Enhance → Features&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Scope and known limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Supported environment: official DSH desktop client (desktop profile), version 0.2.2-rc.1+.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select-to-quote: streaming assistant replies and HTML / PDF / Excel previews are not yet selectable; the quote action itself does not call the model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rollback tracks UTF-8 text files only; it does not cover processes, terminals, untracked files, binary files, or external services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extra folders do not widen the Agent sandbox; session delete is not reversible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The estimated "¥" and context detail values are approximations, not exact billing figures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimization sends the draft or selection plus the latest completed turn; prediction sends the latest completed turn. Disable the corresponding capability in settings if you do not want that.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Balance queries use the desktop client's stored credentials; the plugin itself does not store API keys; no telemetry is uploaded.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt; adds prompt, select-to-quote, rollback, workspace file editing, session management, usage/context and model-routing capabilities inside the official desktop UI. The code is MIT licensed, data is processed locally, and there is no telemetry upload. Details and the full changelog are in the repository README and CHANGELOG.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;npm: &lt;a href="https://www.npmjs.com/package/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>dsh</category>
      <category>deepseek</category>
    </item>
    <item>
      <title>DSH Agent Enhancer 0.3.2: prompts, rollback, token billing and Auto model routing for the DeepSeek Harness desktop</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Thu, 05 Nov 2026 14:37:39 +0000</pubDate>
      <link>https://dev.to/rebornace/dsh-agent-enhancer-032-prompts-rollback-token-billing-and-auto-model-routing-for-the-deepseek-264h</link>
      <guid>https://dev.to/rebornace/dsh-agent-enhancer-032-prompts-rollback-token-billing-and-auto-model-routing-for-the-deepseek-264h</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt;  is a plugin for the official DeepSeek Harness (DSH) desktop client, current version  &lt;strong&gt;0.3.2&lt;/strong&gt; , MIT licensed. It adds prompt history, one-click prompt optimization, next-prompt prediction, conversation &amp;amp; file rollback, token usage billing, per-account balance, context inspection with one-click compaction, and Auto model routing. All entry points live inside the official session and settings UI — no separate window, no client replacement.&lt;br&gt;
GitHub:  &lt;code&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/code&gt;  ｜ npm:  &lt;code&gt;dsh-agent-enhancer&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Capabilities at a glance
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recall a prompt already sent in this session&lt;/td&gt;
&lt;td&gt;Prompt history&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;↑↓&lt;/code&gt; to navigate, &lt;code&gt;Alt+R&lt;/code&gt; to search; Enter fills the draft, does not send&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A draft is too vague to execute&lt;/td&gt;
&lt;td&gt;Prompt optimization&lt;/td&gt;
&lt;td&gt;Fills in steps, scope and constraints; undoable; chips preserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Not sure what to ask next&lt;/td&gt;
&lt;td&gt;Next-prompt prediction&lt;/td&gt;
&lt;td&gt;Gray suggestion after a reply, &lt;code&gt;Tab&lt;/code&gt; to accept; one per turn&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to go back to a previous turn&lt;/td&gt;
&lt;td&gt;Conversation &amp;amp; file rollback&lt;/td&gt;
&lt;td&gt;Preview before confirming; conversation only or conversation + tracked files; undoable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to see token spend and account balance&lt;/td&gt;
&lt;td&gt;Token billing + per-account balance&lt;/td&gt;
&lt;td&gt;Local summary, estimated "¥" from official pricing; balances shown separately&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to inspect context usage&lt;/td&gt;
&lt;td&gt;Context ring + details + compaction&lt;/td&gt;
&lt;td&gt;Splits system prompt / tools / messages; one-click official &lt;code&gt;/compact&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prefer not to pick a model tier manually&lt;/td&gt;
&lt;td&gt;Auto routing&lt;/td&gt;
&lt;td&gt;Maps to Instant / Thinking / Pro; optional small-model classifier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Need to update the plugin&lt;/td&gt;
&lt;td&gt;In-app update check&lt;/td&gt;
&lt;td&gt;npm installs can be updated from settings&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Feature notes
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2wcmcfwg2hts9qpwh8fl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2wcmcfwg2hts9qpwh8fl.png" alt="DSH Agent Enhancer 0.3.2 feature overview" width="800" height="957"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Writing prompts: history, optimization, prediction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prompt history&lt;/strong&gt;: press &lt;code&gt;↑&lt;/code&gt; at the first line of the input box or &lt;code&gt;↓&lt;/code&gt; at the last line to browse prompts already sent in the currently loaded session; &lt;code&gt;Esc&lt;/code&gt; exits. &lt;code&gt;Alt+R&lt;/code&gt; opens search (on some environments &lt;code&gt;Ctrl+R&lt;/code&gt; also works). Enter only fills the draft — it never sends.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One-click optimization&lt;/strong&gt;: click the optimize button on the right side of the input. A vague draft is rewritten into a prompt with steps, scope and constraints; an already clear draft gets only minor edits. With a selection, only the selection is optimized. The result is undoable, and reference chips keep their content and order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Next-prompt prediction&lt;/strong&gt;: after each reply, a gray suggestion appears in the input; press &lt;code&gt;Tab&lt;/code&gt; to accept. At most one per turn, and it disappears as soon as you start typing or switch sessions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Rollback: go back to a previous turn
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Next to a message (or from the checkpoint timeline in the right sidebar), click &lt;strong&gt;Restore to here&lt;/strong&gt;. A preview shows what will be rolled back, which files are involved, and whether there are conflicts — nothing changes before you confirm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scope is &lt;strong&gt;conversation only&lt;/strong&gt; or &lt;strong&gt;conversation + tracked files&lt;/strong&gt;. After restore, that turn's user prompt is filled back into the draft, so you can edit and resend.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To revert, use &lt;strong&gt;Undo restore&lt;/strong&gt; in the input &lt;code&gt;+&lt;/code&gt; or &lt;code&gt;/&lt;/code&gt; menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restore only changes what is currently visible; the official session log and statistics stay intact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Out of scope: processes, terminals, untracked files, binary files, external services.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Usage &amp;amp; cost: billing and balance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click the &lt;strong&gt;Token usage&lt;/strong&gt; meter next to the session to open the right sidebar billing panel: input / output / cached-read token totals, trends over time, per-function share (history / optimize / predict / compaction / main chat), and per-model and per-call details. Time range: &lt;strong&gt;today / 7 days / 30 days / all time&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The estimated "&lt;strong&gt;¥&lt;/strong&gt;" value is computed from official pricing as a reference, not a billing receipt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under &lt;strong&gt;Settings → Models&lt;/strong&gt;, the DeepSeek account (Platform wallet) and API Key balance are shown separately, two decimal places, refreshable on click.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Context: occupancy, details, compaction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An &lt;strong&gt;occupancy ring&lt;/strong&gt; in the session shows how much of the context window is used.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click into the &lt;strong&gt;details&lt;/strong&gt;: system prompt / tools / messages listed separately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you need to free space, trigger the official &lt;strong&gt;compact&lt;/strong&gt; (&lt;code&gt;/compact&lt;/code&gt;) directly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Model routing: Auto tier selection
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Choose &lt;strong&gt;Auto&lt;/strong&gt; in the model list; auxiliary requests (optimize / predict / compaction) can also be set to Auto or pinned to a specific model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In settings, map Auto to &lt;strong&gt;Instant / Thinking / Pro&lt;/strong&gt; tiers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Default decisions use built-in Chinese/English heuristics. An optional small-model classifier can be enabled; when it fails, routing falls back to the heuristic and does not block the main request.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Maintenance: in-app update check
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For npm installs, check for updates directly in &lt;strong&gt;Settings → Built-in plugins → Agent Enhance&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local link installs are given manual step instructions instead.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Common usage
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Recalling an earlier prompt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a long session, &lt;code&gt;Alt+R&lt;/code&gt; to search by keyword, Enter to fill the draft, edit, then resend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Completing a vague draft&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Type a short request, click optimize, and get a prompt with inputs/outputs, edge cases and acceptance criteria before asking the agent to act.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Going back to a previous turn&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the agent went in the wrong direction, click &lt;strong&gt;Restore to here&lt;/strong&gt;, review the preview (conversation only or with files), confirm to go back; if you change your mind, use undo restore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checking cost distribution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the billing panel, inspect the 30-day token share by function and model, then move auxiliary requests onto a cheaper model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Handling high context usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the occupancy ring is high, inspect the breakdown in details, or run compaction.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install &amp;amp; compatibility
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Official desktop app (recommended)&lt;/strong&gt;: open &lt;strong&gt;Settings → Plugins&lt;/strong&gt;, search &lt;code&gt;dsh-agent-enhancer&lt;/code&gt; or "Agent Enhance", install, then fully quit and restart the desktop client.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt; (if you have the &lt;code&gt;dsh&lt;/code&gt; CLI):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dsh plugin --profile desktop add dsh-agent-enhancer@0.3.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The plugin targets the &lt;strong&gt;Desktop (&lt;/strong&gt;&lt;code&gt;desktop&lt;/code&gt;&lt;strong&gt;) profile&lt;/strong&gt;. Do not install into the &lt;code&gt;web&lt;/code&gt; profile — the command may report success, but the desktop client will not load it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compatibility: &lt;strong&gt;DSH Desktop 0.2.2-rc.1 and above&lt;/strong&gt; (&lt;code&gt;&amp;gt;=0.2.2-rc.1 &amp;lt;0.3.0-0&lt;/code&gt;), Node &lt;code&gt;^22.19.0 || &amp;gt;=24.0.0&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you previously installed the old package &lt;code&gt;dsh-composer-enhancer&lt;/code&gt;, uninstall it first.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quit all desktop windows and tray processes before installing / upgrading / uninstalling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;All capabilities are on by default and can be toggled individually in &lt;strong&gt;Settings → Built-in plugins → Agent Enhance&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Scope and known limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Supported environment: official DSH desktop client (desktop profile), version 0.2.2-rc.1+.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rollback does not cover processes, terminals, untracked files, binary files or external services; scope is conversation only, or conversation plus tracked text files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The estimated "¥" and context detail values are approximations, not exact billing figures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimization sends the draft or selection plus the latest completed turn; prediction sends the latest completed turn. Disable the corresponding capability in settings if you do not want that.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Balance queries use the desktop client's stored credentials; the plugin itself does not store API keys.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt; adds prompt, rollback, usage/context and model-routing capabilities inside the official desktop UI. The code is MIT licensed, data is processed locally, and there is no telemetry upload. Details and the full changelog are in the repository README and CHANGELOG.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;GitHub: &lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://github.com/rebornace/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;npm: &lt;a href="https://www.npmjs.com/package/dsh-agent-enhancer" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/dsh-agent-enhancer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>dsh</category>
      <category>deepseek</category>
      <category>opensource</category>
    </item>
    <item>
      <title>DSH Agent Enhancer: bringing write, edit &amp; rollback to the DeepSeek Harness desktop</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Tue, 03 Nov 2026 08:56:01 +0000</pubDate>
      <link>https://dev.to/rebornace/dsh-agent-enhancer-bringing-write-edit-rollback-to-the-deepseek-harness-desktop-21pj</link>
      <guid>https://dev.to/rebornace/dsh-agent-enhancer-bringing-write-edit-rollback-to-the-deepseek-harness-desktop-21pj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;An MIT-licensed plugin for the &lt;strong&gt;DeepSeek Harness (DSH) desktop client&lt;/strong&gt; that makes the official chat input area better at writing, editing and rolling back: &lt;strong&gt;prompt history · one-click prompt optimization · next-prompt prediction · conversation &amp;amp; file rollback&lt;/strong&gt; — all embedded in the official UI, no extra windows. It borrows the &lt;em&gt;interaction habits&lt;/em&gt; of mainstream agents (Claude Code / ChatGPT / Cursor) rather than re-implementing a whole product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub&lt;/strong&gt; — &lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;rebornace/dsh-agent-enhancer&lt;/a&gt; ｜ &lt;strong&gt;npm&lt;/strong&gt; — &lt;code&gt;dsh-agent-enhancer&lt;/code&gt; (v0.2.0, "Agent Enhance") ｜ MIT, listed on &lt;a href="https://github.com/awesome-dsh-plugin/awesome-dsh-plugin" rel="noopener noreferrer"&gt;awesome-dsh-plugin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; since v0.2.0 the package was renamed from &lt;code&gt;dsh-composer-enhancer&lt;/code&gt; to &lt;code&gt;dsh-agent-enhancer&lt;/code&gt;; if you still have the old package installed, uninstall it before installing the new one.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why
&lt;/h2&gt;

&lt;p&gt;If you've used Claude Code, ChatGPT or Cursor, you're probably used to: recalling a prompt you already sent and sending an edited version; turning a vague draft into something concrete and actionable with one click; the editor predicting your next question after a reply; and going back to an earlier state when the conversation — or the code — goes wrong.&lt;/p&gt;

&lt;p&gt;The official DeepSeek Harness desktop client's early input area had none of this: sent prompts were hard to retrieve, drafts were hand-typed, a wrong turn meant opening a new session, and broken files could only be rescued with Git or manual backups.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;dsh-agent-enhancer&lt;/code&gt; takes a deliberately narrow approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No fork, no patching the DSH core, no waiting for upstream PRs&lt;/strong&gt; — it uses the official plugin mechanism (Cordis + Typert RPC);&lt;/li&gt;
&lt;li&gt;It fills the &lt;strong&gt;write / edit / rollback&lt;/strong&gt; gap inside the official desktop UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workflow&lt;/th&gt;
&lt;th&gt;Pain point&lt;/th&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recall&lt;/td&gt;
&lt;td&gt;Sent prompts are gone forever&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Prompt history&lt;/strong&gt; (&lt;code&gt;↑↓&lt;/code&gt; + &lt;code&gt;Alt+R&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Draft&lt;/td&gt;
&lt;td&gt;Vague drafts are hard to execute&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Prompt optimization&lt;/strong&gt; (one-click rewrite, undoable)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reply&lt;/td&gt;
&lt;td&gt;You don't know what to ask next&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Next-prompt prediction&lt;/strong&gt; (gray text, &lt;code&gt;Tab&lt;/code&gt; to accept)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistakes&lt;/td&gt;
&lt;td&gt;Wrong turns can't be undone&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Conversation &amp;amp; file rollback&lt;/strong&gt; (checkpoints + undo restore)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Feature highlights
&lt;/h2&gt;

&lt;p&gt;All four features live in the official session input area and message stream — &lt;strong&gt;no extra window&lt;/strong&gt;. They are enabled by default, the UI language follows the desktop (&lt;code&gt;zh&lt;/code&gt; / &lt;code&gt;en&lt;/code&gt;), and each one can be toggled independently in &lt;strong&gt;Settings → Built-in plugins → Agent Enhance&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Prompt history — like a shell
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;↑&lt;/code&gt; on the first line / &lt;code&gt;↓&lt;/code&gt; on the last line cycles through the prompts you already sent in the current session; &lt;code&gt;Esc&lt;/code&gt; exits. &lt;code&gt;Alt+R&lt;/code&gt; opens history search (&lt;code&gt;Ctrl+R&lt;/code&gt; is kept where available), and &lt;strong&gt;Enter only fills the draft — it does not send&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scoped to the currently loaded session; drafts containing chips (reference blocks) are not accidentally triggered.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Prompt optimization — completes vague drafts, keeps clear ones minimal
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Optimize&lt;/strong&gt; on the right of the input area; with a selection, only the selection is optimized; &lt;strong&gt;Undo&lt;/strong&gt; is available if you don't like it.&lt;/li&gt;
&lt;li&gt;Vague or too-short drafts get execution steps, scope, constraints and structured-output requirements; drafts that are already clear receive only minimal edits.&lt;/li&gt;
&lt;li&gt;Chips/references and their order are preserved through &lt;code&gt;__DSH_REF_n__&lt;/code&gt; placeholders — undo also restores the reference structure.&lt;/li&gt;
&lt;li&gt;You can assign a cheaper model to optimization via the &lt;strong&gt;model pill&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Next-prompt prediction
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;After a reply, a gray suggestion appears; &lt;code&gt;Tab&lt;/code&gt; fills the draft (no auto-send). At most one per turn; it clears as soon as you start typing or switch sessions.&lt;/li&gt;
&lt;li&gt;The system prompt constrains it to predicting only the &lt;em&gt;next user prompt&lt;/em&gt; — it never generates an assistant reply.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Conversation &amp;amp; file rollback — preview, then undoable
&lt;/h3&gt;

&lt;p&gt;This is the heaviest feature, an attempt to align with Claude Code's &lt;code&gt;/rewind&lt;/code&gt; and Cursor checkpoints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A checkpoint (conversation + tracked-file snapshot) is written locally at the end of every turn;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Restore to here&lt;/strong&gt; next to a message opens a &lt;strong&gt;preview&lt;/strong&gt; (what will be rolled back, affected files, conflicts) — nothing changes before confirmation. Scope is &lt;strong&gt;conversation only&lt;/strong&gt; or &lt;strong&gt;conversation + tracked files&lt;/strong&gt;; the target turn's user prompt is restored into the editable draft, not auto-sent;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Undo restore&lt;/strong&gt; (input &lt;code&gt;+&lt;/code&gt; or &lt;code&gt;/&lt;/code&gt; menu) reverts the latest restore;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explicit boundaries:&lt;/strong&gt; processes, terminals, untracked files, databases and network requests are not restored; the preview lists these gaps — it does not claim to be a "full checkpoint".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Model pill &amp;amp; cost.&lt;/strong&gt; Optimize and Predict each have a model pill — "Follow session" by default, or pick a provider / model / reasoning level. The plugin itself is &lt;strong&gt;MIT (free)&lt;/strong&gt;; what you save is &lt;strong&gt;model API cost&lt;/strong&gt;: route the frequent auxiliary calls to a lightweight model while the main conversation keeps using your flagship model.&lt;/p&gt;




&lt;h2&gt;
  
  
  When it pays off
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Long sessions:&lt;/strong&gt; 30 turns in, you need the key prompt from turn 8 — &lt;code&gt;Alt+R&lt;/code&gt; to search, &lt;code&gt;Enter&lt;/code&gt; to fill, edit, resend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vague drafts:&lt;/strong&gt; you know what you want but can't structure it — click Optimize for steps and constraints; Undo if needed; chips survive intact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong turns:&lt;/strong&gt; the agent changed several files in the wrong direction — Restore to here after previewing; undo restore if it was a mistake.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost control:&lt;/strong&gt; route optimize/predict to a lightweight model, keep the flagship model for the main conversation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In one line: the official input area goes from "a box that sends messages" to a workbench — &lt;strong&gt;write&lt;/strong&gt; (history + prediction), &lt;strong&gt;edit&lt;/strong&gt; (optimization + undo), &lt;strong&gt;rollback&lt;/strong&gt; (checkpoints + undo restore) — all local, all inside the official UI, without touching DSH's append-only session log.&lt;/p&gt;




&lt;h2&gt;
  
  
  How it works under the hood
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3tqq8olejdncqisgzvo8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3tqq8olejdncqisgzvo8.png" alt="dsh-agent-enhancer-architecture" width="800" height="1292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plugin shape:&lt;/strong&gt; &lt;code&gt;@deepseek-ai/cordis&lt;/code&gt; plugin system; &lt;code&gt;dsh.bundle.patch&lt;/code&gt; injects the session UI bundle; &lt;code&gt;slots&lt;/code&gt; add buttons, overlays and message nodes; plugin ID &lt;code&gt;agent-enhancer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two sides:&lt;/strong&gt; &lt;code&gt;src/host/&lt;/code&gt; handles models, RPC and checkpoints; &lt;code&gt;src/client/&lt;/code&gt; handles UI and the &lt;code&gt;Coordinator&lt;/code&gt; state machine (edit / history / search / predict / optimize); requests carry an &lt;strong&gt;owner&lt;/strong&gt; guard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model routing:&lt;/strong&gt; resolves the session model choice; optimize &lt;code&gt;maxTokens=1200&lt;/code&gt;, predict &lt;code&gt;120&lt;/code&gt;; streamed output is validated by &lt;code&gt;BlockAssembler&lt;/code&gt; before being written back.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checkpoints:&lt;/strong&gt; committed at the end of each turn; phases &lt;code&gt;preparing → session-flushed → workspace-captured → committed&lt;/code&gt;; ≤20 per session, ≤2 MiB per file (plain text); excludes &lt;code&gt;.git&lt;/code&gt;, &lt;code&gt;node_modules&lt;/code&gt;, &lt;code&gt;.env&lt;/code&gt; / &lt;code&gt;.env.*&lt;/code&gt;, build dirs, binaries, symlinks and paths outside the workspace; carries a &lt;code&gt;schemaVersion&lt;/code&gt; — incompatible formats refuse restore; legacy path is auto-migrated since v0.2.0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transactional rollback:&lt;/strong&gt; a safety snapshot before restoring; files first, journal compensation on failure, no appended conversation events; pending journals are processed on the next startup; &lt;strong&gt;conflict detection&lt;/strong&gt; — if a file hash differs from the checkpoint's &lt;code&gt;afterHash&lt;/code&gt;, the whole restore is refused rather than silently overwriting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy:&lt;/strong&gt; history never calls a model; optimization sends only "draft/selection + latest turn"; prediction sends only the latest turn; cache is per-session memory; audit events (&lt;code&gt;plugin:agent-enhancer/request&lt;/code&gt;) are local only — &lt;strong&gt;no telemetry upload&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quality:&lt;/strong&gt; ~30 Vitest files cover checkpoints, rollback transactions, RPC, structured references, components and locale.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Quick start
&lt;/h2&gt;

&lt;p&gt;Stop all Desktop windows and tray processes before install / upgrade / uninstall. The plugin targets the &lt;strong&gt;Desktop / &lt;code&gt;desktop&lt;/code&gt; profile&lt;/strong&gt; — don't install into the &lt;code&gt;web&lt;/code&gt; profile (the command may report success while the desktop shows nothing).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;In-app (recommended):&lt;/strong&gt; DSH desktop → &lt;strong&gt;Settings → Plugins&lt;/strong&gt;, search &lt;code&gt;dsh-agent-enhancer&lt;/code&gt; or "Agent Enhance", install, fully quit and restart Desktop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dsh-market (optional):&lt;/strong&gt; if you want a standalone marketplace UI / one-click upgrades, first install the community market &lt;a href="https://github.com/dsh-market/dsh-market" rel="noopener noreferrer"&gt;dsh-market&lt;/a&gt; (Settings → Plugins → search &lt;code&gt;dshmarket&lt;/code&gt;), then install the plugin from the &lt;strong&gt;Plugins Marketplace&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CLI:&lt;/strong&gt; &lt;code&gt;dsh plugin --profile desktop add dsh-agent-enhancer@0.2.0&lt;/code&gt; (version optional).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local dev:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;corepack pnpm install --frozen-lockfile
corepack pnpm build
dsh plugin --profile desktop add ((Resolve-Path .).Path)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Compatibility:&lt;/strong&gt; DSH &lt;code&gt;&amp;gt;=0.2.1-rc.5 &amp;lt;0.3.0-0&lt;/code&gt; (&lt;code&gt;0.2.1-rc.3&lt;/code&gt; won't load); Node &lt;code&gt;^22.19.0 || &amp;gt;=24.0.0&lt;/code&gt;. If you previously installed &lt;code&gt;dsh-composer-enhancer&lt;/code&gt;, uninstall it first.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;DeepSeek Harness is already capable on the model side; &lt;code&gt;dsh-agent-enhancer&lt;/code&gt; adds the &lt;strong&gt;interaction mindset&lt;/strong&gt; on the session side — write, edit and rollback embedded in the desktop through the official plugin mechanism. MIT, no telemetry, local-first. Try it, and issues / PRs are welcome.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/rebornace/dsh-agent-enhancer" rel="noopener noreferrer"&gt;rebornace/dsh-agent-enhancer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Changelog:&lt;/strong&gt; &lt;a href="https://github.com/rebornace/dsh-agent-enhancer/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;CHANGELOG.md&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>deepseek</category>
      <category>dsh</category>
      <category>ai</category>
    </item>
    <item>
      <title>Freeze a Real Run into a Corpus: How Baize Scores Agents with Deterministic Evidence</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Wed, 28 Oct 2026 01:51:36 +0000</pubDate>
      <link>https://dev.to/rebornace/freeze-a-real-run-into-a-corpus-how-baize-scores-agents-with-deterministic-evidence-1hpa</link>
      <guid>https://dev.to/rebornace/freeze-a-real-run-into-a-corpus-how-baize-scores-agents-with-deterministic-evidence-1hpa</guid>
      <description>&lt;p&gt;Judging an agent by "how good the final reply sounds" is rarely enough.&lt;/p&gt;

&lt;p&gt;What teams actually worry about happens at the tool-call layer. After changing a prompt, swapping a model, or tweaking a tool, the replies may look better while the agent quietly starts to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hit "approve" on a ticket it hasn't fully read;&lt;/li&gt;
&lt;li&gt;call a write endpoint it should never touch;&lt;/li&gt;
&lt;li&gt;run "check inventory, then place order" in the wrong order;&lt;/li&gt;
&lt;li&gt;trigger an action twice — or, when it should act, do nothing at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of that shows up by reading the streaming reply. Baize evaluates agents on the &lt;strong&gt;tool-call timeline&lt;/strong&gt; instead: not what the model said, but what it actually did — and by default the scoring is deterministic code rules, not an LLM judge.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbp19y48rglwzet46ej1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbp19y48rglwzet46ej1e.png" alt="Baize agent behavior evaluation at a glance" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The corpus comes from real runs, not hand-written fixtures
&lt;/h2&gt;

&lt;p&gt;The first step of evaluation is not writing test cases out of thin air — it is turning &lt;strong&gt;real runs that already happened into replayable corpus&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A run leaves a complete event stream in the runtime (tool calls, tool results, human waits, etc.). Baize exposes an online sampling pipeline in the settings page:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Find candidates&lt;/strong&gt;: filter historical runs by time window, run status, duration, and whether they contain a certain event type. The store fetches up to about &lt;strong&gt;500&lt;/strong&gt; rows in one pass; after filtering, roughly the first &lt;strong&gt;100&lt;/strong&gt; are kept as the candidate pool (current defaults, adjustable via page/API parameters).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sample deterministically&lt;/strong&gt;: sort candidates by a stable hash of &lt;code&gt;seed + run ID&lt;/code&gt;, take the first N — about &lt;strong&gt;10&lt;/strong&gt; per batch by default, hard cap &lt;strong&gt;20&lt;/strong&gt;. The same seed always picks the same batch, so the corpus is reproducible instead of jittering every run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ingest into a case&lt;/strong&gt;: freeze the run's full event stream plus its input snapshot into one evaluation case (EvalCase). The same run is ingested only once by default; repeated sampling skips it, and you can explicitly replace when needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fill in expectations&lt;/strong&gt;: a case enters as a &lt;strong&gt;draft&lt;/strong&gt;; once you state what this run "should have done," it upgrades to &lt;strong&gt;confirmed&lt;/strong&gt; — and &lt;strong&gt;only confirmed cases are scorable&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What gets collected this way is not made-up toy dialogue but paths that actually ran in production — the tickets to read, the approvals to go through, the downstream calls that matter, all still in the events.&lt;/p&gt;

&lt;p&gt;The same "assertion contract" has two more entry points that share the same scoring semantics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;EVAL.yaml&lt;/code&gt;&lt;/strong&gt; next to a skill's directory, for live evaluation of the skill;&lt;/li&gt;
&lt;li&gt;the repo script &lt;strong&gt;&lt;code&gt;scripts/evidence-eval&lt;/code&gt;&lt;/strong&gt;, for offline replay or CI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rest of this article follows the settings-page corpus as the main line and ties all three entry points together at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. A case is a set of behavior assertions
&lt;/h2&gt;

&lt;p&gt;The core of a case is not a "reference answer text" but a set of assertions about tool behavior (fields use snake_case in JSON/YAML):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Required reads&lt;/td&gt;
&lt;td&gt;&lt;code&gt;required_reads&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Read-only tools that must have succeeded before any write&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consequential&lt;/td&gt;
&lt;td&gt;&lt;code&gt;consequential&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Side-effect actions that must occur; "any one of" via &lt;code&gt;expect_consequential_any&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chain&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;chain&lt;/code&gt; (V2)&lt;/td&gt;
&lt;td&gt;"A must succeed, then B must appear afterwards"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forbidden tools&lt;/td&gt;
&lt;td&gt;&lt;code&gt;forbid_tools&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tools that must never be called&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Arg contains&lt;/td&gt;
&lt;td&gt;&lt;code&gt;arg_contains&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A tool call's arguments must contain a certain substring&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Downstream state&lt;/td&gt;
&lt;td&gt;&lt;code&gt;expect_state&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Compare against a downstream ticket snapshot (or a live state check) at scoring time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The safety principle is simple: &lt;strong&gt;read first, then write.&lt;/strong&gt; Before a side-effecting write happens, the read-only queries it depends on must have completed successfully.&lt;/p&gt;

&lt;p&gt;When filling expectations in the UI, protocol version, required reads, and consequential are enough to score; finer assertions — forbidden tools, arg contains, chain, downstream state — can be maintained in the exported JSON or updated via the management API.&lt;/p&gt;

&lt;p&gt;One note on the chain fields: the pair is named &lt;code&gt;after&lt;/code&gt; / &lt;code&gt;before&lt;/code&gt;, with the semantics — &lt;strong&gt;&lt;code&gt;after&lt;/code&gt; must succeed first, and then &lt;code&gt;before&lt;/code&gt; must appear later on the timeline&lt;/strong&gt;. &lt;code&gt;before&lt;/code&gt; here is a code field name, not "happens before" in the literal sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Scoring: rebuild the tool timeline from the event stream
&lt;/h2&gt;

&lt;p&gt;Scoring does not call an LLM judge. It re-assembles the frozen event stream into an ordered &lt;strong&gt;tool-call timeline&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;llm.tool_call&lt;/code&gt;: register one call (name, arguments);&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tool.result&lt;/code&gt;: attach that call's result and whether it errored;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;hitl.waiting&lt;/code&gt;: mark that it was waiting on human approval.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then assertions are applied to the timeline one by one. Whether a run passes comes down to whether any failure code fired:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Code&lt;/th&gt;
&lt;th&gt;Trigger (plain language)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;BSR&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Required reads were not all done&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PAR&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Acted before reading, or wrote in a read-only scenario&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;NO_ACTION&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;None of the expected consequential actions happened&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;MULTI&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;More than one consequential action (mainly V1; one is usually expected)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GAP&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Chain broken: the required "A then B" order did not appear&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;FORBID&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;A forbidden tool was called&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ARG&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tool arguments missed the required content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;STATE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Downstream ticket snapshot missing or mismatched&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;BAD_PROTOCOL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Unrecognized protocol version&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;TIMEOUT&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;The run status used for scoring was marked as timed out&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Pass = zero failure codes.&lt;/strong&gt; The same events plus the same assertions always produce the same score: no judge-model noise, no scoring tokens consumed, safe to replay inside any automation or CI.&lt;/p&gt;

&lt;p&gt;Optionally, a confirmed case can run a &lt;strong&gt;live state check&lt;/strong&gt;: read-only fetch of the current downstream ticket snapshot (mock or real), compare against expectations, and re-score — useful when you want to verify the latest state on top of a snapshot.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Assertion protocols follow business maturity
&lt;/h2&gt;

&lt;p&gt;A case carries a protocol version (V0 / V1 / V2), with strictly increasing strictness:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;V0 (read-only probe)&lt;/strong&gt;: all required reads must complete, and no write action may occur — checks whether this scenario is being treated as a pure query;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;V1 (behavior closure)&lt;/strong&gt;: at least one expected consequential action must fire; no acting before reads, no multiple consequentials;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;V2 (ordering constraints)&lt;/strong&gt;: on top of V1, add chains, e.g. "check inventory before creating an order."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same corpus can be cut to a stricter protocol as the business grows from read-only guardrail to side-effecting closure — the assertions tighten with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Making the automatic scorer itself trustworthy
&lt;/h2&gt;

&lt;p&gt;Deterministic scoring is not born correct. Baize adds a &lt;strong&gt;human calibration&lt;/strong&gt; layer:&lt;/p&gt;

&lt;p&gt;For each already-scored confirmed case, a human can mark "agree / disagree" and leave a note; the system aggregates an agreement rate (fraction where the automatic verdict matches the human one). After tightening or relaxing the scoring rules, watch whether this rate drops — the automatic scorer itself is under continuous review.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. In practice: sample in the UI, export the results
&lt;/h2&gt;

&lt;p&gt;It is lightweight: pick the time window and filters in the settings page, choose draft mode or a template-driven score mode, and one batch ingests a set of real runs into corpus. Draft mode only collects; you fill expectations and score later. With a template, you can score immediately — suited to when you already know what "this kind of failure" looks like.&lt;/p&gt;

&lt;p&gt;Each case also exports to JSON with the same semantics as evidence-eval (case assertions + event stream in one package) for offline replay in external scripts or CI. The repo's PowerShell script splits &lt;code&gt;case&lt;/code&gt; and &lt;code&gt;events&lt;/code&gt; by its input parameters, or you can reuse the same Go scoring logic directly.&lt;/p&gt;

&lt;p&gt;From failed or half-successful runs, the settings page also offers &lt;strong&gt;skill-draft&lt;/strong&gt;: turn the trajectory into a skill draft, then install it after human review — evaluation is not only scoring; it can also distill bad paths into reusable skills and conventions.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Three entry points, one evidence contract
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Entry point&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Settings "evaluation corpus"&lt;/td&gt;
&lt;td&gt;Sample real runs, fill expectations, re-score, human review, export&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Skill-side &lt;code&gt;EVAL.yaml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Lightweight evaluation contract bundled with a skill, live-runnable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;scripts/evidence-eval&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Offline fixtures, scripted batch runs, local or CI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The common ground: &lt;strong&gt;judge the tool timeline, speak in failure codes, and by default don't use an LLM as the judge.&lt;/strong&gt; After changing prompts, models, or tool routing, look at whether this corpus regresses first — far more stable than staring at a single reply.&lt;/p&gt;




&lt;p&gt;Baize is a team-facing, self-hosted AI Agent runtime: a single Go binary, MIT-licensed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/rebornace/baize" rel="noopener noreferrer"&gt;https://github.com/rebornace/baize&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://rebornace.github.io/baize" rel="noopener noreferrer"&gt;https://rebornace.github.io/baize&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Turning "did the agent move wrongly" from eyeballing logs into a replayable, repeatable regression corpus with a visible human-agreement rate is how runtime behavior is actually held in line.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>opensource</category>
      <category>go</category>
    </item>
    <item>
      <title>Restart-Safe and Duplicate-Free: How Baize Makes Long-running Agent Runs Resumable</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Mon, 26 Oct 2026 02:47:28 +0000</pubDate>
      <link>https://dev.to/rebornace/restart-safe-and-duplicate-free-how-baize-makes-long-running-agent-runs-resumable-2275</link>
      <guid>https://dev.to/rebornace/restart-safe-and-duplicate-free-how-baize-makes-long-running-agent-runs-resumable-2275</guid>
      <description>&lt;p&gt;An agent &lt;strong&gt;Run&lt;/strong&gt; is not a single HTTP request. It can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;call a dozen tools in a row and run for several minutes;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;hit a write action that needs human approval — and that wait can last hours;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;be triggered by a schedule, e.g. a daily 9 AM summary;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;after grouped subtasks are enabled, spawn a bounded number of &lt;strong&gt;group-scoped child runs&lt;/strong&gt; (one level only), isolating the tool surfaces and approval flows of different business systems;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;after finishing, push the result back to IM or call back a business system.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Along this chain, processes restart, scale out to multiple replicas, downstream APIs time out, and browsers disconnect. If a Run were just a goroutine in memory, a pending channel, then any hiccup would either lose the task or run it twice.&lt;/p&gt;

&lt;p&gt;Baize handles this class of &lt;strong&gt;runtime reliability&lt;/strong&gt; in the runtime layer. The core idea is one sentence: &lt;strong&gt;make a Run a first-class row in the database, not a goroutine in memory.&lt;/strong&gt; The queue and workers can restart at any time or scale out freely; "no loss, no duplicate" is guaranteed by database state, leases, and a few background daemon loops.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The numbers here (8 workers, a 60s lease, etc.) are current defaults and are configurable; the mechanisms do not depend on any specific cloud vendor or middleware.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fli7ux7jjvuxubq4xvzvs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fli7ux7jjvuxubq4xvzvs.png" alt="baize-longtask-resilience-diagram" width="800" height="1274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Every trigger becomes a Job; the Run row is the source of truth
&lt;/h2&gt;

&lt;p&gt;All trigger sources — chat, webhooks, IM channel messages, schedules, human approvals, child-run receipts — are unified into a single &lt;strong&gt;Job&lt;/strong&gt; enqueued into the queue. Think of it as a work order asking the runtime to do something. There are three job types:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Normal run&lt;/td&gt;
&lt;td&gt;Start a chat turn, process a channel message, a scheduled trigger, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Approval resume&lt;/td&gt;
&lt;td&gt;A Run was paused on human approval (or login); once a human approves/rejects, continue it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Child receipt&lt;/td&gt;
&lt;td&gt;A child run finished and wakes its parent with a structured result.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At the same time, every Run has a row in the primary datastore, and the state machine can be read intuitively as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(occasionally) queued → running → succeeded / failed / cancelled / rejected
running ⇄ waiting for external signal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A newly created Run from chat usually goes straight to &lt;strong&gt;running&lt;/strong&gt;; &lt;strong&gt;queued&lt;/strong&gt; mostly appears in crash recovery and re-enqueue scenarios. The important state is the middle one: &lt;strong&gt;waiting for external signal&lt;/strong&gt; (internal name &lt;code&gt;waiting_human&lt;/code&gt;). Whether a write needs approval, a downstream login is required, or a parent is waiting for a child receipt, the Run enters this single suspended state; the reason (approval / login / child receipt) is stored in the suspension payload instead of being split into many incompatible state names.&lt;/p&gt;

&lt;p&gt;Workers pull Jobs off the queue with a default concurrency of &lt;strong&gt;8&lt;/strong&gt;. The queue, event bus, rate limiter, primary datastore, and blob storage all go through &lt;strong&gt;swappable drivers&lt;/strong&gt;: implement the unified interface, register it, and change the driver name in config. The built-in drivers are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Primary datastore:&lt;/strong&gt; SQLite by default, plus Postgres and in-memory;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Queue / event bus / rate limiter:&lt;/strong&gt; in-memory by default, Redis for multi-replica setups;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Blob:&lt;/strong&gt; local files, S3, in-memory.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The architecture is &lt;strong&gt;not tied to&lt;/strong&gt; any particular database or message middleware. If a team already runs MySQL, Kafka, etc., they can extend the same driver contract without touching the orchestration core — the built-in implementations are "a subset that works today," not an upper bound.&lt;/p&gt;

&lt;p&gt;One design tradeoff runs through the whole article: &lt;strong&gt;the queue only carries delivery; it is not the source of truth. The Run row in the primary datastore always is.&lt;/strong&gt; All recovery logic reduces to "query the DB, change state, then re-enqueue."&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Lease + heartbeat: how one Run executes exactly once across replicas
&lt;/h2&gt;

&lt;p&gt;After scaling out, the same Job may be visible to multiple replicas at once. Baize uses a &lt;strong&gt;database lease&lt;/strong&gt; for atomic claiming, not an in-process lock in the worker. Before actually starting, the executor tries to "lease" the Run, semantically equivalent to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;UPDATE&lt;/span&gt; &lt;span class="n"&gt;runs&lt;/span&gt; &lt;span class="k"&gt;SET&lt;/span&gt; &lt;span class="n"&gt;lease_until&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;ttl&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="k"&gt;IN&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'queued'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'running'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'waiting_human'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lease_until&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="n"&gt;lease_until&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The update only matches when the lease is empty or already expired, so only one claim succeeds. Default parameters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Lease TTL is &lt;strong&gt;60 seconds&lt;/strong&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;During execution, a heartbeat renews it roughly every &lt;strong&gt;20 seconds&lt;/strong&gt; (one third of the TTL), proving "I'm alive and still running";&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The lease is released when execution finishes;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If claiming fails (another replica holds a valid lease), the worker skips it and does nothing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result: even if the same Run is delivered to multiple replicas due to re-enqueue, only one actually executes it.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Reconciler: orphan Runs auto-resume after a worker crash
&lt;/h2&gt;

&lt;p&gt;When a worker crashes, the Runs it claimed may still be stuck in &lt;code&gt;running&lt;/code&gt;, with the lease still under its name. A &lt;strong&gt;reconciler&lt;/strong&gt; covers this.&lt;/p&gt;

&lt;p&gt;On startup it runs one scan immediately, then scans roughly every &lt;strong&gt;15 seconds&lt;/strong&gt;. Each round:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Finds orphan Runs still in &lt;code&gt;queued&lt;/code&gt;/&lt;code&gt;running&lt;/code&gt; whose lease has expired (or whose creation is more than about &lt;strong&gt;30 seconds&lt;/strong&gt; old and unclaimed);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Re-enqueues a "normal run" job for each orphan;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Handles about &lt;strong&gt;100&lt;/strong&gt; per batch, leaving the rest to the next round.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The 30-second grace window avoids catching normal Runs that were just created and not yet claimed, reducing false positives.&lt;/p&gt;

&lt;p&gt;Note: Runs stuck in "waiting for external signal" are &lt;strong&gt;not&lt;/strong&gt; treated as orphans and forcefully re-run — they are waiting for approval, login, or a child receipt and go through dedicated resume jobs.&lt;/p&gt;

&lt;p&gt;Why is there no double execution? Two layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A healthy running Run keeps heartbeating its lease, so the reconciler never picks it up;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even if something is re-enqueued in an extreme case, the execution entry has three gates: already in a terminal state → skip; waiting on a human but received a normal-run job → skip; failed to acquire a lease → skip.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Effect: after a process crash, the task usually resumes from its DB breakpoint within one reconcile cycle, without double-starting.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Shutdown doesn't kill in-flight work; approvals survive restarts
&lt;/h2&gt;

&lt;p&gt;What happens to in-flight Runs during a deploy restart?&lt;/p&gt;

&lt;p&gt;Each Job runs on an &lt;strong&gt;independent context&lt;/strong&gt;, deliberately not tied to the "pull new jobs" lifecycle. On shutdown, the worker stops taking new work first and allows about a &lt;strong&gt;5-second&lt;/strong&gt; grace window: short jobs finish if possible; Runs long-paused on approval may lose their in-process wait goroutine, but the row in the primary DB still says "waiting for external signal." After restart, a cold-recovery path reconnects, rather than depending on a goroutine that lives forever.&lt;/p&gt;

&lt;p&gt;Human approval is the most extreme wait in long tasks — it can span hours or days. Baize covers it with two paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Same-process hot path:&lt;/strong&gt; while someone is still waiting for this Run on this host, an approval wakes it directly without re-acquiring a lease;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-restart cold path:&lt;/strong&gt; the process has changed and the in-process waiter is gone; the approval is re-enqueued as an "approval resume" job, which acquires a lease and continues from the suspended state in the DB.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After grouped subtasks are enabled, the parent also enters "waiting for external signal," with the reason being "waiting for a child receipt"; when the child finishes, a "child receipt" job wakes the parent. Child runs are an &lt;strong&gt;optional, one-level-only&lt;/strong&gt; capability, with a concurrency cap on active children per parent (the current implementation allows at most &lt;strong&gt;2&lt;/strong&gt; active child runs) — meant to isolate different business systems' tool surfaces and approvals, not to grow into an infinite fan-out of generic sub-agent trees.&lt;/p&gt;

&lt;p&gt;Also, when entering a human wait, the worker &lt;strong&gt;releases its slot&lt;/strong&gt;: it no longer holds a worker slot idle, leaving concurrency for tasks that can still make progress; after the human approves, the run cold-resumes.&lt;/p&gt;

&lt;p&gt;Every job is wrapped in panic recovery on the outside: success, failure, and errors all ack the message, so a poison message never jams the queue.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Frontend disconnect doesn't lose the stream: numbered, replayable events
&lt;/h2&gt;

&lt;p&gt;A long task is streaming: thoughts, tool calls, and incremental text are continuously emitted. Backgrounding a tab or network jitter can drop the SSE connection.&lt;/p&gt;

&lt;p&gt;Baize writes every event to an event table, and each frame pushed to the frontend carries a monotonically increasing sequence number. On reconnect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It prefers the standard &lt;code&gt;Last-Event-ID&lt;/code&gt; header, and also supports &lt;code&gt;?after=N&lt;/code&gt;;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It replays the missing events in order from that sequence number;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the Run reaches a terminal state, one final end frame is emitted.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Between replicas, a lightweight event bus carries only a &lt;strong&gt;wake-up nudge&lt;/strong&gt; ("this Run has new events") — never the payload. The payload is always re-read from the primary DB by sequence number, so any replica can continue serving the same Run. A lost nudge is harmless: reconnect or periodic fallback fetch still fills in by sequence number.&lt;/p&gt;

&lt;p&gt;Refreshing the page, reconnecting, or even landing on a different replica — the process and results are never lost.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Scheduled tasks: periodic triggers without duplicates or missed cycles
&lt;/h2&gt;

&lt;p&gt;Chat scheduled tasks (once / daily / weekly) are essentially unattended long-task triggers. Each task is persisted in the DB with state (active / paused / completed), the next fire time, and a placeholder field for "which run is currently in flight."&lt;/p&gt;

&lt;p&gt;The schedule scan runs roughly every &lt;strong&gt;15 seconds&lt;/strong&gt;; on startup it first clears stale "placeholder intermediate states" left by an abnormal shutdown, so a fake placeholder never blocks later cycles. Each round does three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Release terminal placeholders:&lt;/strong&gt; if the run pointed to by the placeholder has finished, free the slot, so a long-completed Run never blocks future cycles forever;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Advance periodic time:&lt;/strong&gt; for daily/weekly tasks, even if the previous round is still running, once the next time point arrives, advance "next fire" forward first — avoiding a backlog storm after a long task ends;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Atomically claim due tasks:&lt;/strong&gt; use a conditional update to grab a task that is "due and idle," then start a new Run. Once-only tasks are marked completed; periodic tasks write back the next time.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The supporting fallbacks also live in the DB: failing to start a Run releases the placeholder and records the error; times are computed in IANA time zones; each account has an active-schedule cap (default &lt;strong&gt;20&lt;/strong&gt;). Atomic placeholders, terminal release, and startup cleanup work together to prevent duplicate triggers at the same moment, and to ensure a crash never permanently skips a later cycle.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Result delivery: the transactional outbox and backoff
&lt;/h2&gt;

&lt;p&gt;When a Run finishes, the result must be pushed back to IM or a business webhook. If the process crashes between "generating the reply" and "sending the HTTP request," or the downstream returns a temporary 5xx, the message must not be lost.&lt;/p&gt;

&lt;p&gt;Baize uses a &lt;strong&gt;transactional outbox&lt;/strong&gt; for channel outbound: it first writes the message to an outbox table keyed by an idempotent delivery key, then a separate deliverer sends it — generation and delivery are decoupled.&lt;/p&gt;

&lt;p&gt;The deliverer pulls a batch of due messages every second (or when woken), about 20 per batch:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A &lt;code&gt;2xx&lt;/code&gt; response → marked delivered;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Network errors, &lt;code&gt;429&lt;/code&gt;, &lt;code&gt;5xx&lt;/code&gt; → exponential backoff (1s, 2s, 4s… capped around &lt;strong&gt;60s&lt;/strong&gt;) then retry;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Non-retryable errors, or exceeding the max retry count → dead letter, resettable manually in the UI to redeliver.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Large objects like images and attachments are written to Blob first (local files by default, switchable to S3; also a swappable driver), and the outbox stores only the reference — never stuffing binary into the queue table. Business-side webhook notifications have the same reliable delivery and backoff. HTTP plugin callbacks write their events back to the Run's trail through the event-persistence path, which is a separate line from the channel outbox — both emphasize "persist first, then send outward," but they should not be mixed into the same box.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. The engine layer also holds context for long tasks
&lt;/h2&gt;

&lt;p&gt;So far this is the &lt;strong&gt;runtime&lt;/strong&gt;: don't lose tasks, don't double them, don't block the process while waiting. Long tasks have another side — long conversations, huge tool results, occasional model timeouts — which is handled mainly in the &lt;strong&gt;execution engine&lt;/strong&gt;, orthogonal to the queue/lease and equally transparent to business code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When turns pile up, do rolling summaries, and optionally project "key points of the long conversation" (only changing what the model sees as input, not the original messages);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Especially large tool results or pastes can be offloaded to the session workspace, so the model side only gets a preview and a path, reading back segments on demand;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model-call failures retry and fall back; tool timeouts can be split; read-only tools in the same turn run in parallel;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Human waits release the worker slot (see section 4), so one approval doesn't fill all concurrency.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The two layers fit together as: &lt;strong&gt;the runtime guarantees "this task still exists and can resume"; the engine guarantees "it can resume, and the context holds."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. One table: failure scenarios and their guards
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Failure scenario&lt;/th&gt;
&lt;th&gt;Mechanism&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Same Run seen by multiple replicas at once&lt;/td&gt;
&lt;td&gt;DB-backed CAS lease&lt;/td&gt;
&lt;td&gt;Only one replica executes it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Worker crash, Run stuck in &lt;code&gt;running&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Lease expiry + periodic reconciler scan&lt;/td&gt;
&lt;td&gt;Auto re-enqueued and resumed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deploy / process shutdown&lt;/td&gt;
&lt;td&gt;Job-independent context + short grace + DB source of truth&lt;/td&gt;
&lt;td&gt;Short in-flight jobs finish; long waits recover from DB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Process restart during an hours-long approval&lt;/td&gt;
&lt;td&gt;Suspended state persisted + approval-resume job&lt;/td&gt;
&lt;td&gt;Continues from the breakpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parent restarted when a child finishes&lt;/td&gt;
&lt;td&gt;Suspended state persisted + child-receipt job&lt;/td&gt;
&lt;td&gt;Parent/child results not lost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Browser disconnect, refresh, replica switch&lt;/td&gt;
&lt;td&gt;Event sequence + reconnect replay (plus fallback fetch)&lt;/td&gt;
&lt;td&gt;Process and results not lost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Crash at the moment a schedule fires&lt;/td&gt;
&lt;td&gt;Atomic placeholder + startup cleanup of intermediate state&lt;/td&gt;
&lt;td&gt;No duplicates, no missed cycles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Downstream 5xx / timeout / rate limit&lt;/td&gt;
&lt;td&gt;Outbox + exponential backoff + dead letter&lt;/td&gt;
&lt;td&gt;Outbound replies not lost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unparseable poison message in the queue&lt;/td&gt;
&lt;td&gt;Deserialization failure acks directly&lt;/td&gt;
&lt;td&gt;Never blocks later jobs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  10. Reliability lives in the runtime
&lt;/h2&gt;

&lt;p&gt;These mechanisms are mostly transparent to the people writing agents and configuring skills on top: they face chat, tools, and approvals, without having to write their own retry, recovery, and dedup.&lt;/p&gt;

&lt;p&gt;A single machine can use the default SQLite and get "restart-resumable, wait-continuable" without first standing up a full middleware stack. When you need to scale out, switch the queue/event bus to the existing Redis driver, switch the primary DB to Postgres, or extend the driver contract to the team's own databases and messaging systems — &lt;strong&gt;the same execution code still holds.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For team-facing agents, the real dividing line is rarely whether a single "think → choose tool → execute" loop works. It's this: when the agent is attached to real business systems, must wait for human approval, must run on a schedule, and must push results back across IM — after a process restart or a network hiccup, are the results still deterministic? Keeping these concerns in the runtime layer is what lets the upper layers focus on the business itself.&lt;/p&gt;




&lt;p&gt;Baize is a team-facing, self-hosted AI Agent runtime: a single Go binary, MIT-licensed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Source: &lt;a href="https://github.com/rebornace/baize" rel="noopener noreferrer"&gt;https://github.com/rebornace/baize&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Docs: &lt;a href="https://rebornace.github.io/baize" rel="noopener noreferrer"&gt;https://rebornace.github.io/baize&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More runtime internals will follow, including a replayable evaluation corpus.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>agents</category>
      <category>go</category>
    </item>
    <item>
      <title>Two Paths to Take an Agent Runtime onto Mobile: a Remote Console and an On-Device Go SDK</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Sat, 24 Oct 2026 14:19:44 +0000</pubDate>
      <link>https://dev.to/rebornace/two-paths-to-take-an-agent-runtime-onto-mobile-a-remote-console-and-an-on-device-go-sdk-1e31</link>
      <guid>https://dev.to/rebornace/two-paths-to-take-an-agent-runtime-onto-mobile-a-remote-console-and-an-on-device-go-sdk-1e31</guid>
      <description>&lt;p&gt;&lt;strong&gt;Project: Baize — a team-facing AI assistant runtime (Go 1.25+, MIT)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/rebornace/baize" rel="noopener noreferrer"&gt;https://github.com/rebornace/baize&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the follow-up to &lt;a href="https://dev.to/rebornace/from-a-single-agent-loop-to-an-auditable-runtime-baizes-architecture-5b5e"&gt;From a Single Agent Loop to an Auditable Runtime: Baize's Architecture&lt;/a&gt;. That post covered the server-side runtime; this one focuses on the two mobile paths.&lt;/p&gt;

&lt;p&gt;Baize is a single-process Agent runtime written in Go that sits alongside your business systems, consolidating the LLM, tools, legacy HTTP APIs, and human checkpoints into auditable runs. Once the server side was stable, mobile was not built as a simple mobile web page. Instead, Baize offers two paths: one uses a Capacitor shell to remotely control the full console, so you can approve work on the go with zero development; the other compiles the Go orchestration core into an Android AAR and an iOS XCFramework via gomobile, so the conversation runs on the device and the UI is drawn entirely by your own app. This article walks through the actual code: how the two paths divide the work, the key and approval design of the on-device SDK, and how to choose.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. There are actually two kinds of mobile demand
&lt;/h2&gt;

&lt;p&gt;Before building anything for mobile, it helps to separate the requirements, because they point at two different problems.&lt;/p&gt;

&lt;p&gt;The first kind is internal teams and operators handling things on the go. They need to read conversations, do human approvals, change settings, and deal with logins from their phone — essentially "carry the desktop console in my pocket." In this scenario the conversation engine, connectors, and approval flow are already running stably on the server; the phone only needs an entry point, not a second implementation.&lt;/p&gt;

&lt;p&gt;The second kind is embedding Agent capabilities into your own product. These teams want a branded, native UI, with the conversation and tool loop running directly on the device and less dependence on an always-on sidecar, and they have their own requirements for UI and key management. Here the phone is not a remote control — it is where the capability lives.&lt;/p&gt;

&lt;p&gt;The two demands differ in who owns the UI, where the code runs, and the integration cost. Forcing them into a single path would leave embedders stuck with a generic page, while operators who just wanted mobile approvals would be forced to build a native UI. Baize therefore splits them into two paths, each handling one side.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. One diagram: the two paths
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft11yg4ro4kxq80k9ujro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft11yg4ro4kxq80k9ujro.png" alt="baize-mobile-paths-diagram" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Path A is a remote-control console: the phone shell does not run a conversation engine, it loads the full remote console from the same origin. Path B is the on-device SDK: the Go orchestration core is compiled into the app, the UI is drawn by the app, and the conversation runs on the device. Let's expand each in turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Path A: a thin shell, the full console with zero development
&lt;/h2&gt;

&lt;p&gt;Path A is deliberately light. You can open the reachable &lt;code&gt;/ui&lt;/code&gt; directly in a mobile browser, or use the Capacitor project in the repository to wrap a WebView and build an Android or iOS app.&lt;/p&gt;

&lt;p&gt;The shell loads the remote console from the same origin: once you configure the server address, the WebView simply opens the remote &lt;code&gt;/ui&lt;/code&gt;. Conversation, settings, human approvals, connectors, MCP, messaging channels, and browser login are all identical to the desktop — nothing is lost by moving to the phone. The only things the shell handles itself are mobile nuisances: the safe area, the keyboard, and opening login pages in the system browser.&lt;/p&gt;

&lt;p&gt;There is one deliberate choice here: the shell loads the remote &lt;code&gt;/ui&lt;/code&gt; from the same origin by default rather than proxying another layer of HTTP inside the shell. Conversation and approval depend on server-pushed events (SSE); adding an HTTP proxy inside the shell would buffer those streaming responses and break the experience of messages arriving one by one. Loading from the same origin keeps streaming replies and approvals smooth inside the shell.&lt;/p&gt;

&lt;p&gt;From an architecture standpoint, the shell runs no conversation engine at all — it is, quite literally, a remote control. The integration cost is close to zero: without writing any mobile code, the team gets the same operational capabilities on a phone as on desktop. The only deployment detail is that the public address must be reachable from the phone — the phone talks to the server address, not the &lt;a href="https://localhost" rel="noopener noreferrer"&gt;localhost&lt;/a&gt; loopback on your computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Path B: compile the Go orchestration core into the app
&lt;/h2&gt;

&lt;p&gt;Path B answers a different need: embedding Agent capabilities into your own product, with a native, branded UI.&lt;/p&gt;

&lt;p&gt;Baize compiles the Go orchestration core into an Android AAR and an iOS XCFramework via gomobile, and exposes a binding-friendly public API (the binding package is &lt;code&gt;mobileagent&lt;/code&gt;). There is a real engineering detail here: gomobile cannot bind Go &lt;code&gt;internal&lt;/code&gt; packages, so Baize re-exports the binding-friendly interfaces from a separate top-level package, while the internal implementation stays under &lt;code&gt;internal&lt;/code&gt;. The binding layer only surfaces the handful of methods an app actually needs.&lt;/p&gt;

&lt;p&gt;What runs on the device is a slimmed-down, OpenAI-compatible conversation and tool loop. The division of work between the app and the SDK is clear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;app&lt;/strong&gt; owns layout, theming, the history list, the input box, and the approval card; it owns secure storage of keys and the remote-config fetch strategy; and it owns thread management (network calls must not block the main thread).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;mobileagent&lt;/strong&gt; owns the session, the conversation, the tool loop, and the pause/resume of approval. Every result is returned as a JSON string, and it never touches any UI.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The call surface is intentionally small:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Configure&lt;/code&gt; sets the model endpoint, key, and model name once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Send&lt;/code&gt; runs one conversation turn and stops when it hits a tool that needs approval.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Approve&lt;/code&gt; and &lt;code&gt;Deny&lt;/code&gt; handle the two approval decisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;ChatOnce&lt;/code&gt; does a single-turn connectivity test without tools.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Reset&lt;/code&gt; clears the in-memory history.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;NewAgent&lt;/code&gt; creates an independent session.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;MessageCount&lt;/code&gt; returns the number of messages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;HasAPIKey&lt;/code&gt; reports whether a key is already held in memory.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Why the on-device SDK is slimmed down
&lt;/h2&gt;

&lt;p&gt;The on-device SDK deliberately does not move the full server-side runtime into the phone. On the device it keeps only an in-memory session and a minimal tool surface: today there are two tools, &lt;code&gt;get_time&lt;/code&gt; and &lt;code&gt;http_get&lt;/code&gt;. &lt;code&gt;get_time&lt;/code&gt; executes directly and returns the time, while &lt;code&gt;http_get&lt;/code&gt; must pass human approval first. The full connector set, MCP bridging, messaging channels, and the operational approval product surface stay on the server Runtime.&lt;/p&gt;

&lt;p&gt;This is a division of labor, not a capability cut. The server Runtime is aimed at "connect many systems and keep operating them as a team," which requires the full connector, audit, and operations surface. The on-device SDK is aimed at "close, light, embedded in your own product," which needs a controllable conversation loop and a minimal tool set. Keeping the two separate makes the on-device component small and controllable and leaves teams free to draw their own experience on top; when the full capability is needed, the app can always fall back to the server Runtime.&lt;/p&gt;

&lt;p&gt;The tool loop itself has a boundary: a single turn's tool loop is capped at a fixed number of rounds (currently 8). When it reaches the cap, it ends and returns, so the model cannot loop forever on the device. The session and keys live only in memory and are never persisted in the Go binding layer — they are cleared on reset or exit.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Keys go to the system safe, not the Go package
&lt;/h2&gt;

&lt;p&gt;There is one explicit rule in the on-device design: the Go binding layer only holds the key in memory and never writes it to disk. Anything that needs to persist is handed to the native safe provided by the app's platform.&lt;/p&gt;

&lt;p&gt;On Android, the sample uses &lt;code&gt;EncryptedSharedPreferences&lt;/code&gt;. The master key uses the AES256-GCM scheme, with keys encrypted with AES256-SIV and values with AES256-GCM. What gets stored includes the model endpoint, key, model name, and config endpoint, and there is a separate method to clear the key. On iOS, the equivalent is the Keychain, stored by service name and account name, and restricted to this device only and available after first unlock.&lt;/p&gt;

&lt;p&gt;The flow is: when the app starts (or needs the key), it reads the key from the system safe, then injects it into the on-device runtime's memory via &lt;code&gt;Configure&lt;/code&gt;; the Go binding layer never handles persistence. The reason is that a cross-platform Go binding cannot guarantee the security level of key storage, whereas &lt;code&gt;EncryptedSharedPreferences&lt;/code&gt; and the Keychain are the security boundaries the platform actually endorses — hardware-backed or managed by the system as a whole. The binding does not overstep into storage it cannot do well; it hands security to the platform, and the app fully owns the key lifecycle.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Foreground human approval: a JSON status protocol
&lt;/h2&gt;

&lt;p&gt;Human-in-the-loop on the device is expressed through a simple JSON status protocol. The return values of &lt;code&gt;Send&lt;/code&gt;, &lt;code&gt;Approve&lt;/code&gt;, and &lt;code&gt;Deny&lt;/code&gt; are all JSON strings that the app parses to decide what to render:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;done&lt;/code&gt;: the turn is finished; the UI shows the reply in the &lt;code&gt;text&lt;/code&gt; field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;needs_approval&lt;/code&gt;: a tool is waiting for approval, carrying &lt;code&gt;call_id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;args_json&lt;/code&gt;, and &lt;code&gt;summary&lt;/code&gt;. The app renders an approval card from these; approving calls &lt;code&gt;Approve&lt;/code&gt; with the &lt;code&gt;call_id&lt;/code&gt;, and rejecting calls &lt;code&gt;Deny&lt;/code&gt;. Until the user makes a choice, no new &lt;code&gt;Send&lt;/code&gt; should be issued.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;error&lt;/code&gt;: execution failed; the UI shows &lt;code&gt;message&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The approval summary is a single human-readable sentence. For &lt;code&gt;http_get&lt;/code&gt;, it produces the method ("GET") plus a truncated URL, so on a phone you can see at a glance what the app is about to call.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;http_get&lt;/code&gt; that requires approval is a read-only tool, but even though it is read-only, Baize still requires explicit approval and adds a set of guardrails when it runs: only &lt;code&gt;http&lt;/code&gt; and &lt;code&gt;https&lt;/code&gt; are allowed; requests have a timeout (currently 15 seconds); redirects are capped (currently 3); the response body has a size limit (currently 256 KB, and anything larger is truncated and marked); and the result carries the final address (&lt;code&gt;final_url&lt;/code&gt;) so you can verify where a redirect actually landed. Rejecting fires no network request at all and simply lets the conversation continue.&lt;/p&gt;

&lt;p&gt;Narrowing what an on-device model is allowed to do is the core idea: keep tools read-only, require explicit approval for actions, and keep the network boundary clear — then on-device autonomy is contained within a safe range.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Remote config, multiple sessions, and desktop debugging
&lt;/h2&gt;

&lt;p&gt;So the app does not have to hardcode the model endpoint and model name, the binding layer offers remote config: &lt;code&gt;FetchRemoteConfig&lt;/code&gt; pulls JSON from a config endpoint you own, and &lt;code&gt;ApplyRemoteConfigJSON&lt;/code&gt; merges that config into the in-memory session. The config can include the model endpoint and model name, and optionally the key. The fetch strategy is decided by the app; the SDK only applies it.&lt;/p&gt;

&lt;p&gt;For multi-session scenarios, use &lt;code&gt;NewAgent&lt;/code&gt; to obtain an independent instance rather than sharing the package-level default session. Each instance maintains its own history and pending-approval state.&lt;/p&gt;

&lt;p&gt;You do not have to tether a phone during development. Baize ships a desktop debug entry point that runs the binding layer directly on your computer, and it includes a fake model so you can get the UI and approval cards working before swapping in a real model. When an Android emulator needs to reach the host machine, use the emulator's standard host address (10.0.2.2).&lt;/p&gt;

&lt;h2&gt;
  
  
  9. How to choose
&lt;/h2&gt;

&lt;p&gt;The decision is straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you want the full settings pages, connectors, and operational approval flow, and the phone is only a portable entry point, choose Path A.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want a branded native UI, the conversation running on the device, and less dependence on an always-on sidecar, choose Path B and draw your own UI using the empty shell in the repository as the calling sample.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The two can coexist: operators and internal teams use Path A, while the end-user-facing app uses Path B.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The two mobile paths are, at heart, separating two different problems: "the operator's portable console" and "the embedded on-device Agent." The former pursues zero development and full parity with the desktop; the latter pursues a native experience, on-device control, and a clear key boundary. The key decisions in the on-device SDK — holding keys only in memory, requiring approval even for read-only tools, giving network actions explicit guardrails, and keeping the session and tool loop minimal — all revolve around one goal: letting the capability run safely, and personally, on the device.&lt;/p&gt;

&lt;p&gt;Baize is an open-source project under continuous development (written in Go, MIT licensed). The mobile Capacitor shell, the Android and iOS empty shells, the on-device bindings, and the corresponding build scripts are all in the repository.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/rebornace/baize" rel="noopener noreferrer"&gt;https://github.com/rebornace/baize&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Docs: &lt;a href="https://rebornace.github.io/baize" rel="noopener noreferrer"&gt;https://rebornace.github.io/baize&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are also putting Agents into production — especially if you are thinking about how to safely bring capabilities onto a phone — I'd like to hear how you handle mobile and key management. The full mobile getting-started guide and build steps will be covered in a follow-up post.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mobile</category>
      <category>go</category>
    </item>
    <item>
      <title>From a Single Agent Loop to an Auditable Runtime: Baize's Architecture</title>
      <dc:creator>rebornace</dc:creator>
      <pubDate>Fri, 23 Oct 2026 15:32:37 +0000</pubDate>
      <link>https://dev.to/rebornace/from-a-single-agent-loop-to-an-auditable-runtime-baizes-architecture-5b5e</link>
      <guid>https://dev.to/rebornace/from-a-single-agent-loop-to-an-auditable-runtime-baizes-architecture-5b5e</guid>
      <description>&lt;p&gt;Baize is a single-process Agent runtime written in Go that sits alongside your existing systems. Early on it was little more than a single "think, pick a tool, act" loop. As multi-client access, long-running tasks, connector groups, and other capabilities landed, the architecture converged onto five core abstractions: &lt;strong&gt;Runtime, Agent, Tool, Connector, and Run&lt;/strong&gt;. This article walks through the current structure with one layered diagram: how the different entry points connect, the three execution forms of the Run engine, the three connector types with bidirectional MCP, and the runtime surface that makes every Run auditable, observable, and recoverable.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What it is: a standalone Agent runtime
&lt;/h2&gt;

&lt;p&gt;To understand Baize's architecture, the first thing to be clear about is that it is &lt;strong&gt;not a library embedded inside your business application&lt;/strong&gt;. It is a &lt;strong&gt;standalone Agent runtime&lt;/strong&gt; that runs as a sidecar or gateway next to the systems you already have.&lt;/p&gt;

&lt;p&gt;In one sentence: it consolidates the LLM, tools, legacy HTTP APIs, and human checkpoints into &lt;strong&gt;auditable Runs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Concretely, it reads API documentation and turns existing system endpoints into capabilities the Agent can call. For write operations such as creating an order or changing a status, it pauses at the web console and waits for human confirmation before executing. The process is visible in the conversation or messaging channel, and full credentials never appear in conversation replay. Usually, no business code needs to change.&lt;/p&gt;

&lt;p&gt;This shape gives it a few immediate properties:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Platforms and integrators connect over REST / HTTP, with no lock-in to any particular language (there is no official language SDK).&lt;/li&gt;
&lt;li&gt;It is a single process with externalized configuration; once stopped, it leaves almost nothing behind on the business side.&lt;/li&gt;
&lt;li&gt;The web console, mobile clients, messaging channels, and incoming alerts all share the same approval, memory, and outbound-reply surface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the product grows from a single conversation loop into multiple clients, systems, and tasks, a straight-line flow can no longer cover everything. The layered diagram below shows the current shape of Baize.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi7azmp1lzxxkebwhx3l1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi7azmp1lzxxkebwhx3l1.png" alt="baize architecture diagram" width="800" height="1117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The five core abstractions: Runtime, Agent, Tool, Connector, Run
&lt;/h2&gt;

&lt;p&gt;The most fundamental change in the architecture is the convergence onto five abstractions: &lt;strong&gt;Runtime, Agent, Tool, Connector, and Run&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Runtime&lt;/strong&gt; is the single process itself, responsible for orchestration, scheduling, and lifecycle management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent&lt;/strong&gt; is the carrier of conversation and policy; it understands intent, calls the LLM, and decides the next action.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool&lt;/strong&gt; is a callable capability. Reading an order, checking inventory, or raising an approval are all, from the engine's perspective, uniform tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connector&lt;/strong&gt; describes how an external system is connected, how credentials are carried, and where its capabilities come from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run&lt;/strong&gt; is one complete execution, and the most important abstraction in the system. It records everything a conversation depends on from start to finish — the model, the tool contracts, connector revisions, and human checkpoints — so it can be audited, observed, and recovered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is a deliberate choice here: Skills, Memory, Channels, and linear workflows are &lt;strong&gt;not promoted to a sixth core abstraction&lt;/strong&gt;. They live as configuration or plugin forms, layered on top of the five.&lt;/p&gt;

&lt;p&gt;The benefit is a stable core: adding a skill, integrating a channel, or defining a workflow does not require changing the Runtime kernel — it is all extension in the configuration and plugin layer. For a project that evolves over a long time, "a small, stable core with extension happening at the outer layer" is what allows it to keep adding capabilities without modules colliding.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The three execution forms of the Run engine
&lt;/h2&gt;

&lt;p&gt;Of the five abstractions, the Run engine is where the actual work happens. One engine carries three execution forms, each matching a different kind of task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The first is the single-Agent ReAct loop, which is the default.&lt;/strong&gt; The engine advances as "choose a tool, execute, record the trajectory"; the model acts step by step as it reasons, deciding the next move from the previous result. It suits open-ended tasks where the goal is clear but the path must be judged on the fly — for example, "find out why this batch of orders is stuck, and fix the ones you can." When there are many systems, you can enable tool pre-filtering (the "smart acceleration" setting) so a shorter candidate list is handed to the main model; if that fails, it falls back to the full list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The second is a linear workflow inside a Skill.&lt;/strong&gt; When a process is a fixed sequence that can be designed up front, you write it into a Skill's &lt;code&gt;workflow.yaml&lt;/code&gt;, and the engine executes the steps in order — each step optionally carrying a human approval. These are linear sequences with no branching or loops. It suits predictable, consistency-focused standard processes, such as "verify qualifications, create the order, then notify the contact." Crystallizing a deterministic process into linear steps reduces uncertainty during execution and gives every step a clear checkpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The third is a connector-group sub-run (opt-in).&lt;/strong&gt; Connector groups themselves only affect the candidate set during tool narrowing; they do &lt;strong&gt;not&lt;/strong&gt; spawn sub-runs automatically. Once "allow sub-runs within a group" is enabled, the model can call &lt;code&gt;spawn_group_run&lt;/code&gt;: it derives a sub-run exactly one level deep for a given connector group. The sub-run's tool surface is limited to that group's connectors, and it has its own run binding and its own approvals; the parent enters &lt;code&gt;waiting_child&lt;/code&gt; and resumes when the sub-run reports back. Nested sub-runs are not allowed. This is for when business domains such as finance or transactions need their approvals not to collide — the emphasis is on isolation, with each domain's actions and approvals kept separate rather than two orchestrations running concurrently as parent and child. When the same turn only needs to fan out read-only investigations and aggregate results, that uses the engine's built-in parallel read-only calls instead, without consuming a sub-run.&lt;/p&gt;

&lt;p&gt;All three forms sit on the same Run engine, the same trajectory, and the same audit model. You do not maintain two frameworks for "open exploration" and "fixed process"; you pick the form that fits the task. The default ReAct loop and the optional linear workflow and group sub-runs can be combined as needed, with group sub-runs always gated by the switch and the one-level constraint.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Connector as a first-class citizen: three connector types and bidirectional MCP
&lt;/h2&gt;

&lt;p&gt;Baize is built for the reality of "many systems, a large share of them legacy," which is why connectors are first-class citizens. There are three standard ways to bring an external system in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OpenAPI wildcard.&lt;/strong&gt; Upload or point to an OpenAPI / Swagger document, and each interface operation becomes a tool. This is the most direct way to integrate legacy REST systems; names prefer the &lt;code&gt;operationId&lt;/code&gt;, and credentials, login, and change comparison are all handled uniformly at the connector layer. If an enterprise already has its own execution entry point and does not want to implement full plugin discovery, it can instead configure an &lt;strong&gt;execution callback&lt;/strong&gt; for the connector: the Runtime POSTs the tool name, arguments, and &lt;code&gt;run_id&lt;/code&gt; to that endpoint, which performs the work — no need to implement the &lt;code&gt;/v0/tools&lt;/code&gt; discovery endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP plugin protocol v0.&lt;/strong&gt; When the API document cannot cover some legacy logic, or a capability needs to be implemented on the business side, you write a small service (a sidecar Connector) that exposes three endpoints per protocol v0: a health check, a tool list, and a tool invocation. The Runtime calls it over the same network, carrying the run identifier, tenant identifier, and protocol version in the headers; how the capability is implemented is entirely up to the business side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP bridge.&lt;/strong&gt; Baize acts as an MCP client, connecting to an existing MCP Server and pulling its tools into its unified catalog. This lets MCP tools already in the ecosystem be used by Baize directly.&lt;/p&gt;

&lt;p&gt;These three sources, together with manually maintained extra tools, are unified into the tool catalog (sources tagged &lt;code&gt;spec&lt;/code&gt;, &lt;code&gt;plugin&lt;/code&gt;, &lt;code&gt;mcp&lt;/code&gt;, and &lt;code&gt;extra&lt;/code&gt;). The engine and human checkpoints only read the &lt;strong&gt;enabled&lt;/strong&gt; entries in the Registry; tool names across connectors are required to be globally unique, and the catalog API can still show disabled rows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Worth calling out on its own: MCP in Baize is bidirectional.&lt;/strong&gt; The MCP bridge above is Baize acting as a client to consume other services' capabilities. In the reverse direction, Baize can also act as an MCP server, exposing a read-only subset of its tool catalog through &lt;code&gt;/v0/mcp/export&lt;/code&gt; to MCP-capable Agent clients such as Cursor and Claude Desktop. This path does not go through Baize's own LLM; it safely shares already-integrated business capabilities with external Agents. An export Key can bind identity slots by connector and role, with the permission boundary corresponding to the downstream business account. When downstream authentication fails, it first guides the user through hosted login rather than pasting a password into the conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. How a single Run is auditable, observable, and recoverable
&lt;/h2&gt;

&lt;p&gt;Moving an Agent from a demo to long-term operation is not primarily about single-turn capability — it is about every Run leaving a trace, being observable, and being resumable. Baize provides a set of capabilities that work together at this layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run binding (&lt;code&gt;run.binding&lt;/code&gt;).&lt;/strong&gt; Before the first main-model call, every Run records the model endpoint and profile in effect, the policy parameters, memory injection, the narrowed tool contract fingerprint, and the connector catalog revision. When you later trace the basis of a decision in that run, you get the real snapshot from that moment rather than the current configuration, which has since changed. Tool-call events carry the contract fingerprint and catalog revision, so you can compare directly before and after an interface fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Human-in-the-loop (HITL).&lt;/strong&gt; Write operations can be marked as requiring approval; the Run enters a waiting state and resumes after an operator approves or rejects on a card. When a downstream system needs login, the conversation can pause and guide the user to log in via the browser, skip that system for the turn, or end the turn. Long tasks also release the slot while a gate is pending, so a single waiting approval does not tie up a worker thread for the whole Run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Long-task resilience.&lt;/strong&gt; For long-running task stability, the engine combines step-budget wind-down, retries and fallback after LLM call failures, timeout splitting, and parallel read-only tool calls. Within a turn it also performs context compression, conversation retrieval, and skill archiving, so a task can keep its goal and continue after many rounds. After user confirmation, one-time, daily, or weekly scheduled instructions can be saved; when the time comes, a new round opens in the original conversation, and write operations still go through approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context management.&lt;/strong&gt; Long conversations get a rolling summary, and an optional "keep the key points of long conversations" projection changes only what the model sees without rewriting the original messages. Exceptionally large tool results or pasted content are offloaded to the session workspace's &lt;code&gt;offload/&lt;/code&gt; directory; the model only receives a preview and a path, and can read it back in sections with &lt;code&gt;read_file&lt;/code&gt; when needed, instead of blowing up the context in one go.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observability.&lt;/strong&gt; Structured &lt;code&gt;slog&lt;/code&gt; logging, Prometheus metrics, and optional OpenTelemetry tracing cover the Run and tool calls. After a connector is re-imported, the interface change comparison is returned and can be pushed asynchronously via Webhook. Most of these observability options can be viewed and hot-reloaded from the settings page, without editing the config file and restarting each time.&lt;/p&gt;

&lt;p&gt;Each piece of this layer deserves its own article; here it is only positioned within the overall architecture, and later posts will expand on them one by one.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. The second client beyond the server: two mobile paths
&lt;/h2&gt;

&lt;p&gt;Once the Runtime was reliably carrying the server side, mobile was not implemented as a simple mobile web page. Instead, there are two paths with different positioning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Path one: remote-control console.&lt;/strong&gt; Open the reachable &lt;code&gt;/ui&lt;/code&gt; directly in a mobile browser, or use the Capacitor shell in the repository to wrap a WebView that loads the remote console. Conversation, settings, approvals, and browser login are identical to the desktop. The shell does not run a conversation engine; it effectively turns the phone into a remote control, which suits internal teams integrating with zero development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Path two: on-device SDK.&lt;/strong&gt; The Go orchestration core is compiled via gomobile into an Android AAR and an iOS XCFramework (the public binding package is &lt;code&gt;mobileagent&lt;/code&gt;) and linked into your own app. On the device it runs a &lt;strong&gt;slimmed-down&lt;/strong&gt; conversation and tool loop with foreground human approval. The app holds the keys and places them in OS-backed secure storage (such as the iOS Keychain or Android encrypted storage), then injects them into the on-device runtime's memory; configuration can be synced from a remote endpoint, and the UI is drawn entirely by the integrator. This path deliberately does &lt;strong&gt;not&lt;/strong&gt; ship the full &lt;code&gt;baize serve&lt;/code&gt; stack into the phone — there is no connector farm, MCP, channels, or full HITL product surface; it focuses on in-memory conversations and a small tool set. It suits teams that want to embed Agent capabilities into their own product and have their own requirements for UI and key management.&lt;/p&gt;

&lt;p&gt;The two paths do not replace each other: one is a portable entry point to the full console, the other is on-device capability embedded in a self-built app. The full mobile getting-started guide and build steps will be covered in a later post.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Storage and deployment
&lt;/h2&gt;

&lt;p&gt;Baize uses a single process with externalized configuration. The main database, middleware (task queue / event bus / rate limiter), and Blob storage all use &lt;strong&gt;pluggable drivers&lt;/strong&gt;: implement the unified interface, register it with &lt;code&gt;RegisterDriver&lt;/code&gt;, and select it by name with &lt;code&gt;driver&lt;/code&gt; in the configuration, so the Runtime is not locked to any particular database or message middleware. The implementations built into the repository today are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Main database: SQLite by default, with Postgres and in-memory implementations.&lt;/li&gt;
&lt;li&gt;Task queue, event bus, and rate limiter: in-memory by default, switchable to Redis when scaling horizontally (multiple replicas).&lt;/li&gt;
&lt;li&gt;Files and attachments (Blob): local files, S3, or in-memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Other databases or message queues (for example MySQL or Kafka) can be added under the same driver contract without changing the Runtime kernel — the extension surface is the driver layer, not the orchestration layer. On the model side, any OpenAI-compatible API is supported, and the decision model can run on local Ollama, which further lowers the deployment bar.&lt;/p&gt;

&lt;p&gt;This combination lets the project evolve smoothly from "run it on one machine" to "plug into the team's infrastructure": it works with zero dependencies by default, and when you connect to existing team middleware you simply add or switch a driver. For messaging, IM channels are integrated through external adapters using declarative configuration; the repository ships reference adapter examples in the examples directory for you to deploy as needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The thread through this round of architecture evolution is clear: &lt;strong&gt;consolidate the LLM, tools, legacy interfaces, and human checkpoints into auditable Runs; keep the core abstractions few and stable; and let the frequently changing parts — skills, memory, channels, and workflows — extend at the configuration and plugin layer.&lt;/strong&gt; The five abstractions, three execution forms, three connector types, and bidirectional MCP, along with the server Runtime and the mobile client, are all built around that thread.&lt;/p&gt;

&lt;p&gt;Next, I'll write separate posts on the two mobile paths, long-task resilience, and the evaluation corpus, explaining the design trade-offs and implementation based on the actual code.&lt;/p&gt;

&lt;p&gt;Baize is an open-source project under continuous development (written in Go, MIT licensed). Repository: &lt;a href="https://github.com/rebornace/baize" rel="noopener noreferrer"&gt;github.com/rebornace/baize&lt;/a&gt;, site: &lt;a href="https://rebornace.github.io/baize/" rel="noopener noreferrer"&gt;rebornace.github.io/baize&lt;/a&gt;. If you are also deploying Agents and working on integrating legacy systems and keeping them running reliably over the long term, you're welcome to open an issue or share your own Agent runtime practices in the comments. I'll keep following up and documenting the architecture as it evolves.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mcp</category>
      <category>go</category>
    </item>
  </channel>
</rss>
