Zhang-Zhengyuan/dsh-memory-amem

DeepSeek Harness 的长期智能体记忆——A-MEM,具备提示注入防御、原子化持久化以及原生与 MCP 集成功能。

Project Overview项目介绍

dsh-memory-amem is a DeepSeek Harness plugin that adds A-MEM-style long-term memory. It stores user messages as structured notes, uses an LLM to extract keywords, context, and tags, retrieves related notes via BM25 plus TF-IDF, then strengthens or updates memory links and re-injects memories into each prompt. Use it when DSH sessions need cross-conversation recall. Note: an admission gate may skip sensitive, filler, or oversized messages.

dsh-memory-amem 是为 DeepSeek Harness 提供长期记忆的插件,实现 A-MEM 方案。它将用户消息存为结构化笔记,经 LLM 提取关键词、上下文与标签,用 BM25 加 TF-IDF 检索相关记忆并决定强化或更新,每轮注入系统提示。适合希望跨会话保留对话上下文的 DSH 用户。注意:含准入规则,敏感内容、问候语或超长消息可能被跳过。

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 github:Zhang-Zhengyuan/dsh-memory-amem

把 Zhang-Zhengyuan/dsh-memory-amem 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-tool-memory-amem

Long-term agentic memory for DeepSeek Harness (DSH). Implementation of A-MEM (NeurIPS 2025).

中文文档 / Chinese README

DSH ships its own chat agents but has no first-class memory: every new session starts from zero. dsh-tool-memory-amem plugs an A-MEM style agentic memory into DSH — every user message is captured as a structured note, automatically linked to existing memories through an LLM-driven evolution step, and re-injected into the system prompt on every turn so the model can recall prior conversations.

This plugin follows the canonical DSH plugin model used by every community plugin in the DSH ecosystem (same package layout as @linxin666/dsh-tool-describe-image, same installation via dsh plugin --profile web add).

LoCoMo overall accuracy LoCoMo multi-hop License: MIT Version


Architecture

                    ┌─────────────────────────────────────────────┐
                    │            DeepSeek Harness (DSH)           │
                    │                                             │
                    │  ┌──────────────┐    ┌──────────────────┐   │
                    │  │ session/event│    │ system-prompt    │   │
                    │  │   observer   │    │   .section       │   │
                    │  └──────┬───────┘    └────────┬─────────┘   │
                    └─────────┼─────────────────────┼─────────────┘
                              │                     │
                              ▼                     ▲
            ┌───────────────────────────────────────────────────┐
            │            dsh-memory-amem (this repo)            │
            │                                                   │
            │   ┌─────────────┐   ┌──────────────┐   ┌───────┐  │
            │   │ Analysis    │   │ Hybrid       │   │ Tool  │  │
            │   │ Service     │   │ Retriever    │   │ Reg.  │  │
            │   │ (LLM-extract│   │ BM25 + TFIDF │   │memory_*│  │
            │   │ keywords,   │   │ cosine       │   │       │  │
            │   │ context,    │   │              │   │       │  │
            │   │ tags)       │   │              │   │       │  │
            │   └──────┬──────┘   └──────┬───────┘   └───┬───┘  │
            │          │                 │               │      │
            │          └────────┬────────┘               │      │
            │                   ▼                        │      │
            │          ┌──────────────────┐              │      │
            │          │ A-MEM Engine     │              │      │
            │          │                  │◀─────────────┘      │
            │          │ 1. analyze       │                     │
            │          │ 2. retrieve top-k│                     │
            │          │ 3. decide evolve │                     │
            │          │ 4. apply evolve  │                     │
            │          │ 5. persist note  │                     │
            │          └────────┬─────────┘                     │
            │                   ▼                               │
            │          ┌──────────────────┐                     │
            │          │   Storage        │                     │
            │          │ ~/.dsh/memory-   │                     │
            │          │ amem/notes/*.json│                     │
            │          └──────────────────┘                     │
            └───────────────────────────────────────────────────┘

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-desktop 下一个 Next dsh-paperforge →