DeepSeek Harness Plugin: Telegram and WhatsApp Group Chat Export and Summarization

Introduction

Agent developers often need to extract key notifications or events from group chats. Existing solutions either read messages directly (posing a high privacy risk) or require exporting and manually organizing them. The DeepSeek Harness plugin offers a middle-ground approach: read messages via a whitelist, normalize and persist them to disk, and generate summaries using a local model.

Plugin Overview

wth373737/dsh-plugin-chat-export is a group chat export plugin for DeepSeek Harness, currently supporting Telegram and WhatsApp. It follows three design principles: consent is made by humans, and the Agent can only request access; the gate follows capability—only approved conversations can be read; when uncertain, say so clearly—summaries explicitly distinguish original text from model-generated content.

Core Features

Access Control

All conversations are unapproved by default. Users approve them via the settings page or the /chat-approve command; the Agent has no approval capability. Only approved conversations can retrieve messages through the read channel. Unapproved conversations simply return “pending approval” without initiating any request.

Telegram Fetching

Pulls messages from the server via Telethon, fetching within a time window and normalizing them to disk. The plugin automatically detects a venv-tg virtual environment at the same level as the plugin directory, or you can specify a pythonPath in settings.

WhatsApp Import & Scraping

Supports two pathways:
- Import exported files: supports .json, .zip (_chat.txt), .txt; scans the inbox by default
- Scrape from WhatsApp Web: launches a separate persistent Chrome instance, logs in via QR code, then scroll-loads messages based on a time watermark

Summary Generation

Generates summaries using a local Ollama model. Important notifications are quoted verbatim, links are extracted by code, and the overview and questions are generated by the model. Summary files are named by date, and the header indicates the time mode (window / snapshot / mixed).

Installation & Enablement

Install from GitHub (recommended):

In DSH, open Plugins → + Add Plugin and enter:

github:wth373737/dsh-plugin-chat-export

Restart DSH once after installation—both the host side and the settings page need a restart to load.

Additional Dependencies

  • Telegram: requires Python + Telethon; a dedicated venv is recommended
  • WhatsApp Web scraping: the plugin launches its own separate persistent Chrome
  • Summaries: generated via a local Ollama instance; model and endpoint are configured in settings

Typical Usage

List conversations:

chat_list

Fetch Telegram messages from the last day:

chat_fetch { days: 1 }

Import WhatsApp inbox:

chat_import

Generate a summary:

chat_digest { hours: 24 }

Use Cases & Caveats

Ideal for scenarios where you need to extract key information from group chats without granting the Agent unrestricted access. The plugin runs with the current DSH process permissions; review the source code and license (MIT) before installing.

Known limitations include: WhatsApp scroll-loading of history is unverified, scraping only covers text bubbles, and summary quality is bounded by the local model’s capability.

Summary

This plugin provides the ability to read group chat messages via a whitelist, normalize and persist them to disk, and generate summaries with a local model. The GitHub repository is at https://github.com/wth373737/dsh-plugin-chat-export.

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

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

Xiaoye