把 AnySearch 接入 DeepSeek Harness,提供实时网页搜索、垂直领域搜索和并发批量搜索能力。
- 语言
- TypeScript
- License
- MIT
- 分支
- main
安装
$ dsh plugin --profile web add github:anysearch-team/anysearch-dsh在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
一句话定位
把 AnySearch 的搜索能力作为插件接入 DeepSeek Harness,让 Harness 自带的网页搜索改走 AnySearch 的实时数据源,同时新增垂直领域搜索和并发批量搜索工具。
核心能力
- 把 Harness 内置的
web_search改用 AnySearch 作为数据源,返回带标题、摘要、URL 的结果,便于引用 - 提供
anysearch_capabilities工具,让模型实时发现可搜索领域、垂直分类和支持的参数 - 提供
anysearch_search工具,支持按标签、地区、语言和动态参数执行垂直搜索,可按需返回清洗后正文 - 提供
anysearch_batch_search工具,一次并发执行 1 至 5 个独立搜索,单项失败不影响其他结果 - 通过 DSH 受管凭据解析 API Key,轮换凭据后下一次请求自动生效,无需重启 DSH
- 在没有 API Key 时回退到 AnySearch 匿名额度,便于先体验再注册
技术实现
- 语言: TypeScript(ESM,
type: module,sideEffects: false) - 关键依赖:
@deepseek-ai/cordis(Cordis 插件运行时)、@deepseek-ai/dsh-tools(工具注册)、@deepseek-ai/dsh-credentials(凭据解析)、@deepseek-ai/schemastery(配置 Schema) - 架构模式: Cordis 插件;
cordis.patch.yml把searchProvider设为anysearch并注册web-search-anysearch条目;插件apply()通过ctx.web.registerSearchProvider替换默认搜索 Provider,并往ctx.tools注册三个高级工具 - 入口文件:
src/index.ts(导出apply、Config、name = 'web-search-anysearch'、inject = ['web', 'credentials', 'tools'])
适用场景
Harness 用户希望在不让模型脱离 Harness 的前提下,获得更实时、更专业的搜索结果——例如需要跨金融、学术、法律、代码等垂直数据源的查询,或者同一回合里同时跑多个独立搜索任务。该插件把 AnySearch 的搜索基础设施挂在 Harness 的工具体系里,普通提示词继续走 web_search,需要专业搜索时由模型自动调用高级工具。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| DSH(cordis/credentials/tools/web) | 0.1.0-rc.6+(cordis ≥4.0.1-rc.1 <5) | 来自 peerDependencies |
| Node.js | ^22.19.0 或 >=24.0.0 | 来自 engines.node |
| pnpm | 11.7.0+ | DSH plugin 命令依赖 pnpm 管理 profile |
| 平台 | macOS / Windows / Linux | README 声明三平台共用同一条安装命令 |
| 原生模块 | 无 | 纯 HTTP 客户端,无 node-pty、node:sqlite 等原生依赖 |
安装方式
dsh plugin --profile web add github:anysearch-team/anysearch-dsh
配置项
| 配置 | 类型 | 说明 | 默认值 |
|---|---|---|---|
apiKeyEnv | 字符串(凭据引用名) | DSH 凭据引用,解析失败时走 AnySearch 匿名额度 | ANYSEARCH_API_KEY |
baseURL | 字符串(绝对 URL) | AnySearch API 基础地址,必须是 http 或 https,不能带用户信息 | https://api.anysearch.com |
maxRenderedContentChars | 整数(≥1) | 单次高级工具调用向模型展示的清洗正文字符上限 | 12000 |
常见问题
Q: 这个插件是做什么的?
A: 它把 AnySearch 接到 DeepSeek Harness,让 Harness 自带的 web_search 与三个新增工具都走 AnySearch 的实时数据源,普通网页搜索与垂直搜索、批量搜索共用同一份凭据。
Q: 必须配置 API Key 才能用吗?
A: 不需要。快速体验无需 API Key,请求走 AnySearch 匿名额度。注册 AnySearch 账号并写入 ~/.dsh/.credentials.yaml(键名 ANYSEARCH_API_KEY: "as_sk_xxx")或同名环境变量后,每天可获 1000 次免费调用额度。
Q: 它和 Harness 自带的 web_search 是什么关系?
A: 安装后 cordis.patch.yml 把 web.searchProvider 设为 anysearch,普通查询仍由 Harness 调用 web_search,只是底层数据源换成 AnySearch;专业搜索则交给新工具 anysearch_search、anysearch_batch_search、anysearch_capabilities。
Q: 如何卸载?
A: 运行 dsh plugin --profile web remove @anysearch/anysearch-dsh,Harness 会移除 AnySearch Provider 并回退到内置搜索 Provider;更新则用 dsh plugin --profile web update @anysearch/anysearch-dsh。
Q: 不支持 Windows / Linux / macOS 吗?
A: 三平台均支持,安装命令相同,但要求 Node.js、npx、pnpm 都已加入 PATH。
Q: 报错怎么办?
A: 插件的所有错误都归到 AnySearchClientError,并带上 request_id、httpStatus、retry-after 等诊断字段;可用 dsh --profile web --dump-config 检查组合配置(凭据值不会输出)。若怀疑是上游问题,可参考返回的 request_id 联系 AnySearch 排查。
上手难度
入门 — 安装命令一键完成,默认配置即可工作,无需手动修改 YAML;只有需要自定义 API 地址或限额时才需要编辑配置。
已知问题与限制
- DeepSeek Harness 仍处于开发预览阶段,可能发布不兼容变更(见 README "Compatibility and limitations")
- 当前不提供
anysearch_extract工具,抽取完整网页需要改用 AnySearch MCP - DSH 设置页当前没有第三方 Provider 凭据输入项,API Key 只能通过受管凭据文件或环境变量配置
- 单次批量搜索最多 5 个独立请求(
src/tools/batch.ts:16),单次工具超时 60 秒(src/limits.ts:2)
@anysearch/anysearch-dsh
AnySearch-powered real-time web and vertical search for DeepSeek Harness.
English | 简体中文
@anysearch/anysearch-dsh connects AnySearch to DeepSeek Harness as a plugin. Keep using Harness's native web_search while gaining real-time web search, vertical search, and concurrent batch search.
AnySearch is search infrastructure for AI agents, covering the public web and specialized data sources across code, finance, academia, law, security, and more.
Quick start
For AI Agents
# Fetch the complete installation guide, read it end to end, and then follow it step by step:
curl -fsSL https://raw.githubusercontent.com/anysearch-team/anysearch-dsh/refs/heads/main/docs/agent-installation.md
For Humans
Install the plugin into the web profile:
npx -y @deepseek-ai/dsh plugin --profile web add @anysearch/anysearch-dsh
Start DeepSeek Harness:
npx -y @deepseek-ai/dsh web
No API key is required for a quick start. Requests use AnySearch's anonymous quota until you configure one.
What you get
- Through Harness's built-in
web_search, AnySearch returns results with titles, snippets, and URLs for easy citation. - Discover searchable domains, vertical categories, and supported parameters in real time, then run advanced searches using tags, regions, languages, and structured parameters.
- Run one to five searches concurrently; an individual failure does not affect the other results.
- Advanced search can return cleaned page content on demand for deeper research.
Optional API key
Try it without an API key.
Sign up for an AnySearch account and configure an API key to get 1,000 free search calls per day.
Sign up or sign in at anysearch.com, then visit API Keys to get one. Store the key in $DSH_HOME/.credentials.yaml (~/.dsh/.credentials.yaml by default):
ANYSEARCH_API_KEY: "as_sk_your_key"
The plugin resolves the managed credential for every operation, so credential rotation reaches the next request without restarting DSH. A launching ANYSEARCH_API_KEY environment variable has higher priority.
Inspect the composed profile without exposing the credential value:
npx -y @deepseek-ai/dsh --profile web --dump-config
Tools
| Use case | Harness tool |
|---|---|
| Ordinary web search | web_search |
| Discover available domains and tags | anysearch_capabilities |
| Vertical or parameterized search | anysearch_search |
| Run one to five searches together | anysearch_batch_search |
For ordinary prompts, let Harness select the tool. Models can discover live domain and parameter definitions before making a specialized search.
Environment requirements
Requires Node.js 22.19 or Node.js 24+, pnpm 11.7, and DeepSeek Harness. The DSH plugin command uses pnpm to manage profile dependencies, so pnpm must be available on PATH.
Windows, Linux, and macOS use the same installation command. Before installing, ensure that Node.js, npx, and pnpm can all be run directly from PATH.
Configuration
The bundled profile layer automatically selects AnySearch as the existing ctx.web provider and mounts the advanced tools, so no changes are required by default.
To customize it, ask an AI assistant—or edit it manually—to add the complete block below to the target DSH profile's user configuration layer, overriding the bundled id: web-search-anysearch entry. Keep the id unchanged, replace the complete config, and do not add a second AnySearch provider under a different ID:
- id: web-search-anysearch
config:
apiKeyEnv: ANYSEARCH_API_KEY
baseURL: https://api.anysearch.com
maxRenderedContentChars: 12000
| Field | Default | Purpose |
|---|---|---|
apiKeyEnv | ANYSEARCH_API_KEY | DSH credential reference; missing uses anonymous access |
baseURL | https://api.anysearch.com | AnySearch API base URL |
maxRenderedContentChars | 12000 | Maximum cleaned-content characters rendered to the model per advanced tool call |
Manage the plugin
Update:
npx -y @deepseek-ai/dsh plugin --profile web update @anysearch/anysearch-dsh
Remove:
npx -y @deepseek-ai/dsh plugin --profile web remove @anysearch/anysearch-dsh
Compatibility and limitations
- DeepSeek Harness is in developer preview and may make compatibility-breaking changes.
- This plugin currently does not provide
anysearch_extract. For full-page extraction, use AnySearch MCP. - Configure the API key through DSH-managed credentials or an environment variable; the DSH settings page does not currently provide a third-party Provider credential field.
Documentation
Community & Support
Join the AnySearch community to share your experience, report issues, and get technical support.
- GitHub Issues: submit bug reports and usage feedback.
- WeChat Group: scan the QR code below and complete the group survey; staff will invite you after review.
- Discord Community: scan the QR code or follow the link to join directly.
WeChat group survey![]() | Discord invite![]() |
Development
git clone https://github.com/anysearch-team/anysearch-dsh.git
cd anysearch-dsh
pnpm install
pnpm run check
The live AnySearch E2E suite is opt-in. Run it without ambient credentials in anonymous mode:
ANYSEARCH_E2E=1 ANYSEARCH_E2E_ANONYMOUS=1 pnpm run test:e2e

