Introduction¶
DeepSeek Harness (DSH) extends an agent’s toolbox through its plugin mechanism. When building agents, handling non-text files (such as Word, PPT, Excel, and PDF) is a common requirement. These files often contain embedded images, and pure text models cannot directly understand this visual content.
dsh-anydoc-markdown is designed to address this pain point. It converts documents into pure Markdown and uses a Vision Language Model (VLM) to describe the images inside the document, enabling text models to reason based on the image content.
Plugin Overview¶
dsh-anydoc-markdown is a DeepSeek Harness plugin maintained by SeerableOfficial and licensed under the MIT License.
The plugin uses Rust’s firecrawl-anydoc library for document parsing and includes a Python wrapper to handle batch image description. It does not directly inject the converted Markdown; instead, it provides the source file path to the agent, and the agent actively invokes the conversion tool. This ensures standardized tool usage.
Core Features¶
- Multi-format document conversion: Supports Word (.docx), PowerPoint (.pptx), Excel (.xlsx), OpenDocument (.odt), RTF, EPUB, CSV, PDF, and other formats, with unified output in GitHub-flavored Markdown.
- Image visual description: Uses a VLM to describe embedded images in documents and replaces them with descriptive text placeholders (such as
). - Batch request mechanism: To prevent performance degradation, the plugin defaults to grouping images into batches of up to 10 per request instead of sending all images at once.
- Agent tool integration: Provides a
convert_documenttool that the agent can invoke on demand to convert documents to Markdown. - Native drag-and-drop support: In the Harness editor, users can directly drag and drop document files to upload and convert them, without needing an extra attachment button.
- Offline-first mode: When no VLM endpoint is configured, the plugin still works by using offline metadata to describe images, without making network calls or requiring an API key.
- File extraction and saving: After configuring the output directory, the plugin automatically extracts images and saves them as PNG files. The generated Markdown file is stored in the same directory as the images.
Installation and Activation¶
Before installing, ensure that the Python environment and required dependency packages are installed.
- Install the dependency packages (including
firecrawl-anydoc,pdfplumber, andPillow):
pip install -r converter/requirements.txt
- Add the plugin in Harness:
dsh plugin --profile web add dsh-anydoc-markdown
- Restart the DSH Web service:
# restart dsh web
Typical Usage¶
1. Agent-Initiated Invocation¶
After receiving the source file path, the agent calls the convert_document tool.
# 智能体调用示例
markdown_content = convert_document(file_path: "report.pptx")
2. UI Drag-and-Drop Upload¶
The Harness web interface supports native drag-and-drop operations.
- Drag a document (.docx, .pdf, .pptx, etc.) onto the page.
- The file appears in the attachment strip above the editor, displaying the file name and size.
- After the message is submitted, the file has been saved locally. In the next conversation turn, the agent receives the file path and invokes the conversion tool.
Notes¶
- Version compatibility: This plugin has only been tested with DeepSeek Harness version
v0.1.1-rc.2and may not be compatible with the latest version. - Dependency requirements: To describe images in PDF files,
pdfplumberandPillowmust be installed. If they are not installed, only the text content in PDFs can be converted, and other features are unaffected. - File path mechanism: Documents are stored by source file path before conversion. The agent must call the
convert_documenttool to trigger conversion. - Output modes:
- If
markdownOutputDiris not configured, the conversion result is returned inline as Markdown text. - If
markdownOutputDiris configured, the conversion result is saved as a file, and the file path is returned.
- If
Summary¶
By combining Rust’s native parsing capabilities with VLM-based visual understanding, dsh-anydoc-markdown provides a complete document processing solution for DeepSeek Harness. It supports batch requests to optimize performance and offers an offline mode, making it suitable for scenarios in agent workflows that require processing complex document structures.