DSH-Browser: A Playwright Browser Automation Plugin for DeepSeek Harness

Preface

The plugin-based approach of DSH allows agents to decompose external capabilities into tool calls. Browser operations are one common category of need: opening pages, filling forms, clicking buttons, reading content rendered by SPAs, and then taking screenshots for review. The community plugin catalog is an independent site and has no official affiliation with DeepSeek / High-Flyer. dsh-browser solves the problem of letting agents directly drive real web pages.

What This Is

dsh-browser is a Playwright-driven browser automation plugin for DeepSeek Harness, providing a set of browser_* tools for opening pages, navigating, clicking, typing, selecting options, taking screenshots, executing JavaScript, and reading page content.

Repository URL:

https://github.com/ben7am1n/dsh-browser

Core Tools

The following tool capabilities are listed in the verified materials:

  • browser_open: Opens or reuses a browser, optionally navigating to a URL.
  • browser_navigate: Navigates the current page and waits for loading.
  • browser_click: Clicks an element via a CSS selector.
  • browser_type: Types text into an input field, optionally pressing Enter.
  • browser_select: Selects an option in a <select>.
  • browser_screenshot: Captures a PNG to <workspace>/browser-screenshots/, which can be viewed with read_image.
  • browser_eval: Executes JavaScript in the page and returns JSON.
  • browser_get_text / browser_get_html: Reads visible text or outer HTML.
  • browser_wait: Waits for slow pages or lazy-loaded content.
  • browser_close: Closes the browser, which can be reopened by any tool.
  • browser_install: Explains or verifies browser availability.

Browser state persists across tool calls. You can open a browser once with browser_open, then make multiple calls to other tools to drive the same browser, and finally close it with browser_close.

It runs in headless mode by default; the verified materials mention that headed mode may be provided later.

Installation and Enablement

First, add the plugin for the target profile:

dsh plugin --profile <name> add dsh-browser

This plugin depends on playwright-core and requires a Chromium-based browser. It automatically attempts channels in the following order:

chromium → chrome → msedge

If no usable browser is available in the current environment, you can install Chromium:

npx playwright install chromium

You can also specify the browser executable or channel in the plugin configuration, for example, by setting launch.executablePath or launch.channel.

Configuration Options

The configuration fields listed in the verified materials are:

Field Default Description
launch.executablePath Absolute path to the browser binary, with higher priority
launch.channel auto (chromiumchromemsedge) Browser channel
launch.navigationTimeoutMs Default navigation/action timeout
launch.viewport 1280×800 Page viewport
screenshotDir browser-screenshots Screenshot directory under the workspace

To override the browser channel and timeout in a profile, you can write a configuration like the following:

# profile cordis.patch.yml
- id: browser
  config:
    launch:
      channel: chrome
      navigationTimeoutMs: 30000

This example fixes the browser channel to chrome and sets the navigation/action timeout to 30000 milliseconds.

Typical Usage

You can follow the steps below in order:

  1. Add the plugin and confirm the profile loads successfully.

  2. Verify browser availability; if unavailable, run the following command, or configure launch.executablePath / launch.channel:

npx playwright install chromium
  1. Have the agent call browser_open to open the target URL, or reuse an existing browser.

  2. Call tools such as browser_click, browser_type, browser_select, and browser_wait as needed by the page.

  3. Call browser_get_text, browser_get_html, or browser_eval when page content is needed.

  4. Call browser_screenshot when visual judgment is needed. Screenshots are saved in the calling agent’s workspace, by default in the browser-screenshots directory, and can then be read with read_image.

  5. Call browser_close to close the browser after task completion.

Dependencies and Version Constraints

The version declared in package.json is 0.1.1. The runtime-related dependencies include:

{
  "dependencies": {
    "@deepseek-ai/schemastery": "^3.18.1",
    "playwright-core": "^1.49.0"
  },
  "peerDependencies": {
    "@deepseek-ai/cordis": "^4.0.1",
    "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
    "@deepseek-ai/dsh-tools": "^0.1.0-rc.6"
  }
}

This means the deployment environment must not only install the plugin itself, but also satisfy the corresponding peer dependency version constraints, and have a usable Chromium-based browser available.

Applicable Scenarios and Notes

dsh-browser is suitable for developers who need to handle real web pages within DSH agent workflows, such as form filling, multi-step clicking, SPA content reading, JavaScript evaluation, and reviewing screenshots afterward.

Notes:

  • The plugin runs with the current dsh process permissions. It can execute JavaScript in pages, read page content, manipulate forms, and take screenshots. It is recommended to review the source code, dependencies, and license before installation.
  • The license is MIT.
  • It runs headless by default; headed mode is described in the verified materials as possibly provided later.
  • Screenshots are located in the workspace of the calling agent, and the model needs to use read_image to read them.

Conclusion

The value of dsh-browser lies in turning steps like “open a browser, operate the page, read results, and take screenshots for review” into part of DSH tool calls, reducing the repetitive work of writing browser scripts separately for each agent.

GitHub:

https://github.com/ben7am1n/dsh-browser

Catalog page: This article does not provide a link.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye