creativedswork/dsh-expmem

Plugin插件 Native原生 ⭐ 2 MIT Memory & Knowledge记忆与知识库

DeepSeek 工具的经验记忆

Project Overview项目介绍

DSH ExpMem is a native community plugin built exclusively for DeepSeek Harness, adding long-term personalized experience memory capabilities to DSH agents. It stores user habits, reusable task experience, and engineering insights as inspectable local files, drawing on MemGPT’s tiered memory infrastructure and Generative Agents’ cognitive process for improved long-term task performance. It also supports idempotent import of existing Markdown memories from Claude Code and Codex via a simple CLI command, letting users migrate existing work easily to their new DSH environment without data loss.

The plugin uses a tiered storage approach that leaves raw session history management to native DSH, while storing distilled long-term memory as local JSON records. When context usage hits 70% of the configured window threshold, the plugin prompts the agent to extract and save high-value experience before DSH compacts the context window. All search results are ranked by a combination of relevance, recency, and agent-assigned importance, and the plugin manages the full memory lifecycle to preserve provenance, conflicts, and replacement history for auditability.

DSH ExpMem runs fully locally, requiring no additional vector databases, background workers, or separate LLM inference requests. Users can customize all core parameters including storage root directory, maximum search results, and context pressure warning ratio via a simple YAML configuration patch in their DSH profile. The project is released under the open-source MIT license, and currently omits embeddings, semantic deduplication models, and retention schedulers, with archive search using a transparent linear scan for simplicity.

这是一个专为DeepSeek Harness(DSH)打造的原生社区插件,为DSH代理提供长期个性化经验记忆能力。它将用户习惯、可复用任务经验和工程见解存储在可查看的本地文件中,结合了MemGPT的分层存储架构和生成式代理的认知流程优化代理表现,同时还支持从Claude Code和Codex导入现有的Markdown格式记忆文件,平滑适配用户现有工作流。

插件采用分层存储设计,原始会话历史由DSH原生维护,提炼后的长期记忆保存在本地JSON记录中。当上下文占用达到阈值的70%时,插件会提示代理提炼保存高价值经验,搜索时会结合相关性、新鲜度和重要性对记忆排序,供代理后续规划任务使用。它支持完整的记忆生命周期管理,保留记忆的来源、冲突和替换历史。

插件完全本地轻量运行,不需要额外的向量数据库、后台进程或额外的大模型调用,通过YAML配置文件可以自定义存储路径、搜索结果数量、上下文压力阈值等多种核心参数。目前不包含嵌入、语义去重模型或保留调度器,记忆检索采用线性扫描,开源遵循MIT许可协议,可免费使用和修改。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @creative-dswork/dsh-expmem

把 creativedswork/dsh-expmem 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH ExpMem

English | 简体中文

Experience Memory for DeepSeek Harness.

Introduction

DSH ExpMem is a community plugin for long-term personal memory in DeepSeek Harness. It keeps user habits, reusable task experience, and engineering insights in inspectable local files. DSH's existing Session history remains the verbatim Recall layer.

The design combines two research lines. MemGPT supplies the memory infrastructure: tiered storage, memory pressure, retrieval, and explicit memory operations. Generative Agents supplies the cognitive process: assign importance, retrieve by current relevance, synthesize reflections, and use those memories when planning the next action.

DSH ExpMem is not an official DeepSeek project.

Architecture

flowchart TB
  subgraph Runtime["DeepSeek Harness runtime"]
    Agent["DSH Agent"]
    Meter["Token Meter"]
    Sessions["Session Persistence<br/>JSONL"]
  end

  subgraph Memory["MemGPT-style memory infrastructure"]
    Recall["Recall<br/>verbatim session history"]
    Archive["ExpMem Archive<br/>local JSON records"]
  end

  subgraph Cognition["Generative Agents-style cognitive loop"]
    Retrieve["Retrieve<br/>relevance + recency + importance"]
    Reflect["Reflection Run<br/>pending → prepared → completed"]
    Plan["Plan and act<br/>inside the DSH agent loop"]
  end

  Sources["Claude Code / Codex<br/>Markdown memory"] -->|"idempotent import"| Archive
  Sessions --> Recall
  Meter -->|"70% context pressure"| Agent
  Recall --> Retrieve
  Archive --> Retrieve
  Retrieve --> Agent
  Agent -->|"promote durable experience"| Archive
  Agent --> Reflect
  Reflect --> Retrieve
  Retrieve --> Reflect
  Reflect --> Archive
  Agent --> Plan

DSH owns Recall, context compaction, and the Agent Loop. ExpMem owns the distilled Archive, retrieval ranking, reflection provenance, and the trustworthy memory lifecycle. It does not copy Session events.

Context Engineering

The design maps to four common Context Engineering operations:

Technique Coverage Implementation
Write Context Covered DSH persists messages and tool events as Session Recall. The agent stores habits, reusable experience, and insights through expmem_write, promoting durable knowledge at 70% context pressure.
Select Context Covered session_search and session_event_search retrieve verbatim history. expmem_search ranks long-term memories by relevance, recency, and importance, and Reflection Runs reuse the same retrieval path.
Compress Context Covered DSH Compaction merges older history and prior checkpoints into a new <compacted-summary> while original events remain in the Session Log. ExpMem prompts the agent to preserve high-value experience before compaction and recovers from Recall if the notice was missed.
Isolate Context Covered at the framework layer DSH gives each subagent its own Session. A fork copies a snapshot of completed parent history, then accumulates context independently. ExpMem scopes long-term memory by workspace and reserves Reflection Runs for the main agent.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-obsidian-second-brain 下一个 Next work-charter-dsh →