Preface¶
In DeepSeek Harness (DSH), enabling agents to operate web pages typically involves assembling HTTP fetchers or miscellaneous scripts: while they can obtain HTML, they struggle to stably handle login states, multi-tabs, dynamic rendering, and interactive controls. Another approach is to integrate third-party browser APIs, but their bindings and lifecycles often disconnect from DSH’s tool registration and session cleanup processes.
Below is an introduction to the community plugin dsh-playwright-browser (maintainer: Clizo1209, SkillHub category: Online Tools). Built on Playwright, it registers a set of native browser_* tools with DSH, providing reusable browser contexts, semantic locators, and multi-tab management. The behavioral design references the Codex Browser skill approach but does not rely on OpenAI’s browser bindings—the controller is managed independently by the plugin.
DSH is currently in a developer preview stage. This plugin is tested against DSH version
0.1.0-rc.6; as DSH evolves, compatibility updates may be required.
What This Is¶
dsh-playwright-browser is a browser automation plugin for DeepSeek Harness. Its current npm version is 0.1.3, and it is released under the MIT license.
The plugin mounts ten browser_* tools in DSH’s tool registry, managed by Cordis for browser lifecycle control. Agents interact with pages using semantic locators (e.g., role=button|Save, label=Email) and receive bounded-length accessibility trees or visible text snapshots after operations, rather than executing arbitrary JavaScript within the page.
Core Features¶
Tool Overview¶
The plugin registers the following ten tools:
| Tool | Function |
|---|---|
browser_open |
Opens a tab, optionally navigating to a URL |
browser_navigate |
Navigates within an existing tab |
browser_snapshot |
Reads a bounded-length accessibility or text snapshot |
browser_click |
Clicks on a semantic target |
browser_fill |
Replaces input field content, optionally submitting with Enter |
browser_press |
Sends Playwright keyboard keys |
browser_wait |
Waits for a target, URL, or loading state |
browser_history |
Goes back, forward, or refreshes |
browser_screenshot |
Saves a PNG and returns its absolute path |
browser_tabs |
Lists, selects, or closes tabs |
Locators and Snapshots¶
Recommended target syntax includes:
role=button|Save
button|Save
label=Email
placeholder=Search
text=Settings
testid=submit
css=#legacy-button
After interaction, a fresh, bounded-length snapshot (default limit: 40000 characters) is returned, allowing agents to verify page state before and after actions.
Browser and Runtime¶
- Lazy-launches the browser; falls back to locally installed Chrome or Edge if Playwright Chromium is unavailable.
- Reuses browser contexts, with tabs using stable identifiers.
- Supports back, forward, refresh, keyboard input, waiting, and PNG screenshots.
- Page operations support abortion; Cordis handles lifecycle cleanup.
- Does not execute arbitrary JavaScript evaluations within the page.
Security Model¶
The plugin treats page content as untrusted data rather than agent instructions. User authorization is required for actions involving form submission, sensitive data, downloads, purchases, permission changes, account modifications, or CAPTCHAs. The browser does not install silently without disclosure; when no browser is available, the agent should explain the minimum configuration and obtain consent. URLs containing embedded credentials are rejected; collaboratively closing a tab cancels any ongoing operations on that page.
Environment Requirements¶
Before installation, confirm:
- Node.js
^22.19.0or>=24.0.0 - A configured DSH profile
- At least one supported browser:
- Playwright Chromium (
npx playwright install chromium) - Google Chrome / Microsoft Edge
- Or specify an executable path via
executablePath
Installation and Enablement¶
Install from npm to the web profile:
dsh plugin --profile web add dsh-playwright-browser
Install from source checkout:
npm install
npm pack
dsh plugin --profile web add ./dsh-playwright-browser-0.1.3.tgz
For headless environments, use the headless profile:
dsh plugin --profile headless add ./dsh-playwright-browser-0.1.3.tgz
After installation, validate the profile combination without starting the process:
dsh --profile web --dump-config
Git installations run the package’s prepare script; pnpm 10 and above may require explicit allowance for this build in the profile’s pnpm-workspace.yaml. When using pre-built npm packages or tarballs, no source compilation is needed within the profile.
Configuration¶
Append configuration in the profile’s cordis.patch.yml (DSH applies user overrides after installed bundle patches):
- id: playwright-browser
config:
browser: chromium
channel: chrome
headless: true
viewportWidth: 1440
viewportHeight: 900
screenshotDir: .dsh-browser/screenshots
Common options:
| Option | Default | Description |
|---|---|---|
browser |
chromium |
chromium, firefox, or webkit |
headless |
true |
Whether to run headless |
channel |
— | Chromium channel, e.g., chrome or msedge |
executablePath |
— | Absolute path to browser executable |
userDataDir |
— | Dedicated automation user data directory |
viewportWidth |
1280 |
Viewport width |
viewportHeight |
800 |
Viewport height |
actionTimeoutMs |
15000 |
Locator and action timeout |
navigationTimeoutMs |
30000 |
Navigation timeout |
maxSnapshotChars |
40000 |
Maximum snapshot return length |
screenshotDir |
.dsh-browser/screenshots |
Screenshot output directory |
Do not point userDataDir to a personal daily-use browser profile directory; use a separate directory dedicated to agent automation.
Typical Usage¶
Agents call browser_* tools in DSH sessions following task chains. A common browsing flow is as follows:
- Use
browser_opento open a tab and navigate to the target URL. - Use
browser_snapshotto read the current page structure and identify interactive elements. - Use
browser_click,browser_fill, orbrowser_pressto perform actions; targets use semantic locators, such aslabel=Emailorbutton|Save. - Use
browser_waitto wait for URL, element, or loading state readiness. - When archiving is needed, call
browser_screenshot; for multi-page tasks, usebrowser_tabsto manage tabs andbrowser_historyto handle back and refresh.
Locator examples:
role=button|Save
label=Email
placeholder=Search
text=Settings
Use Cases and Notes¶
Who Is This For
- Those orchestrating agents in DSH who need stable, observable web automation capabilities.
- Teams looking to reduce fragile CSS selector dependencies by using accessibility trees and semantic locators.
- Scenarios requiring complete browser session management with multi-tabs, screenshots, navigation history, and more.
Pre-Use Considerations
- The plugin runs with the permissions of the current DSH process, accessing files, network, and browser data it can reach. Before installation, review the GitHub repository source code and MIT license to assess whether it meets your security and compliance requirements.
- SkillHub is a community directory site without official affiliation with DeepSeek / High-Flyer; the plugin list and stars (currently 11 on GitHub) reflect community maintenance status and do not represent official endorsement.
- DSH is still iterating rapidly; after upgrading DSH or the plugin version, it is recommended to run
dsh --profile web --dump-configand test your typical task chain.
Links¶
- SkillHub directory page: https://www.skillhub.cn/plugins/Clizo1209/dsh-playwright-browser
- GitHub repository: https://github.com/Clizo1209/dsh-playwright-browser
By following these steps, you can integrate Playwright-driven browser tools into your DSH profile, enabling agents to complete multi-tab web tasks using structured snapshots and semantic locators, without needing to maintain browser controllers and tool registrations yourself.