Skip to main content

dsh-ego-browser

29Stars3Forks5Issues0Watchers

Integrate ego-lite (Chromium for AI Agents) into DSH, providing 32 structured browser tools and a real-time observation window. Users can watch AI operate web pages and take over at any time.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
Branch
master
agent-browserbrowser-automationdsh-plugindshxego-lite

Install

cmdweb profile
$ dsh plugin --profile web add dsh-ego-browser

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin Fisfzy/ego-browser for me: review the repository at https://github.com/Fisfzy/dsh-ego-browser first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

Connect ego-lite (a Chromium designed for AI Agents, with the runtime embedded in the plugin package) to DeepSeek Harness, exposing 32 structured ego_* tools that enable AI to click, fill forms, read content, and pass verification like a real human on web pages; plus a real-time observation window in the bottom-right corner that lets you watch as AI operates on web pages and take over control when necessary.

Core Capabilities

  • Register 32 structured ego_* tools covering task spaces (open/close), page reading (semantic tree snapshots, attribute reading, screenshots, element info), navigation and waiting, keyboard/mouse interaction, forms and dialogs, human verification detection, network request and download capture, and free script escape hatches
  • Provide a "🌐" real-time observation window at the bottom-right of DSH Web: uses SSE to push JPEG (CDP backend, default) or fMP4 video stream (FFmpeg backend) to live display the page the agent is browsing, supporting tab switching and history drawer review
  • Observation window supports direct takeover: click, drag, scroll, Ctrl+scroll zoom, Ctrl+drag pan, type Chinese after clicking, keyboard shortcuts—all routed back to the same Chromium used by the agent without interrupting the agent to restart
  • Built-in human verification detection (reCAPTCHA / hCaptcha / Turnstile / Cloudflare, etc.) and login guidance bar; proactively prompts when agent gets stuck on login or verification
  • Cross-platform self-adaptation: Linux/macOS/Windows all supported; root / Docker / no-display environments automatically inject --no-sandbox wrapper with headless fallback; no manual Chrome configuration needed
  • Expose operation tools like ego_doctor for environment check, ego_auth_flush for login state persistence, ego_help for tool index, etc.

Technical Implementation

  • Language: TypeScript (build output: lib/index.js + lib/client.js + bin/ego-cast-worker.mjs three bundles)
  • Key Dependencies: @deepseek-ai/dsh-tools (tool registration base via defineTool), @deepseek-ai/schemastery (Config Schema validation), @deepseek-ai/dsh-settings (ego-browser settings namespace and persistence), react (frontend floating window UI), runtime/ego-linux (embedded ego-lite runtime, vendored)
  • Architecture Pattern: Cordis dual-sided plugin (dsh.bundle.patch injects into host services list, dsh.client injects floating window frontend into Web host); each ego_* tool follows the pattern "params → assemble JS script → ctx.subprocess call ego-browser nodejs → parse by @@DSH_RESULT@@ sentinel"; all tools serialized via in-process mutex lock to prevent browser contention
  • Entry Files: src/index.ts (plugin apply entry + 32 tool registrations), src/config.ts (Schemastery Config + resolveConfig), src/cast-server.ts (host routes /api/ego/*), src/client/index.ts (floating window frontend single file)

Use Cases

When you want AI to accomplish tasks that can only be done with a browser—capturing pages requiring login state, cross-page form filling, mobile simulation, operating sites with captcha or requiring real human sessions—without opening a separate test account for it, this plugin loans the same Chromium to AI; meanwhile, the observation window makes "what AI is doing, where it's stuck" visible throughout, and you can personally take over when necessary without interrupting the agent.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
DeepSeek Harness0.1.0-rc.8Derived from @deepseek-ai/dsh-* series in peerDependencies; requires host to provide tools / subprocess / webServer (observation window) services
Node.js>=22package.json#engines.node; observation window and vendored runtime both rely on Node 22+ built-in capabilities
Operating SystemmacOS / Windows / LinuxPlugin layer supports all three platforms; macOS is official experience, Linux/Windows use community port (see "Known Issues and Limitations")
Browser RuntimeGoogle Chrome / Chromium / Brave / Microsoft Edge (any one)Auto-detect common paths; root users use plugin's built-in --no-sandbox wrapper script; can manually specify via EGO_LINUX_CHROME or chromePath field in settings
Native ModulesNonePlugin body doesn't introduce native modules; vendored runtime is pure JS; FFmpeg binary is optional download (on-demand托管到 ~/.dsh/cache/ego-browser/ffmpeg/)

Installation

dsh plugin --profile web add github:Fisfzy/ego-browser

Configuration Options

ConfigTypeDescriptionDefault
chromePathstringCustom Chrome/Chromium executable path; empty triggers auto-detection of common locationsempty (auto)
captureBackendstringObservation window video backend: auto / cdp (default JPEG stream) / ffmpeg (video stream, requires manual install)auto
streamProfilestringQuality preset: low / balanced / high, determines FPS, max width, and bitrate defaultsbalanced
cdpFpsnumberCDP preview frames per second, 5–3020
cdpQualitynumberCDP JPEG quality, 1–10055
cdpMaxWidthnumberCDP frame max width (pixels), 320–1920960
cdpBackstopIntervalMsnumberStatic page fallback screenshot interval (ms), 1000–100003000
ffmpegFpsnumberFFmpeg backend frames, 5–30Per profile 15/20/30
ffmpegMaxWidthnumberFFmpeg backend max width, 320–1920Per profile 960/1280/1600
ffmpegBitrateKbpsnumberFFmpeg target video bitrate (kbps), 500–20000Per profile 2000/4000/8000
ffmpegEncoderstringFFmpeg H.264 encoder: auto / software / h264_mf / h264_nvenc / h264_qsv / h264_amf / h264_videotoolbox / h264_vaapiauto
ffmpegPathstringCustom FFmpeg path; empty triggers detection in order: PATH → managed cacheempty
githubMirrorstringGitHub mirror prefix for managed downloads, e.g., https://gh-proxy.com/github.comempty
egoCliArgsstringExtra CLI args appended to ego-browser nodejs call; takes effect on next ego_* call; some control args will be filteredempty
chromeArgsstringExtra options appended to Chrome launch args; takes effect on next browser cold start (browser is singleton); some control args will be filteredempty
egoBinstringCustom ego-browser CLI path; empty uses vendored runtime/ego-linux/bin/ego-browser.mjsvendored runtime
defaultSpacestring/numberDefault task space name; subsequent ego_* calls without space fall back to thisdsh-agent
maxOutputBytesnumberByte limit for each subprocess stdout/stderr collection4194304 (4 MiB)
graceMsnumberGrace period milliseconds for subprocess timeout15000

FAQ

Q: I'm starting as root on a Linux server. Can it run without Chrome?

A: Yes. resolveEgoEnv (src/index.ts) automatically detects root and no-display environments, injecting its built-in --no-sandbox wrapper script with headless fallback; as long as the system has any Chrome / Chromium / Edge / Brave installed, it can start. When not found, ego_status immediately gives the executable path and reason.

Q: Can I run multiple AI agent tasks simultaneously? Will they interfere with each other?

A: All ego_* tools are serialized via an in-process mutex lock, so multiple agents within the same plugin instance won't grab the same browser; multi-tasking is isolated by "task spaces"—ego_space_open creates an independent space, and the space parameter routes to the corresponding space. Cookies are isolated between spaces; please log in within the target space.

Q: What are the requirements for the observation window's live feed?

A: The CDP backend (default) has minimal overhead; any machine that can run a modern browser on DSH Web can view it; the FFmpeg backend requires the Chrome window to be correctly captured—Windows must use FFmpeg with gfxcapture filter, macOS first-time use needs "Screen Recording" permission, Linux needs Chromium and FFmpeg to share DISPLAY, Wayland lacking Portal/PipeWire input will prompt switching to CDP.

Q: What if the agent reaches a captcha page?

A: ego_captcha and ego_page_info detect reCAPTCHA / hCaptcha / Turnstile / Cloudflare controls and return { detected, kind }; when detected, a "Human Verification" guidance bar pops up at the top of the observation window—you can directly enter the observation window to complete verification, the agent's same browser is still waiting, and continues after completion.

Q: Am I viewing "DSH's own interface that the agent is operating"? Or is it in another browser?

A: The agent uses this one browser, there's no second one. When it operates on DSH's session management, task board, settings interface, the observation window is equally visible throughout and can be taken over—the plugin documentation calls this "self-observation".

Q: How do I uninstall? Will cookies or profile be left behind?

A: dsh plugin remove follows cordis's standard uninstall flow (fire-and-forget, doesn't block host exit). Chrome profile and vendored runtime are in user-space directories (macOS/Linux: $XDG_STATE_HOME/ego-lite-linux, Windows: %LOCALAPPDATA%\ego-lite-linux); they persist as long as the plugin isn't deleted; to clean completely, manually delete the corresponding directory.

Q: The "32 tools" seem like a lot. How do I find the one I need?

A: Call ego_help once (supports topic parameter for categorized viewing, such as tools / navigate / input / form / wait / network / login / script, etc.), it returns a complete index with categories and one-sentence descriptions.

Learning Curve

Advanced — 32 tools have wide coverage, agent can use directly; regular users only need to install Chrome once and confirm ego_status passes. Advanced users wanting to squeeze quality/frame rate need to understand CDP vs. FFmpeg dual-backend differences, and manually install managed FFmpeg as needed.

Known Issues and Limitations

  • Underlying ego-lite host is officially supported on macOS; Linux/Windows use community port; stability of complex multi-step processes is weaker than macOS; tab/space state may be lost between cross-CLI calls
  • FFmpeg backend cross-platform capture: Windows needs new build with gfxcapture; PATH's old version is skipped with prompt to download compatible version; Linux uses x11grab, macOS uses avfoundation display crop; macOS ScreenCaptureKit and Wayland Portal helper are future enhancements
  • Login state only persists when Chrome shuts down gracefully;强杀 or power loss requires re-login; to immediately固化, call ego_auth_flush or click "Logged in, save" in the observation window login guidance bar
  • Tool output schema uses loose additionalProperties: true; clients should use actual return value as authoritative, not rely on schema-listed fields
  • During installation, not all DSH peer packages are in public npm registry; regular pnpm install may fail when resolving @deepseek-ai/* peers; need to install via DSH profile to provide peers; CDP path doesn't depend on FFmpeg, plugin installation phase won't download binaries
  • Snapshot quality: Linux uses CDP DOMSnapshot to rebuild semantic tree (not macOS kernel-level), complex iframe / canvas scenarios may degrade
  • ego_http's mode: server (Node-side fetch.server) may trigger libuv crash in vendored Windows runtime; defaults to browser context (fetch.browser)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/Fisfzy/ego-browser)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory