DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

madsouris /

madsouris/dsh-langsearch

Verified

LangSearch web search for DeepSeek Harness: native langsearch_search tool plus a web_search provider.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@96cba6a0

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.
  • langsearch provider — the built-in web_search tool 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_manager tool. 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

  1. Clone this repository anywhere on your machine:

    git clone https://github.com/madsouris/dsh-langsearch.git
    
  2. In a DSH session, install the bundle from the absolute path:

    plugin_manager install_bundle target=/absolute/path/to/dsh-langsearch
    

    You can also ask the agent: “Install the DSH bundle at /absolute/path/to/dsh-langsearch.”

  3. Restart DSH if langsearch_search does 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:

  1. the apiKey field of the plugin config, if you set one (not recommended);
  2. the DSH credential store;
  3. 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_KEY and the key's status in the LangSearch dashboard.
  • HTTP 429 — a rate or daily-token limit was reached. Inspect Retry-After and 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 count or max_characters; the plugin makes up to three attempts for retryable failures.
  • Unexpected response shape — confirm endpoint still 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 Authorization header 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.

—/ 5

No ratings yet

Verified DSH bundle

Commit 96cba6a0364f

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout