Introduction¶
In the development of DeepSeek Harness (DSH), agents need to access external knowledge bases to obtain the latest academic information. When facing a large volume of arXiv papers, directly crawling PDFs or building full-text indexes is not only costly but often exceeds local processing capabilities. The dsh-arxiv plugin is designed to address this need by providing lightweight paper search and abstract retrieval capabilities through arXiv’s public Atom API.
Plugin Positioning¶
This is a function plugin designed for DSH and maintained by developer jwilson411. Its core positioning is a “read-only query tool.” It does not involve PDF downloads, full-text extraction, or local storage, and is only used to answer the two questions: “What papers are there about X?” and “What is this paper?”
Core Features¶
The plugin registers two tools for the model:
* arxiv_search: executes paper search.
* arxiv_get: retrieves detailed information for a specific paper.
The plugin strictly follows the following principles:
* Read-only: query only; does not modify arXiv server data.
* Stateless: does not maintain local caches or sessions.
* No credentials: does not require API keys or login information.
* No PDF processing: does not download or parse PDF files; returns metadata and abstracts only.
Installation and Enablement¶
Run the following command in the terminal to add the plugin to the web profile:
dsh plugin --profile web add github:jwilson411/dsh-arxiv
This command appends the plugin’s manifest as a bundle patch to the profile’s configuration.
Typical Usage¶
1. Search Papers¶
Use the arxiv_search tool to search by keywords or arXiv query syntax.
Example invocation:
// 在 DSH 上下文中
{
"tool": "arxiv_search",
"arguments": {
"query": "au:Hinton AND cat:cs.LG",
"max_results": 5
}
}
Response structure:
{
"query": "au:Hinton AND cat:cs.LG",
"search_query": "...",
"max_results": 5,
"returned": 5,
"papers": [
{
"id": "1706.03762v7",
"title": "Attention Is All You Need",
"authors": ["Ashish Vaswani", "Noam Shazeer", "..."],
"published": "2017-06-12T17:57:34Z",
"abstract": "The dominant sequence transduction models are based on …",
"pdf_url": "https://arxiv.org/pdf/1706.03762v7",
"abs_url": "https://arxiv.org/abs/1706.03762v7"
}
],
"plugin": "dsh-arxiv"
}
Query syntax notes:
This tool supports arXiv field prefixes (for example, ti: title, au: author, cat: category). If the query begins with a field prefix, it is passed through to the arXiv API unchanged.
2. Retrieve Paper Details¶
Use the arxiv_get tool to retrieve paper information by ID.
Example invocation:
{
"tool": "arxiv_get",
"arguments": {
"id": "1706.03762"
}
}
Supported ID formats:
The plugin automatically normalizes IDs and supports multiple formats:
* Standard format: 1706.03762
* With version: 1706.03762v7
* Protocol prefix: arxiv:1706.03762
* URL form: /abs/1706.03762
Note: The plugin preserves the version suffix (such as v7) to avoid version ambiguity. If the ID does not exist, it throws an ARXIV_NOT_FOUND error.
Configuration and Headless Mode¶
Network Limits Configuration¶
The plugin calls https://export.arxiv.org/api/query over HTTP. To avoid blocking, requests are subject to the following limits, which can be adjusted in the configuration file:
- insert:
- id: arxiv
name: dsh-arxiv
config:
timeoutMs: 15000
maxBytes: 2097152
Headless Usage¶
In a Node.js environment, there is no need to start a full profile. You can directly use factory functions to drive the tools.
Example code:
import { createArxivSearchTool } from 'dsh-arxiv'
// 使用全局 fetch 进行实际网络请求
const search = createArxivSearchTool({ fetch: globalThis.fetch })
const exec = { signal: AbortSignal.timeout(20_000) }
const result = await search.execute(
{ query: 'au:Hinton AND cat:cs.LG', max_results: 5 },
exec
)
console.log(`${result.returned} paper(s) for ${result.search_query}`)
for (const paper of result.papers) {
console.log(` ${paper.id} ${paper.title}`)
}
If offline testing is needed, you can pass in a mocked fetch function.
Use Cases and Considerations¶
Use cases:
* Quickly retrieve the latest paper list in a specific field.
* Retrieve paper metadata (authors, abstract, publication date) for downstream processing.
* Run automated queries in headless environments, such as CI/CD or servers.
Considerations:
1. Data ownership: The plugin only returns data from the official arXiv API. Data rights belong to arXiv and its authors, not to the plugin.
2. Citation rules: Use the returned abs_url or pdf_url for citations. Do not treat the plugin as the data source.
3. Compliance: The plugin identifies itself using a custom User-Agent. When using it, please comply with the arXiv API Terms of Use and avoid high-frequency requests that may impact the service.
4. License: The plugin code is released under the MIT license. However, this license covers only the plugin code itself, not the retrieved paper content.
Summary¶
dsh-arxiv is a lightweight plugin focused on “querying” rather than “storage.” By wrapping arXiv’s Atom API, it provides a standardized paper retrieval interface for the DSH ecosystem and is suitable for scenarios that need to integrate academic search functionality into applications.