Foreword¶
A common issue when automating email tasks within DeepSeek Harness (DSH) is that the agent can only process text within the context; it cannot directly access the mailbox, read emails, search, or send emails on your behalf. Existing approaches typically require manually copying email content or writing additional scripts to call IMAP/SMTP.
dsh-email is a DSH email tool plugin that encapsulates checking the inbox, reading emails, searching, sending emails on your behalf, and downloading attachments into a set of tools. Once configured, the agent can invoke these tools directly.
What It Is¶
In one sentence: A DeepSeek Harness email tool plugin that allows the agent to check the inbox, read emails, search, send emails, and handle attachments.
The repository path is STARDUSTLC666/dsh-email, the package name is dsh-email, and the license is MIT. This is a community plugin and is not officially affiliated with DeepSeek.
This plugin is implemented in pure Node.js. The same code is used on Windows / macOS / Linux with no native binaries. The package.json declares Node >=22.
Core Features¶
email_list: Lists the latest emails in a folder, supporting unread filtering, pagination, and summary-only view.email_read: Reads the full text of an email byuid, automatically converts HTML to plain text, and truncates long content.email_search: Searchessubject / from / to / ccon the server side by keyword; falls back to scanning the body if no results are found.email_send: Sends emails on your behalf with attachment support, defaulting to a confirmation prompt before sending.email_folders: Lists mailbox folders and returns apathfor use by other tools.email_attachment: Downloads email attachments by sequence number to the session workspace.- Includes eight built-in presets:
QQ / 163 / 126 / Sina / Aliyun / Gmail / Outlook / iCloud. - Supports configuring multiple accounts under a single
tool-emailtool and selecting them viaaccount / defaultAccount. - Provides a Web settings page where you can fill in email address, authorization code, test the connection, and save the application.
Installation and Enablement¶
Install the plugin by running the following command:
dsh plugin --profile web add dsh-email
After installation, restart dsh web.
Configuration¶
Web Settings Page¶
After restarting, open:
Settings → Email (dsh-email)
Fill in the email address and authorization code on the page. You can use the “Test Connection” feature, and then click “Save and Apply” when done.
YAML Configuration¶
You can also override the tool-email section in the profile’s cordis.patch.yml to configure fields like provider, user, password, etc., and then restart the DSH Web service.
Single-account example:
- id: tool-email
config:
provider: qq
user: you@qq.com
password: your authorization code
Multi-account example:
- id: tool-email
config:
accounts:
work:
provider: qq
user: work@qq.com
password: authorization code 1
home:
provider: '163'
user: home@163.com
password: authorization code 2
defaultAccount: work
In multi-account configuration, defaultAccount specifies the default account used when the account parameter is omitted during tool invocation.
Typical Usage¶
Once configured, you can directly tell the agent:
Check the latest 10 unread emails in my QQ mailbox and list those that need replies.
The agent can first call email_list to get the latest or unread emails, then use email_read to read the full text of specific emails. If a reply is needed, it can call email_send and send after confirmation and approval.
Use Cases and Notes¶
Suitable for scenarios in DSH involving email queries, reading email body, searching emails, sending emails on your behalf, and downloading attachments. Before use, you need to obtain the authorization code or application-specific password from your email service provider.
Before installation, it is recommended to review the source code and license, as the plugin will run under the current DSH process permissions.
Please note the following:
OAuth2is not supported; enterprise environments requiring OAuth cannot use it for now and must use authorization codes/application-specific passwords.- Server-side search only covers
subject / from / to / cc; body search is a client-side fallback, slower and limited bybodySearchLimit. - Inline images cannot be downloaded individually; attachment location failures will report an error directly instead of downloading incorrect files.
email_senddefaults to DSH approval; environments without an approval channel will directly reject sending; inFull Accessmode, it will be intercepted and prompted.- Authorization codes/passwords are stored in plaintext in the local
settings.yamlorcordis.patch.yml; thesecrettag only ensures they are not included in logs/exports/diagnostics and does not encrypt the disk. - This plugin does not perform any network reporting; credentials are used in memory only to connect to the email server.
- Compatibility note: Verified on
@deepseek-ai/dsh@0.1.1-rc.2as of 2026-08-26.
References¶
- GitHub: https://github.com/STARDUSTLC666/dsh-email