Introduction¶
The core idea of DeepSeek Harness is “everything is a plugin.” When developing agents that require internet capabilities, pure text conversation cannot satisfy the need to interact with dynamic web pages, handle forms, or scrape real-time data. The dsh-tool-playwright plugin fills this gap by giving the AI real browser control, allowing it to open web pages, click buttons, switch tabs, and read page content like a human.
Plugin Overview¶
dsh-tool-playwright is a native port of Microsoft’s playwright-mcp. It does not require a standalone process or server, and it runs directly inside DeepSeek Harness. The plugin uses the Chromium browser by default and is released under the MIT license.
Installation and Activation¶
Installing this plugin requires three steps: cloning the code, adding a local link reference, and restarting Harness.
- Clone the code
Clone the plugin folder from GitHub.
git clone https://github.com/cheng-nan01/dsh-tool-playwright.git
- Install with a local link
Use thelink:method to register the cloned folder in Harness’swebconfiguration file. Do not move or delete the cloned folder afterward.
dsh plugin --profile web add link:/full/path/to/the/cloned/plugin/folder
*(Replace the path after `link:` with your actual folder path, for example `link:D:\my-plugins\dsh-tool-playwright`.)*
- Restart Harness
After the plugin is added to the startup list, the Harness process must be restarted for the change to take effect.
# 停止当前进程 (Ctrl+C)
# 重新启动
pnpm dsh web
Core Features¶
This plugin provides a complete set of browser automation tools, mainly divided into the following categories:
- Page navigation and operation:
browser_navigate(open a web page),browser_back(go back),browser_forward(go forward),browser_reload(refresh),browser_wait_for(wait for page loading). - Interaction:
browser_click(click),browser_type(type text),browser_type_submit(type and submit a form),browser_select_option(select a dropdown option),browser_hover(hover),browser_focus(focus),browser_press_key(press a key),browser_drag(drag),browser_upload_file(upload a file). - Content viewing:
browser_snapshot(capture a page structure snapshot for the AI to read). - Tab management:
browser_tab_new(open a new tab),browser_tab_switch(switch tabs),browser_tab_close(close a tab),browser_tab_list(list all tabs). - Window and output:
browser_resize(resize the window),browser_screenshot(take a screenshot),browser_pdf(save as PDF). - Network and debugging:
browser_console_messages(read console messages),browser_network_requests(view network requests). - Advanced features:
browser_evaluate(execute JS code),browser_storage_state(manage storage state),browser_init_script(inject a script),browser_tracing_start/stop(performance tracing). Note: advanced features are disabled by default and must be enabled manually.
Typical Usage¶
In the Harness Web interface, usually at http://127.0.0.1:3080, the AI can call the tools above directly. Common usage patterns include:
- Open a web page: use
browser_navigatewith the target URL. - Click a button: use
browser_click; the AI locates the element by theref(index) or CSS selector from the page snapshot. - Fill a form: use
browser_typeorbrowser_type_submit. - Inspect structure: use
browser_snapshot; the AI reads the structured list to decide the next action. - Work across multiple tabs: use
browser_tab_switchto switch between pages. - Screenshot feedback: use
browser_screenshotto confirm the result of an action or attach it as a log file.
Configuration and Notes¶
The plugin is configured using cordis.patch.yml. Note that Patch configuration overrides rather than merges the original configuration, so a full configuration block usually needs to be rewritten when making changes.
Example configuration (added to $DSH_HOME/profiles/<name>/cordis.patch.yml):
- id: dsh-tool-playwright
config:
browser: chromium # 浏览器引擎:chromium / firefox / webkit / msedge
headless: false # false = 显示浏览器窗口,true = 后台运行
viewport:
width: 1280 # 窗口宽度
height: 720 # 窗口高度
timeoutMs: 30000 # 单次操作超时时间(毫秒)
capabilities:
screenshot: true # 允许截图
pdf: true # 允许导出 PDF
network: true # 允许查看网络请求
Important notes:
- Runtime environment: the plugin runs inside the Harness process and does not require deploying an additional server.
- Permissions and security: the
browser_evaluatefeature, which can execute arbitrary code, is disabled by default for security reasons. Enable it only in trusted environments. - Configuration changes: Harness must be restarted after modifying the configuration.
- Installation method: installing with
link:creates a shortcut. The code is not copied, so do not move the plugin source folder. - License: MIT license (conceptual inspiration from playwright-mcp, implementation is original).
Summary¶
dsh-tool-playwright provides standardized browser automation capabilities for DeepSeek Harness. It integrates a solution that would otherwise depend on an external MCP server into a native Harness plugin, simplifying deployment. For building agents that require real internet interaction capabilities, this is an essential tool component.
View the plugin directory
View source code and documentation