DeepSeek Harness (dsh) provides web access through the ctx.web seam. The @deads-inc/dsh-web-search-brave plugin implements web search functionality by registering a WebSearchProvider, enabling the built-in web_search tool to use the Brave Search API.
Core Capabilities¶
The plugin primarily provides the following:
- Provider Registration: Registers a
WebSearchProviderinto thectx.webseam. - Tool Support: Supports the built-in
web_searchtool. - Concurrency Control: Achieves concurrency-safe rate limiting by serializing requests within the process, with a default request interval of 1500ms.
- Error Retries: When encountering 429/403 status codes, applies exponential backoff with jitter, retrying up to 3 times, with a maximum backoff limit of 30s per attempt.
- Flexible Configuration: Supports configuration via DSH settings or environment variables.
Installation and Enablement¶
1. Install the Plugin
Install using npm (recommended):
dsh plugin --profile web add @deads-inc/dsh-web-search-brave
2. Configure the API Key
The plugin requires BRAVE_API_KEY to run. Before restarting dsh, export the environment variable:
export BRAVE_API_KEY=<your-key>
3. Enable the Search Provider
The plugin registers brave-search by default but does not automatically set it as the default provider. A patch must be configured in cordis.patch.yml:
- id: web
config:
searchProvider: brave-search
The installation script bash install.sh handles the above configuration automatically.
Typical Usage¶
After installation and configuration, you can use the web_search tool directly in the command line:
dsh --profile web "Use web_search to find one page about Node.js 24. Reply with just the URL."
Notes¶
- Environment Requirements: Node.js version >= 18.17 is required.
- Dependencies: The corresponding
@deepseek-ai/*peer dependencies are required (provided by the host DSH). - Security:
- API keys are sent only to the configured
baseURL(default is the official Brave endpoint). - A custom
baseURLis only for proxies or testing; the plugin does not validate its domain. - The plugin has no postinstall scripts, no telemetry, and no other network calls.
- API keys are sent only to the configured
Ecosystem Context¶
DSH adopts a plugin-based architecture. This plugin is maintained by the community, published only via npm, and does not involve any official app store logic. For more details and source code, refer to the GitHub repository.