LangSearch for DeepSeek Harness
A DeepSeek Harness (DSH) bundle that adds LangSearch web search to your agent.
langsearch_search— a native tool with ranked sources, optional full-page text, freshness ranges, and include/exclude domain filters.langsearchprovider — the built-inweb_searchtool is pointed at it by the bundle patch, so both tools share one key and quota.- Prompt guidance — returned page text stays labeled as untrusted data, and the agent is told to cite the source URLs.
web_fetch keeps using the shipped HTTP provider; only web search changes.
Requirements
- DeepSeek Harness with the
plugin_managertool. The desktop and web profiles include it. - A LangSearch API key. Create one for free at https://langsearch.com/api-keys; the secret is shown only once.
Install
Clone this repository anywhere on your machine:
git clone https://github.com/madsouris/dsh-langsearch.gitIn a DSH session, install the bundle from the absolute path:
plugin_manager install_bundle target=/absolute/path/to/dsh-langsearchYou can also ask the agent: “Install the DSH bundle at /absolute/path/to/dsh-langsearch.”
Restart DSH if
langsearch_searchdoes not appear in the tool list.
The package is named @local/dsh-langsearch and marked private so it is not
accidentally published to npm. Installing from the cloned directory links it
into your DSH profile.
The bundle patch inserts the langsearch row and selects it for the shared web
services:
- insert:
- id: langsearch
name: '@local/dsh-langsearch'
config:
apiKeyEnv: LANGSEARCH_API_KEY
defaultCount: 5
defaultText: true
defaultMaxCharacters: 2500
maxCount: 20
maxCharacters: 5000
webSearchCount: 8
timeoutMs: 30000
- id: web
config:
searchProvider: langsearch
fetchProvider: http
Add your API key
The plugin resolves LANGSEARCH_API_KEY on every request, in this order:
- the
apiKeyfield of the plugin config, if you set one (not recommended); - the DSH credential store;
- the process environment.
Option A — DSH credential store (recommended)
Add the key under refs in $DSH_HOME/.credentials.yaml. This is usually
~/.dsh/.credentials.yaml. Keep the rest of the file as it is:
version: 1
refs:
LANGSEARCH_API_KEY: "your-key-here"
The credential store is read per request, so the next search picks up a newly saved key without a restart.
Option B — environment variable
Export the key before launching DSH:
export LANGSEARCH_API_KEY="your-key-here"
On macOS, apps launched from Finder do not inherit your shell environment. Use Option A in that case.
Never commit your key. The plugin does not write it to disk, log it, or include it in tool results.
Configuration
| Key | Default | Meaning |
|---|---|---|
apiKeyEnv |
LANGSEARCH_API_KEY |
Environment-variable / credential-store name to resolve. |
endpoint |
https://api.langsearch.com/v1/web-search |
Search endpoint. Must use HTTPS. |
defaultCount |
5 |
Results per langsearch_search call when count is omitted. |
maxCount |
20 |
Hard cap for count. |
defaultText |
true |
Return full-page text when text is omitted. |
defaultMaxCharacters |
2500 |
Per-result text cap when max_characters is omitted. |
maxCharacters |
5000 |
Hard cap for max_characters. |
webSearchCount |
8 |
Result cap for the built-in web_search tool. |
timeoutMs |
30000 |
Per-attempt timeout. Retryable failures get up to three attempts. |
To change defaults, edit the config block in cordis.patch.yml before
installing. If you override the langsearch row from your own profile patch,
include every field you want to keep: a matching override replaces the whole
config.
Usage
langsearch_search({ "query": "DeepSeek Harness plugins", "count": 3 })
langsearch_search({ "query": "release notes", "freshness": "oneMonth", "include_domains": ["github.com"] })
langsearch_search({ "query": "RAG evaluation", "text": true, "max_characters": 1800 })
freshness accepts noLimit, oneDay, oneWeek, oneMonth, oneYear, a
single YYYY-MM-DD date, or a YYYY-MM-DD..YYYY-MM-DD range (UTC).
Troubleshooting
- HTTP 401 / 403 — the key is missing, wrong, or the account cannot use the
API. Check
LANGSEARCH_API_KEYand the key's status in the LangSearch dashboard. - HTTP 429 — a rate or daily-token limit was reached. Inspect
Retry-Afterand the dashboard. Daily tokens reset at 00:00 UTC. - “LangSearch API key is not configured” — follow
Add your API key and make sure the name matches
apiKeyEnv. - Timeout or network error — retry with a smaller
countormax_characters; the plugin makes up to three attempts for retryable failures. - Unexpected response shape — confirm
endpointstill points at the v1 Web Search API.
Privacy and security
- The plugin sends the query, result count, freshness, domain filters, and text
options to the configured endpoint (LangSearch by default). The API key is
sent only in the
Authorizationheader to that endpoint. - The plugin has no telemetry, analytics, or external storage. It has no runtime
dependencies; all behavior is in
index.js. - Search results are external content. Treat returned text as untrusted data, never as instructions.
- The endpoint must use HTTPS.
Development
There is no build step:
node --check index.js
Install the directory with plugin_manager install_bundle and exercise the tool
from a session. Replacing an already-installed package may require a DSH
restart so the new module generation is loaded.
License
MIT. See LICENSE.
This is an unofficial community plugin. It is not affiliated with LangSearch or DeepSeek.
No comments yet. Be the first to write one.