dsh-ima: Integrating Tencent IMA Knowledge Base into DeepSeek Harness

Introduction

For agents written for DeepSeek Harness to query your own data, there are generally two paths: either stuff documents into the context window, or connect to an external retrieval interface. The former is limited by context length, while the latter means writing adapter code yourself and maintaining authentication and crawling logic. The plugin introduced below takes the third path: directly reusing Tencent IM’s existing knowledge base, exposing its retrieval, document reading, and Q&A retrieval capabilities as native DSH tools, with zero extra runtime dependencies.

This plugin is called dsh-ima, maintained by 0131kikimy, classified as an online tool, and currently has 1 star on the repository. It solves a very specific problem: you have already stored a knowledge base in Tencent IM, and you want an AI assistant to browse these knowledge bases, search for documents, and read the text content of specific documents, without you needing to write code during the process.

What is it

One-sentence positioning: dsh-ima is a DSH bundle that mounts the retrieval and document reading capabilities of the Tencent IM knowledge base as 9 tools, providing a settings entry in the left sidebar of DSH after installation.

It is not an official plugin. The README explicitly states that “Tencent IM’s open interfaces only provide knowledge base retrieval and document reading; there is no Q&A generation interface.” Therefore, the plugin will not fabricate Q&A results. The plugin runs with the permissions of the current DSH process. What it can do is exactly what this social plugin can do. Before installation, you should check the source code and license (MIT, version 0.4.0, Node runtime requirements: ^22.19.0 || >=24.0.0).

Repository URL: GitHub 0131kikimy/dsh-ima, directory page at skillhub.cn.

Core Features

The plugin exposes 9 tools that the AI calls automatically; you don’t need to remember their names:

Tool Function
ima_health Check if configuration is correct and if both channels are connected
ima_settings Provide the settings page URL
ima_kb_list List knowledge bases
ima_list_docs List documents in a specific knowledge base (with mediaId)
ima_get_doc Download the original file and extract the text content based on mediaId
ima_search Keyword search
ima_ask Retrieval summary
ima_open Open the Tencent IM client
ima_import Save a URL into a knowledge base

We need to emphasize ima_ask here. It returns a retrieval summary, not an answer generated by AI. Tencent IM’s open interface does not have a Q&A generation layer, so the plugin will truthfully indicate this and will not pretend to have answered it. Therefore, if you only want the text content of a specific document and use phrases like “read [document name]”, the plugin will follow the path “list documents → download → extract PDF text”; when encountering a scanned PDF where text cannot be extracted, it will explicitly tell you that OCR is needed and will not gloss over it.

Other details: Documents returned by ima_list_docs come with a mediaId, and ima_get_doc downloads the original file based on it; ima_open only works on Windows; ima_import is only executed when you explicitly request “save to knowledge base,” and the plugin itself does not have any upload behavior.

Installation and Activation

First, do two preparations: ensure DeepSeek Harness is installed and can open normally; prepare an ima API Key. Open https://ima.qq.com/agent-interface, the page will provide two sets of values:

  • Client ID, 32 alphanumeric characters;
  • API Key, a longer string of characters.

These two strings only appear once, so copy them to a notepad first and save them.

Then execute two steps. The first step is to let the AI execute the following command in DSH to install the plugin into DSH:

plugin_manager(action: "install_bundle", target: "github:0131kikimy/dsh-ima")

The second step is to restart DSH (close and reopen). After restarting, an ima icon will appear in the left sidebar. Note: The sidebar only exists in the Web version of DSH; it is not displayed on the desktop version.

Next, fill in the API Key. Click the ima icon in the left sidebar, fill in Client ID and API Key in the page, and click “Save”. It takes effect immediately without needing a restart. Click “Test Connection”; if you see reachable: true, it is connected. Filling it in wrong doesn’t matter; click the icon again to change it. These values are saved locally in ~/.dsh/dsh-ima/settings.json.

Typical Usage

After installation, you don’t need to remember tool names; just speak naturally, and the AI will pick the tools itself. The example given in the README is as follows:

You can say Plugin will do
“Which knowledge bases do I have in ima?” List all knowledge bases and document counts
“What files are in the AI General Knowledge Course?” List the document inventory of this knowledge base
“Read the content of the ‘Artificial Intelligence Concept Analysis’ slide deck” Download the original file and extract the text content
“Search for transformer in the knowledge base” Keyword search, returning the matched documents
“Open ima” Help you launch the Tencent IM client

A useful workflow is: first ask which knowledge bases exist, then ask which documents are in a specific knowledge base, and finally specify a document and ask it to read the text. After these three steps, you will have content extracted from your own knowledge base in hand, without needing to write any code in between.

Applicability and Notes

Who is it suitable for? Developers who have already organized a knowledge base on Tencent IM and want the agents in DSH to directly read this data, or users who don’t want to write adapter code for the retrieval interface. Core features (knowledge base, search, reading text) are cross-platform and work on Win/macOS/Linux, only “Open IM Client” is Windows-exclusive.

A few usage notes:

  1. The plugin runs with the permissions of the current dsh process. Before installing third-party plugins, you should first check the source code (there is lib, cordis.patch.yml, LICENSE in the repository) and the license to confirm there are no behaviors you do not accept. MCP-style boundaries apply here as well: it calls the official IM interface, downloads documents to a temporary directory for text extraction, and has no upload behavior, but the runtime permissions are completely handed over to the host process.
  2. ima_ask is not a Q&A interface; do not expect it to generate conclusions; it is only responsible for retrieval summaries.
  3. If text cannot be extracted from a scanned PDF, OCR is required, and the plugin will truthfully inform you.
  4. When the connection test is unreachable, common causes are copying the API Key with missing characters, pasting Client ID and API Key in the wrong order, or the network cannot reach ima.qq.com.
  5. To uninstall, use plugin_manager(action: "remove_bundle", target: "dsh-ima"). The locally stored API Key is in ~/.dsh/dsh-ima/settings.json; delete this folder if not needed.

Conclusion

The value of this plugin does not lie in a complex architecture, but in connecting a knowledge base system that is already maintained by someone into DSH, allowing you to use natural language to browse your own knowledge base without writing code for the retrieval interface or stuffing documents into the context window. Once installed, with the two values filled in and a restart, you can browse your own knowledge base using natural language.

Directory page: https://www.skillhub.cn/plugins/0131kikimy/dsh-ima
GitHub: https://github.com/0131kikimy/dsh-ima

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye