Preface¶
DeepSeek Harness (DSH) exposes unified web capabilities through ctx.web, and web_search is a common part of this. If you want to use a self-built or local SearXNG to aggregate multiple engines without applying for a separate API Key for search, while also ensuring that search in conversations doesn’t break directly when SearXNG goes down, times out, or returns 5xx errors, you need to mount a provider on the public seam rather than modifying the DSH source code.
The following introduces the community plugin @clinkai/dsh-web-search-searxng (repository w384/clinkai-dsh-web-search-searxng). It connects SearXNG to DSH’s web_search and optionally falls back to the built-in DeepSeek search on failure. The plugin is published by maintainer w384, with the current package version at 0.2.0 and an MIT license. The DSH community plugin directory entry can be found at SkillHub; note that the directory site is not officially affiliated with DeepSeek or High-Flyer, and it is still recommended to read the source code and license yourself before installation.
What is this¶
In one sentence: A SearXNG search provider package for the DSH web profile. It mounts to the Cordis layer via dsh.bundle.patch, does not patch DSH source code, and does not rely on internal DSH exports, so DSH upgrades will not overwrite your plugin layer.
The package registers two provider IDs on the public seam, which can be selected using web.searchProvider:
| provider id | Behavior |
|---|---|
searxng |
Pure SearXNG: GET {baseUrl}/search?q=<query>&format=json |
search-fallback |
First try SearXNG; if the backend is unavailable, hangs, returns 5xx, or (optionally) returns empty results, retry according to fallbackProvider |
The README explains: No API Key required, no billing (SearXNG aggregates multiple engines); search-fallback can transparently use the built-in DeepSeek search when Docker/SearXNG is unreachable. The fallback path requires corresponding providers like searxng and deepseek-official to be registered in the seam registry (usually provided by their respective plugins).
Core Features¶
Division of labor between the two providers¶
searxng: All requests go only to your configured SearXNGbaseUrl. Suitable for instances with stable operations where you accept direct errors when SearXNG fails.search-fallback: In scenarios of connection failure, timeout, HTTP 5xx, and empty results whenfallbackOnEmpty: trueis configured, the scheduler routes tofallbackProvider(defaultdeepseek-official). Caller cancellations, 4xx errors, etc., are passed through as-is without triggering a fallback.
Configuration (Plugin instance web-search-searxng)¶
| key | default | meaning |
|---|---|---|
baseUrl |
http://127.0.0.1:8080 |
SearXNG address |
timeoutMs |
15000 |
Timeout for a single SearXNG request |
fallbackEnabled |
true |
Whether to register the search-fallback provider |
fallbackProvider |
deepseek-official |
Provider ID to use for fallback |
fallbackOnEmpty |
false |
Whether to treat SearXNG empty results as failure and fallback |
Runtime Environment¶
package.json requires Node >=18.17 and DSH >=0.1.5-rc.2 <1.0.0; peer dependencies include @deepseek-ai/dsh-web (optional) etc. The plugin runs with the permissions of the current DSH process. If SearXNG is only listening locally, it must be on the same machine as DSH or network reachable.
Run SearXNG first (Docker)¶
SearXNG has no native Windows support; the README suggests using Docker Compose. The DSH Web GUI occupies 127.0.0.1:8080 by default, so the example maps the container to host port 18081 to avoid port conflicts causing “container running but cannot connect”.
services:
searxng:
image: searxng/searxng:latest
container_name: searxng
ports:
- "127.0.0.1:18081:8080"
volumes:
- ./config:/etc/searxng:rw
restart: unless-stopped
In config/settings.yml, enable JSON format, otherwise the format=json requested by the plugin will not work:
search:
formats:
- html
- json
Real-world testing notes regarding engines from the README (not speculation): Domestic engines like sogou and 360search are disabled by default; if not explicitly enabled, you may see “SearXNG connects but default search yields no results”; google can work if a tunnel or proxy is available; brave, duckduckgo, quark, etc., are easily blocked by bots, and proxies might not solve this. Engines that fail when DNS/tunnels are not ready will be marked as Suspended by SearXNG for a period; you can restart the container before drawing conclusions. You can configure proxies per engine, for example, routing only google through host.docker.internal:12000 while keeping domestic engines on direct connections.
Installation and Activation¶
The package includes dsh.bundle.patch. Upon installation, DSH mounts the provider at the bundle layer; no manual source code modification is needed.
# from npm (once published)
dsh plugin --profile web add @clinkai/dsh-web-search-searxng
# straight from GitHub — no registry needed, the built entry is committed
dsh plugin --profile web add github:w384/clinkai-dsh-web-search-searxng
# from a local checkout, or from a packed tarball
dsh plugin --profile web add link:/path/to/clinkai-dsh-web-search-searxng
dsh plugin --profile web add ./clinkai-dsh-web-search-searxng-0.2.0.tgz
In $DSH_HOME/profiles/<profile>/cordis.patch.yml, override the SearXNG address for this instance and specify the provider used by the seam:
- id: web-search-searxng
config:
baseUrl: http://127.0.0.1:18081
fallbackOnEmpty: true
- id: web
config:
searchProvider: search-fallback # or: searxng
After following the steps above, once the web profile is enabled and restarted or reloaded, web_search dependent on ctx.web will go through the provider you selected.
Typical Usage and Troubleshooting¶
- Only want self-built search and accept no fallback on SearXNG failure: Set
searchProvider: searxng, and ensurebaseUrlmatches the Docker mapping. - Local SearXNG primary, official search as backup: Set
searchProvider: search-fallback, keep the defaultfallbackProvider: deepseek-official, and ensure the official web search provider plugin is installed. - SearXNG often returns empty lists: Set
fallbackOnEmptytotrue(shown in the example above), and empty results will trigger a fallback.
Troubleshooting points from the README:
- 8080 Conflict: When host port 8080 is already occupied by the DSH Web GUI, do not map SearXNG to 8080; use
18081instead and sync thebaseUrl. - Windows Reserved Ports: Hyper-V/WSL NAT may occupy port ranges. If binding fails, run
netsh interface ipv4 show excludedportrange protocol=tcpto troubleshoot.
Use Cases and Notes¶
Suitable for developers already developing agents under the DSH web profile, who want search to go through local SearXNG but do not want to maintain multiple sets of search calling logic. search-fallback is suitable for scenarios where local Docker occasionally stops or engines are unstable, but in-conversation search availability is still required.
Note: The plugin does not replace your judgment regarding SearXNG engine lists, proxies, and compliance; SearXNG and DSH run locally or within your controlled network, with permissions equivalent to the user running DSH. The community directory and GitHub stars (1 star as of data retrieval) are merely discovery entry points and do not imply official endorsement.
Conclusion¶
@clinkai/dsh-web-search-searxng provides two search providers, searxng and search-fallback, on the DSH public web seam. You can switch by configuring baseUrl and searchProvider; on failure, it can fall back to deepseek-official as documented. For details and issues, see the GitHub Repository, and for the directory page, see SkillHub.