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

  1. 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.
  2. Image visual description: Uses a VLM to describe embedded images in documents and replaces them with descriptive text placeholders (such as ![<description>](asset://<id>)).
  3. 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.
  4. Agent tool integration: Provides a convert_document tool that the agent can invoke on demand to convert documents to Markdown.
  5. 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.
  6. 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.
  7. 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.

  1. Install the dependency packages (including firecrawl-anydoc, pdfplumber, and Pillow):
    pip install -r converter/requirements.txt
  1. Add the plugin in Harness:
    dsh plugin --profile web add dsh-anydoc-markdown
  1. 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.

  1. Drag a document (.docx, .pdf, .pptx, etc.) onto the page.
  2. The file appears in the attachment strip above the editor, displaying the file name and size.
  3. 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

  1. Version compatibility: This plugin has only been tested with DeepSeek Harness version v0.1.1-rc.2 and may not be compatible with the latest version.
  2. Dependency requirements: To describe images in PDF files, pdfplumber and Pillow must be installed. If they are not installed, only the text content in PDFs can be converted, and other features are unaffected.
  3. File path mechanism: Documents are stored by source file path before conversion. The agent must call the convert_document tool to trigger conversion.
  4. Output modes:
    • If markdownOutputDir is not configured, the conversion result is returned inline as Markdown text.
    • If markdownOutputDir is configured, the conversion result is saved as a file, and the file path is returned.

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.

Plugin Directory | GitHub Repository