dsh-exa-tools: Integrating Exa Search and Scraping Tools into DSH

Introduction

DeepSeek Harness’s (DSH) “everything is a plugin” philosophy makes extensibility highly flexible, but integrating external search services typically requires handling API calls, caching, and result parsing on your own. This plugin adds five Exa tools to every agent in DSH, two of which work out of the box without an API Key. It fills the gap left by DSH’s built-in web_search/web_fetch in terms of semantic search and long-form content fetching.

Plugin Overview

dsh-exa-tools is a DSH plugin maintained by Vikrant-Aleph, categorized as a web tool. It provides DSH agents with Exa-powered search and web page fetching capabilities: semantic search, page content extraction, Q&A generation, advanced filtered search, and similar page discovery. Without an API Key configured, the plugin routes requests through Exa’s free hosted endpoint; with a Key, it uses the official API and unlocks additional features.

Core Features

The plugin registers the following tools for DSH agents:

  • exa_search: Semantic web search — describe the pages you’re looking for in natural language and get back source URLs, titles, and relevant excerpts. No API Key required.
  • exa_fetch: Fetch any web page and return clean body content (text/markdown). No API Key required.
  • exa_answer: Question answering — returns Exa-generated answers with cited sources. API Key required.
  • exa_search_advanced: Advanced search with category, domain, and publication date filters. API Key required.
  • exa_find_similar: Find web pages similar to a given URL. API Key required.

Without an API Key, requests go through Exa’s free hosted MCP endpoint (mcp.exa.ai) with rate limits; with a Key, requests go through the official REST API (api.exa.ai). The Key is entered under “Settings → Exa Search” — no config file changes needed, and it takes effect immediately without a restart. If an API call fails, the plugin automatically falls back to the free endpoint, with the fallback reason noted in the results. This fallback can be disabled on the settings page.

Installation & Enablement

The plugin requires DeepSeek Harness >=0.1.7-rc.1 (Desktop or Web profile). The plugin code itself requires Node.js >=20.3 (DSH’s own runtime requirements may be higher).

Three installation methods are available:

  1. npm install (recommended):
    Open the DSH sidebar → “Plugins” → “Add Plugin”, and enter the package name dsh-exa-tools directly.

  2. Download a Release:
    - Download the latest dsh-exa-tools-<version>.tgz from Releases
    - In the DSH sidebar, go to “Plugins” → “Add Plugin”, and select the tgz file (or paste the Release attachment URL directly)

  3. Git URL / local directory (for developers):
    - Git URL: https://github.com/Vikrant-Aleph/dsh-exa-tools.git
    - Local directory: D:\path\to\dsh-exa-tools (or /path/to/dsh-exa-tools)

When installing from a local directory, DSH references your checkout via a symlink rather than copying it. Before installing, run pnpm install (or npm install) once in the project directory so that the plugin’s dependency on @deepseek-ai/schemastery can be resolved.

After installation, the plugin is enabled immediately (HMR). Open a new session and you can invoke these tools right away (API-only tools require entering a Key on the settings page first).

Typical Usage

Parameters:
- query (string, required): Describe the pages you’re looking for in natural language, e.g., “blog posts comparing React and Vue performance”.
- num_results (integer, optional): Number of results to return (default 5, capped by searchMaxResults, default 10).

The response format is a list of sources: - [Title](url) — Excerpt (publication date). Each excerpt is capped at 800 characters, and a fixed disclaimer is appended: results are external untrusted data; use markdown links when citing.

exa_fetch

Parameters:
- url (string, required): The absolute http(s) URL of the page to read.
- max_characters (integer, optional): Number of body characters to return (default 20,000, capped by fetchMaxCharacters, default 50,000).

The response format is Fetched <url> followed by clean body content. If the content is truncated, this is noted explicitly so the model can fetch more specific sections.

exa_answer (API Key required)

Parameters:
- query (string, required): A natural language question or instruction.

Returns Exa-generated answer + list of cited sources. The answer is generated based on web page content and should likewise be treated as untrusted data.

exa_search_advanced (API Key required)

Parameters:
- query (string, required): Natural language description of the pages you’re looking for.
- num_results (integer, optional): Number of results to return (default 5).
- category (string, optional): Focus category — supports company / publication / news / personal site / financial report / people.
- include_domains (string[], optional): Only return results from these domains.
- exclude_domains (string[], optional): Exclude these domains.
- start_published_date / end_published_date (string, optional): ISO 8601 publication date range.

Response format is the same as exa_search.

exa_find_similar (API Key required)

Parameters:
- url (string, required): The absolute http(s) URL of the reference page.
- num_results (integer, optional): Number of results to return (default 5).
- exclude_source_domain (boolean, optional): Exclude results from the same domain as the reference URL.

Returns a list of similar page sources.

Configuration

The following can be modified in real time on the settings page (Settings → Exa Search): API Key, searchMaxResults, fetchMaxCharacters, searchTimeoutMs, fetchTimeoutMs, and the fallbackToFree toggle.

Deployment-level fields are edited in the profile’s cordis.patch.yml:

- id: exa-tools
  name: dsh-exa-tools
  config:
    search: true            # Registers exa_search
    fetch: true             # Registers exa_fetch
    apiBaseUrl: https://api.exa.ai
    mcpBaseUrl: https://mcp.exa.ai/mcp
Field Default Editable in Plugin Page Description
apiKey (empty) Yes (write-only) Exa API Key; empty = use free MCP endpoint
searchMaxResults 10 Yes Max sources per search (1–50)
fetchMaxCharacters 50000 Yes Max characters per fetch (1,000–500,000)
searchTimeoutMs 30000 Yes Per-search timeout (ms)
fetchTimeoutMs 60000 Yes Per-fetch timeout (ms)
fallbackToFree true Yes Auto-fallback to free endpoint on API failure
search / fetch true No (YAML only) Whether to register the corresponding tool
answer / advancedSearch / findSimilar true No (YAML only) Whether to register the corresponding API-only tool
apiBaseUrl / mcpBaseUrl Official endpoints No (YAML only) Override for proxy or self-hosted MCP

Use Cases & Caveats

Suitable for scenarios requiring semantic search, web page content extraction, filtered search, or similar page discovery. The plugin runs with the current DSH process’s permissions — review the source code and license before installing.

Known limitations:
- The free endpoint has rate limits and shares a quota pool; heavy usage requires an API Key.
- Search excerpts are capped (800 characters each); use exa_fetch for full text.
- Fetch truncation is determined by “length reached the requested budget”; pages that are exactly at the limit may be flagged as truncated.
- The API Key is stored in the profile patch (plaintext on disk); the credentials service is not used in this version.
- EXA_API_KEY environment variable fallback is not yet supported — the Key must come from the plugin page or the profile patch.

The plugin coexists with DSH’s built-in web_search / web_fetch; the system prompt instructs the model on each tool’s purpose and to treat returned content as untrusted data.

Summary

dsh-exa-tools provides DSH with semantic search and web page fetching capabilities that work without an API Key. Adding a Key unlocks Q&A, advanced filtered search, and similar page discovery. It’s well-suited for agent development scenarios that require high-quality external search and fetching capabilities.

  • Plugin directory: https://www.skillhub.cn/plugins/Vikrant-Aleph/dsh-exa-tools
  • GitHub: https://github.com/Vikrant-Aleph/dsh-exa-tools
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye