Introduction¶
When working with agents or long conversations in DeepSeek Harness (DSH), a common issue is that materials are scattered across the download directory, various project docs/ folders, hand-written library.js files, and links temporarily saved in conversations. For the model to read files, you have to specify the path manually, and there is no unified entry point for self-searching, deduplication, or repository ingestion. Treating folders as a “knowledge base” often results in inconsistent preview formats, and papers require separate retrieval sites.
dsh-ai-library is a client-side DSH plugin released by the maintainer Instant-KING. It merges local multi-source materials and displays them using the native Harness panel (three-level classification on the left, cards in the middle, preview on the right). It also registers a set of library_* tools, enabling AI to search, read, and ingest data without you having to paste paths every time. Data remains on the local machine by default; the plugin describes itself as not actively connecting to the network except for paper retrieval, optional market synchronization, and saving web snapshots.
What is this¶
- Name: dsh-ai-library (same as the npm package name)
- Maintainer: Instant-KING
- Category: Client (
dsh.client.platform: web) - Current Version (package.json): 0.3.54, MIT License, requires Node.js >= 20
- Community Directory: SkillHub Plugin Page
- Source Code: GitHub · Instant-KING/dsh-ai-library
In short: It is a “panel + preview + retrieval + tool layer for AI” for local libraries, rather than a remotely hosted knowledge SaaS.
Panel and Preview Capabilities¶
Upon first installation and opening, an empty library is automatically created. Place files in <Download Directory>/ai-library/items/ (or the directory specified by root / itemsDir in config.json), and write relative paths in the entries to enable preview.
Capabilities specified in the README and package description include:
- Built-in pdf.js 4.10.38, with no dependency on external CDNs
- 11 types of previewers (including PDF, on-the-fly Markdown rendering, code highlighting, 3D, tables, fonts, archives, audio, etc.; Office files are converted to PDF via LibreOffice for preview)
- Drag-and-drop grouping for cards, multi-select for batch grouping / tagging / deletion; create, edit, and delete entries (the panel writes to
user-items.jsonand does not directly modify yourlibrary.js) - Optional integration with dsh-meme: The left column “Meme Gallery” lists built-in and user-imported galleries; can be enabled by writing to
~/.dsh/dsh-expression.json
Multi-source data is merged in a fixed order, with later writes overriding earlier ones; user-items.json has the highest priority, and modifications in the editor always take effect.
Paper Retrieval and Optional API Keys¶
Built-in ten key-free academic sources (arXiv, OpenAlex, Crossref, DOAJ, Europe PMC, INSPIRE, Zenodo, HAL, DataCite, OpenAIRE). The implementation is located in lib/paper.js and does not require Python.
Optional paid/restricted sources will simply fail to return corresponding results without a key, without causing errors. Semantic retrieval (RAG) only supports Sciverse; if paperKeys.sciverse is not configured, the panel will prompt for a key. Keys can be filled in via “Paper Search → Configure Key” in the panel or written to the paperKeys field in the plugin directory’s config.json (environment variables are also supported; see README key instructions for details).
Tools and System Prompts for AI¶
When toolsEnabled is true by default, the plugin registers 16 tools to the host, for example:
| Direction | Tool Name | Function (Summary) |
|---|---|---|
| Read-only | library_search / library_get / library_read / library_stats |
Search entries, get details, extract text, statistics |
| Write | library_add / library_update / library_import / library_autocapture / library_repo_build / library_save_url / library_paper_add |
Create new, modify fields, batch ingest, incremental scan, build library from repo, save web page, ingest paper |
| Retrieval | library_paper_search / library_web_search |
Multi-source paper search; web search (via DeepSeek official Search or AnySearch) |
| Maintenance & Long Tasks | library_web_cache / library_translate / library_job |
Clear Fetch cache; PDF translation tasks and progress |
At the same time, an ai-library system prompt fragment is injected (order 160), stipulating that locally created/modified files should be ingested before the conversation, and prompting to use library_search to check for duplicates first and not to write keys into the library.
Network division of labor: Web search/crawling can prioritize DeepSeek official /v1/tools/search and /v1/tools/fetch (on desktop, DEEPSEEK_API_KEY can often be read from ~/.dsh/.credentials.yaml after login), or DSH’s read_page and other tools can extract body text; the library focuses on saving to disk and reuse next time.
Installation and Activation¶
Choose one of three methods, and restart DSH after installation:
# ① npm (Recommended)
dsh plugin --profile desktop add dsh-ai-library
# ② Directly from GitHub
dsh plugin --profile desktop add github:Instant-KING/dsh-ai-library
For local development, you can use an absolute path insert in the profile’s cordis.patch.yml pointing to lib/index.js (see README comment examples).
Typical Usage: Where to put data, how to write entries¶
The default data root is <Download Directory>/ai-library, which can be modified using root in config.json or the environment variable AILIB_ROOT. Example hand-written library file (library.js):
window.LIBRARY = {
title: 'My Library',
items: [
{
id: 'k-1',
kind: 'paper',
status: 'available',
title: '1D Harmonic Oscillator',
summary: 'Ladder operator solution',
source: 'arXiv',
tags: ['Quantum Mechanics'],
files: ['items/papers/harmonic.pdf'],
preview: {
variants: [
{ label: 'Original', src: 'papers/harmonic.pdf' },
{ label: 'Notes', src: 'notes/harmonic.md' },
],
},
},
],
groups: { 'k-1': 'Mechanics' },
}
Panel operations: Top right “+ New”, edit/delete on cards, drag to left column to change group; deleting user-items.json returns to the state of only library.js.
Optional features (all require you to explicitly turn on or configure paths in config.json):
watchDirs+workspaceDir: Automatic ingestion monitoring and scanningmarketEnabled: Sync plugin market entries from defaulthttps://api.dshmk.com/(disabled by default)translateUrl: Interface with PDFMathTranslate (defaulthttp://127.0.0.1:11008)
The theme primary color can be set via accent in config.json or AILIB_ACCENT; otherwise, it follows the DSH brand color variables, and finally defaults to gold #e6c16f.
Use Cases and Notes¶
Suitable for: Users who want to uniformly manage local PDFs/documents/code snippets/plugin market cards/paper metadata within DSH, and make this content visible and retrievable to the AI in conversations; environments requiring offline PDF preview without relying on CDNs.
Notes:
- The plugin reads and writes local directories with current DSH process permissions; please check the source code and MIT license yourself before installation to confirm that the
itemsDirread-only scope and automatic ingestion directories comply with your security policy. - When
paperKeys,webKeys, etc. inconfig.jsonare stored in plain text in the plugin directory, directory permissions must be restricted; for shared machines, consider using environment variables. - SkillHub etc. are community directories and have no official affiliation with DeepSeek / High-Flyer; what is synced from the market is directory metadata, and whether to install is still up to you in DSH.
Conclusion¶
dsh-ai-library consolidates “multi-source local materials + unified preview + paper/web retrieval + AI tools” into a single Harness panel, reducing the need to repeatedly paste paths and fetch web pages repeatedly in conversations. To learn more about the implementation and changelog, see the GitHub Repository; for community collection information, see the SkillHub Directory Page.