Introduction

When developing agents with DeepSeek Harness (DSH), a common issue is that the model is not connected to the web by default, or it only calls web_search when it deems necessary. If you want answers in a specific session to include the latest web information, you usually have to repeatedly emphasize “Search before answering” in every round of the prompt.

DSH’s philosophy is “everything is a plugin,” and this kind of behavior can be left to a plugin to handle. The dsh-web-search-toggle introduced below is such a plugin: it adds a “Web Search” toggle to the composer toolbar. Once enabled, it forces the agent to call web_search before answering in every round of that session. This approach aligns with the session-based Web Search toggle found in DeepSeek’s official Web Chat UI.

What is it

dsh-web-search-toggle is a DSH web-profile plugin maintained by SeerableOfficial, MIT licensed, current version 0.1.0, requiring Node >= 20.

One-sentence positioning: provides a session-memory-based “Web Search” toggle in the composer toolbar. When enabled, it injects mandatory system-prompt instructions requiring the agent to call web_search and cite sources before answering in every round. The toggle state is saved per session and persists across page reloads and host restarts.

How it works

The plugin consists of two halves: client and host, following DSH plugin conventions (dsh.bundle.patch + dsh.client).

Client Side

lib/client.js registers the toggle to the composer toolbar (conversation.input.left, i.e., the position next to the permanent access mode/plan/attach controls). When the toggle is clicked, it notifies the host via the client↔host RPC channel.

Button appearance: inactive state is a neutral outline; active state changes to DeepSeek brand blue and includes a green on dot.

Host Side

index.js does two things:

  1. Provides the RPC channel /dsh-web-search, supporting websearch.get-state / websearch.set-state, stores the toggle flag per session, and persists it to ~/.dsh/dsh-web-search-toggle.json;
  2. Registers the system-prompt segment dsh-web-search:force. This segment is evaluated whenever the prompt is assembled: if the current session toggle is on, it injects the instruction “Must call web_search first”; if off, it renders empty (empty segments automatically disappear).

The file structure is as follows:

package.json        Declares dsh.bundle.patch and dsh.client
index.js            Host side: RPC channel + system-prompt forced segment
lib/client.js       Client side: Web Search toggle on composer
cordis.patch.yml    bundle patch, mounts the host side

Why Instructions Instead of Hard Blocking

DSH does not have a primitive for “the model must call a specific tool every round.” Therefore, the forced mechanism here is a persistent, strong system-prompt instruction—according to the README, this is the most authoritative and reliable way to guide the model in this harness. The model will follow it, but following is probabilistic and does not guarantee that web_search is called every round; this is consistent with the behavior of the toggle in DeepSeek’s official Web Chat.

Installation and Usage

There are two prerequisites:

  • Use the DSH web profile (dsh --profile web);
  • Have a web_search search provider configured (built-in DeepSeek search provider, or other provider providing web_search). Note that the web_search tool is registered by the built-in dsh-tool-web package (DeepSeek search provider seam selected automatically) in DSH; this plugin only forces the use of this tool and does not handle its installation.

After meeting the conditions, execute the following under the web profile:

# Recommended way, which will reconcile the bundle list
dsh plugin --profile web add dsh-web-search-toggle

You can also install directly with pnpm (skipping bundle list reconciliation):

cd <your-profile-dir>
npx pnpm add dsh-web-search-toggle
# Then add "dsh-web-search-toggle" to dsh.profile.bundles in package.json

After installation, restart DSH to let the bundle patch take effect at startup:

dsh --profile web restart

Typical Usage

After the steps above, use them in the following order:

  1. Open a session in the DSH web UI;
  2. Click the Web Search pill in the composer toolbar to enable the toggle;
  3. Ask a question—the agent will first call web_search and cite sources in the answer;
  4. Click the toggle again to turn it off and restore default behavior.

The on/off state of the toggle is remembered per session and will not be lost after page reload or host restart.

Suitable Scenarios and Notes

Suitable scenarios: wanting answers in a specific session based on the latest web information without wanting to manually repeat search instructions every round; or wanting the DSH web UI experience to align with the Web Search toggle in DeepSeek’s official Web Chat.

A few notes:

  1. Forcing is probabilistic. Enabling the toggle does not guarantee the model calls web_search every round; it is still recommended to verify sources cited in the answer for key information.
  2. The search provider needs to be configured by yourself. The plugin only forces calling web_search and is not responsible for registering or installing the tool.
  3. Only applicable to the web profile.
  4. Security reminder. The plugin runs with the permissions of the current dsh process; it is recommended to review the source code and license (MIT) before installation. The plugin’s source code is open on GitHub, there aren’t many files, and the cost to read through them is low.

Conclusion

dsh-web-search-toggle solves a specific small problem: turning “search before answering” from a prompt repeated every round into a switch on the input box that can be toggled per session and persisted. Its implementation is also very suitable as a reference for DSH plugin development—client registers UI, host provides RPC and system-prompt segments, sides combine via dsh.bundle.patch + dsh.client conventions.

  • GitHub Repository: https://github.com/SeerableOfficial/dsh-web-search-toggle
  • Community Plugin Directory Page: https://www.skillhub.cn/plugins/SeerableOfficial/dsh-web-search-toggle

It should be noted that the latter is an independent community directory site with no official affiliation to DeepSeek / Hypersphere; this link is from plugin leads and has not been further verified; the GitHub repository is the authoritative source.