Preface¶
DeepSeek Harness (DSH) adopts a plugin-based architecture that allows capabilities to be enhanced through extensions. dsh-agent-browser is a plugin designed to let models directly control the browser panel in the right sidebar of DSH via tool calls. It provides capabilities to read page content, manipulate elements, navigate, switch viewport sizes, and capture viewport screenshots, enabling models to interact with web pages like humans.
Core Features¶
The plugin provides the following tools for browser control:
- browser_tabs: List the browser tabs in the current session. Information includes id, title, url, loading status, failed status, verification status, mount status, and carrier information.
- browser_read: Read the tab content. Supports
mode: 'text'(default, reads visible text),mode: 'elements'(reads interactive elements),mode: 'html'(reads page HTML). Before reading, thefailedstatus should be checked; failed pages return empty read results. - browser_act: Execute page actions. Supports
click,type,press,scroll,select,reload,wait. The action target can be specified viaref(from elements mode) or a CSS selector.waitsupports fixed delay or selector state waiting (visible,attached,hidden). - browser_screenshot: Capture the current viewport. Supports preset
phone,tablet,desktopsizes, as well ascustomsizes. - browser_navigate: Open a new tab or navigate to a specified URL.
- browser_viewport: Switch the tab’s viewport size. Presets include
auto,phone(390×844),tablet(834×1112),desktop(1280×800), andcustom. - browser_close: Close the specified tab.
- browser_eval: Run JavaScript in the page. This feature is disabled by default and requires
enableEval: trueto be configured for use.
Installation¶
The plugin can be obtained via:
- SkillHub directory: https://www.skillhub.cn/plugins/guanhaisen/dsh-agent-browser
- GitHub repository: https://github.com/guanhaisen/dsh-agent-browser
Typical Usage¶
The following is a typical tool call flow for automated browsing by the model:
browser_navigate { url: "https://example.com" }
browser_read { mode: "elements" } // Get references to interactive elements
browser_act { action: "type", ref: "e1", text: "hello" }
browser_act { action: "click", ref: "e2" }
browser_read { mode: "text" } // Confirm the changes
browser_screenshot { preset: "desktop" }
browser_viewport { preset: "phone" }
browser_close { tabId: "tab4" }
Notes¶
- Platform Limitations: Only supported on desktop (using Electron
<webview>). In the web configuration file, the sidebar browser uses<iframe>, which cannot read the DOM; related operations will return an explicit reason. - Configuration Requirements: The
browser_evalfeature is disabled by default and requiresenableEval: trueto be enabled in the configuration for use. - Status Fields: Tabs have four key status fields.
mountedindicates the DOM is mounted and can be driven;loadingindicates navigation is in progress;failedindicates loading failed (shows an error page);unverifiedindicates the renderer is unresponsive or the document is unreachable. - Screenshot Limitations: Screenshot operations will be rejected when the page is in
failedorunverifiedstatus. - Wait Behavior:
waitsupports fixed delay or waiting based on selector state (visible/attached/hidden).