Preface¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” In normal usage, the Agent is often in a passive, reactive state and lacks a continuous sense of presence. The dsh-heartbeat plugin is maintained by Kanadego and aims to give the Agent an autonomous “heartbeat” capability. It allows the Agent to wake up on its own according to a rhythm, maintain its memory and profile, perceive whether its environment is busy or idle, browse within its areas of interest, and finally decide, with appropriate restraint, whether to speak up.
Core Capabilities¶
The core of the plugin is a complete “heartbeat” lifecycle, which includes the following key mechanisms:
- Timed Heartbeat and Seven-Phase Cycle: By default, one heartbeat occurs every 20 minutes. Each heartbeat contains seven phases: maintenance, collection, browsing, gating, Digest, rumination, and delivery.
- Restraint Gate: Performs a pure-code decision before delivery. It checks in order: quiet hours, whether it is within a busy-time window, whether the user is present, daily speaking limits, and talk cooldown. Only when all checks pass will the model call be triggered.
- Perception and Browsing: Supports status bar and time awareness, and optional visual perception (requires ModLens). Within the configured areas of interest, the Agent uses
web_searchto check out new things and stores the results in a material pool. - Material Pool (dual store): Includes a topic inventory (16 items by default) and chat material (14 items by default). Material has a lifecycle and is deterministically removed based on TTL, consumption retirement, benched status, or capacity overflow.
- Rumination and Delivery: The engine room selects the most worthwhile material from the material pool, compresses each item into one sentence (rumination), and then packages them into a material bundle delivered to the bound session. The decision to actually speak remains with the Agent in the target session.
- Profile and Ledger: Maintains a local structured user profile (interests, projects, communication preferences, etc.) and ledger tools. The Agent can automatically keep ledgers.
- Persistence and Security: Supports Journal snapshots, device migration (encrypted container), and local DPAPI encryption.
Installation and Dependencies¶
Before installation, ensure your environment meets the following requirements:
- Platform: Windows only.
- Node.js: Version >= 22.19.0 required.
- DSH Version: Depends on specific DSH settings and an LLM.
The installation command is as follows:
dsh plugin --profile web add @kanadego/dsh-heartbeat
After installation, restart DSH. The plugin will automatically create a dedicated heartbeat session and run by rhythm. Daily operations are mainly completed in the heartbeat card of the DSH settings page. CLI commands are for advanced scenarios.
Common Operations¶
The following are examples of key commands:
Sessions and Binding¶
View available session IDs and bind them:
sessions list
bind add <id> # 投递消息到该会话
bind add <id> --observe # 仅观察该会话内容,不投递
Material and Ledger¶
Manually manage material or to-do items:
seeds add <text> # 手写一条种子素材
ledger add <text> # 在账本中记录待办
ledger done <id> # 标记待办完成
Profile and Migration¶
Export the profile or migrate to a new device:
profile export # 解密导出画像 Markdown
migrate export [file] # 打包记忆文件为口令加密容器
Data Management¶
Clean logs or destroy data:
burn # 预演并执行数据覆写与删除
Notes¶
- Tool Limitations: The heartbeat Agent’s tool surface is hard-limited to
web_searchonly, with no other filesystem or shell permissions. - Encryption Mechanism: Data is encrypted using Windows DPAPI (CurrentUser scope) and can only be decrypted by the current user.
- Ecosystem Context: DSH is a plugin ecosystem. This plugin is maintained by the community and has no official affiliation to DeepSeek / High-Flyer.