Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When an agent needs to handle web interactions, hard-coding Playwright calls directly into the Agent or using standalone browser scripts often leads to chaotic state management, insufficient environment isolation, and separation from the Agent’s context. The dsh-browser-runtime plugin aims to solve this pain point by extending the DeepSeek Harness Agent into an Agent with real browser capabilities.

This plugin is maintained by LHKong7 and is currently an open-source project under the model inference category. It is not simply a collection of Playwright calls, but a complete browser runtime environment responsible for managing the browser lifecycle, serializing operations, checkpoint recovery, and isolated communication with the Agent.

Installation and Prerequisites

Before use, ensure the environment meets the following conditions:

  • DeepSeek Harness is installed and running.
  • Node.js version is ^22.19 or >=24.
  • pnpm version is 10.

To install the plugin, use the official command to complete the bundled installation of the plugin, Provider, and toolchain:

dsh plugin --profile web add -w dsh-browser-runtime

After installation, you need to install the built-in Chromium runtime and verify the environment:

dsh-browser-runtime install chromium
dsh-browser-runtime doctor

The dsh-browser-runtime doctor command reports the Node version, plugin version, Chromium path, and Provider availability. If the environment check does not pass, the command exits with a non-zero status code.

If installing from a local Git repository, you may need to add build permissions in the profile’s pnpm-workspace.yaml when using pnpm 10:

allowBuilds:
  dsh-browser-runtime: true

Core Features

The plugin provides 18 commonly used browser tools covering navigation, observation, interaction, waiting, and structured extraction. These tools are guided by the Agent’s system prompt, enabling the Agent to understand how to use them.

1. Browser Operations and Observation

  • browser_open: Opens a specified URL and returns observation results.
  • browser_observe: Refreshes the page text and interactive element references.
  • browser_observe_next: Reads the next page content from the latest observation result.
  • browser_wait: Waits for a page or element state change before observing.

2. Interaction and Form Handling

  • browser_click: Clicks a referenced element from the observation result.
  • browser_fill: Fills a non-password field.
  • browser_fill_credential: Fills a field using stored credentials (requires a configured credential source).
  • browser_press: Sends a key press to the focused element.
  • browser_select: Selects a dropdown option.
  • browser_check: Sets a checkbox or radio button.
  • browser_scroll: Scrolls the page.

3. Navigation and Screenshots

  • browser_back / browser_forward / browser_reload: Manages the browser history.
  • browser_screenshot: Saves a full-page or viewport screenshot.

4. Structured Extraction

  • browser_extract_list / _table / _links / _article: Extracts structured data from a specified region.

Runtime Features

Isolation and State Management

Each DSH Agent object owns its own BrowserContext and Page. This means multiple Agents running in parallel do not share cookies, navigation state, or page references. This solves the state pollution problem in concurrent multi-Agent scenarios.

Checkpoint Recovery

The plugin supports the resume checkpoint feature. By saving cookies and localStorage, the Agent can restore the previous session state after the browser restarts. It also supports ephemeral mode, which starts a fresh, stateless browser environment.

Security and Evidence

The plugin includes a strict public-network default policy, bounded output limits, and an approval-aware credential channel. Each admitted action logs pre- and post-action evidence, elapsed time, result, and a machine-routable recovery line to facilitate diagnosis and retry when a failure occurs.

Reference Mechanism and Stale Prevention

The Agent receives references (refs) generated from the latest observation, rather than CSS selectors or JavaScript written by the model. The runtime and Provider perform stale-reference checks to validate whether the target element is still valid before execution, preventing failures caused by DOM changes on the page.

Typical Usage

After installation and verification are complete, start the Agent under the Web Profile and describe the task in natural language. The Agent automatically receives the browser_* tools along with usage guidance.

For example, ask the Agent to open Hacker News and extract the top ten stories:

  1. Start the Web Profile.
  2. Describe the task: “Open Hacker News and extract the top ten stories.”
  3. The Agent executes browser_open and browser_observe to obtain page references.
  4. The Agent calls tools such as browser_extract_list to extract the data.

In a Product Hunt practical example, the Agent recorded a run in non-headless mode, successfully opened Product Hunt, scraped links for 24 of the latest products, and generated a Markdown report in 1 minute and 13 seconds, without relying on web search as a fallback.

Notes

  • Permissions and Runtime: The plugin runs with the permissions of the current DSH process. Therefore, carefully review the source code and the license (MIT) before installation.
  • Performance Recommendations: For lists containing hundreds or thousands of static records, prioritize using the official API or direct scraping instead of relying on browser pagination and extraction tools.

Summary

By wrapping Playwright as a standard DSH plugin, dsh-browser-runtime provides the DeepSeek Harness Agent with production-grade browser interaction capabilities. Through isolated environments, state checkpoints, action evidence logging, and secure credential handling, it makes building complex web automation Agents more reliable and easier to maintain.

  • Plugin directory: https://www.skillhub.cn/plugins/LHKong7/dsh-browser-runtime
  • GitHub repository: https://github.com/LHKong7/dsh-browser-runtime