dshworks/dsh-ego-browser ↗★ 1

@dshworks/dsh-ego-browser

ego lite for DeepSeek Harness, with a memory it keeps: the agent recalls what it learned about a site before it acts, promotes a script that worked into a reusable site tool, and hands you the keyboard through a real dsh prompt when a page needs a human. 适合需要浏览器智能体记住网站经验并复用脚本的用户。

Package
@dshworks/dsh-ego-browser
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.1.2-rc.1 || ^0.1.5-rc.1 || ^0.1.7-rc.2 || ^0.2.0-rc.1
Cordis peer range
^4.0.1
Version
0.1.4
License
MIT
Last updated
Sep 30, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:dshworks/dsh-ego-browser
    ___  __ _  ___
   / _ \/ _` |/ _ \    dsh-ego-browser
  |  __/ (_| | (_) |
   \___|\__, |\___/    ego lite for DeepSeek Harness,
        |___/          with a memory it keeps

The site-skill memory for dsh browser agents.

7 tools · a store in ego lite's own learnings/ format · verified on dsh 0.1.7-rc.2 · 81 tests, no browser needed · host-only · MIT

CI npm MIT

"Node

= 20">

verified against dsh 0.1.7-rc.2

What it does · 60-second start · Proof · When to skip · Prior art · llms.txt · 中文

AI agents / LLMs: read llms.txt in this repo — it carries the tool signatures, the store layout, and the three wire facts about ego that the docs get wrong.


ego lite is one browser a human and an agent share: the agent works in its own Space with the user's real logins, the user's tabs stay theirs. This plugin brings it into dsh — and adds the half ego's own README still lists as coming soon.

"Experience accumulation that makes your agent faster the more you use it (coming soon)" — ego lite README

The reader already ships. site.learnContext, site.runTool and site.runBrowserTool load a learnings/ directory out of whatever EGO_BROWSER_AGENT_WORKSPACE points at. What was missing is the half that fills it.

  ego_recall  ──▶  ego_run  ──▶  ego_learn  ──▶  ego_site_run
   what this       one script     promote the      one call, next
   agent already   for the whole  step that        session, instead
   learned about   browser task   worked           of rediscovering
   the site
                        │
                        └──▶  ego_handoff — the page needs a human;
                              ask them for real, then take control back

The loop closes. The second time you scrape that dashboard, the agent calls a tool it wrote last week instead of rediscovering the page.

What it does

  • Recalls before it acts — ego_recall returns the notes and tool signatures for a hostname off disk. No browser, no page load, no tokens spent rediscovering what worked last month.
  • Writes one script per task — ego_run hands the whole browser task to ego's runtime in a single script, which is the design ego's own benchmark is built on.
  • Promotes what worked — ego_learn turns a working step into a real site tool, in ego's format, and refuses the ones that will not survive to tomorrow.
  • Runs what it learned — ego_site_run calls a stored tool by name and counts the call, so a tool nobody uses is visible as unused.
  • Hands you the keyboard for real — ego_handoff raises a genuine dsh Continue / Finish task prompt, which is what ego's own hard-stop message asks the harness to do, and takes control back only when you say so.
  • Tells the model which ego you have — ego_doctor probes the installed command instead of trusting the docs, because there are two incompatible runtimes behind one command name.
  • Starts non-empty — on first boot the store inherits the learnings/ from the ego skill already on your machine.

How it works (30 seconds)

  dsh agent
     │  ego_run / ego_site_run                    ego_recall / ego_learn
     ▼                                                      │
  ┌──────────────────────────────┐                          ▼
  │ dsh-ego-browser (host half)  │              ┌──────────────────────────┐
  │  · argv + surface probes     │              │ learnings//        │
  │  · script wrap + classify    │─────────────▶│   manifest.json          │
  │  · promotion gate            │   writes     │   notes/*.md             │
  └──────────────┬───────────────┘              │   tools/*.js             │
                 │ stdin heredoc                │   browser-tools/*.js     │
                 ▼                              └──────────┬───────────────┘
          `ego-browser`                                    │ EGO_BROWSER_
                 │                                         │ AGENT_WORKSPACE
                 ▼                                         ▼
          ego lite app  ◀───────── the same store, read back by ego itself
          (your logins, its own Space)

The only wire is the ego-browser command the ego lite app installs. Nothing here vendors, patches, or launches a browser.

Get started (60 seconds)

Needs ego lite installed and onboarded on the machine running dsh (lite.ego.app), so ego-browser is on the PATH.

# 1. install
dsh plugin --profile web add -w @dshworks/dsh-ego-browser

# 2. restart dsh

# 3. verify it took — seven names, or [] if it did not
curl -s localhost:8090/dsh-ego-browser/memory | jq .tools

Running dsh inside a deva container with the ego bridge? dsh strips every credential-shaped variable (KEY, SECRET, TOKEN, PASSWORD) from the processes it spawns, so the bridge token has to be forwarded on purpose, in the profile's cordis.patch.yml:

- id: dsh-ego-browser
  config:
    env:
      DEVA_EGO_TOKEN: !!js process.env.DEVA_EGO_TOKEN

add registers the bundle in the profile roster for you. Then ask the agent to run ego_doctor once — it is how it finds out whether to write cliLog() or console.log() for the ego you installed:

command: ego-browser   invoked as: ego-browser 
The store is ego's format, not ours

/learnings//manifest.json id, name, domains, notes, tools /learnings//notes/.md what the agent figured out, in prose /learnings//tools/.js node tool: export async function f(ctx, args) /learnings//browser-tools/*.js page tool: evaluated in the tab


Anything learned here loads in the stock `ego-browser` skill outside dsh, and in
any other agent pointed at the same workspace. There is no private format and
nothing to migrate out of.

On first boot the store inherits an existing ego skill workspace's `learnings/`
if it finds one, so it starts with the sites ego ships rather than empty. Once.
A site you delete stays deleted.

Everything is validated before a byte is written, so a refused promotion leaves
the store exactly as it was: manifest shape, domain patterns, argument and
return schemas, the declared export, and the source's syntax — parsed
out-of-process with `node --check`, never imported, because that code is written
for the browser runtime and has no business running in