When building local agents or performing model inference in DeepSeek Harness (DSH), you often encounter scenarios where AI needs to read private literature. Manually uploading PDFs is tedious and makes full-text search difficult.
The following introduces the dsh-zotero plugin, which connects to the local Zotero to build a full-text index of PDFs in the entire library, allowing you to directly search and read literature in the DSH sidebar panel or in conversations.
Plugin Introduction¶
dsh-zotero is a DSH plugin that connects to Zotero 7. It utilizes Zotero’s built-in indexing capabilities or directly parses the PDF text layer to build a full-text index of literature. Users can search in the sidebar panel or directly ask questions in conversations to let AI consult the literature.
- Maintainer: H-xie
- Category: Model Inference
- License: MIT
Core Features¶
- Full-text Indexing: Prioritizes using Zotero’s built-in full-text index; if no index exists, it reads the PDF directly and parses the text layer. Pure image (scanned) documents cannot be parsed, but this will not affect other literature.
- Panel Search: Adds a “Zotero Literature” panel to the DSH sidebar. Supports connection configuration, index building, category-restricted search, and reading full text chunk by chunk.
- Conversation Search: Ask questions directly in the conversation; AI will automatically invoke the search tool to query literature and read relevant paragraphs. When a collection name is mentioned, the search scope will be automatically restricted.
Installation and Activation¶
Prerequisites¶
Before installing the plugin, ensure the following conditions are met:
- Run Zotero 7 (or higher).
- Enable Local API: In Zotero, click
Edit→Settings→Advanced, and checkAllow other applications to communicate with Zotero.
Installation Steps¶
The plugin is installed via directory linking, so you need to clone the code and install dependencies first.
git clone https://github.com/<your_username>/dsh-zotero.git
cd dsh-zotero
npm install # Install PDF parsing dependencies (Required)
After installation, in the DSH interface:
- Go to the “Plugins” page.
- Click “Install plugin / Install bundle”.
- Select the
dsh-zoterofolder you just extracted. - Enable the plugin and refresh the page; the “Zotero Literature” icon will appear in the left sidebar.
Note: DSH installs plugins via directory linking and does not automatically handle plugin npm dependencies, so you must manually run
npm install(orpnpm install) once.
Typical Usage¶
- Connection Settings: Open the “Zotero Literature” panel in the left sidebar, fill in the local service address (default
http://localhost:23119/api) under “1. Connection Settings”, click “Test Connection” to confirm success, then click “Save Settings”. - Build Index: In the “2. Full-text Index” area, click “Build / Update Index” and wait for the indexing to complete (it may take a few minutes for the first time).
- Panel Search: In “3. Full-text Search”, enter keywords, optionally fill in “Restrict Collection” (sub-collections are supported), and click “Read Full Text” to read chunk by chunk.
- Conversation Search: Directly say in the conversation “Search my Zotero literature for articles about XXX”, and AI will automatically search. If a collection name is mentioned (e.g., “Search my Zotero literature for articles about XXX, restricted to collection CSS”), the search scope will be automatically limited.
Notes¶
- Dependency Installation:
npm installmust be run first, otherwise the plugin will not work properly. - Zotero Version: Zotero 7 or higher is recommended.
- API Switch: Ensure that “Allow other applications to communicate” is checked in Zotero settings.
- Scanned Document Limitation: Literature in pure image format (scanned documents) cannot be parsed; OCR must be performed in Zotero first before updating the index.
- Storage Location: Literature indexes and settings are saved in the
~/.dsh-zotero/directory. You need to reconfigure the address when changing computers or ports.
Conclusion¶
dsh-zotero solves the problem of fast retrieval and reading of private literature by combining the local Zotero library with DSH’s RAG capabilities. It is easy to install, accurate in search, and suitable for developers who need to process large amounts of literature in a local environment.
- GitHub Repository: https://github.com/H-xie/zotero4DSH
- Community Directory: https://www.skillhub.cn/plugins/H-xie/zotero4DSH