给所有 AI 工具和 Agent 共用的一层记忆:注入 Context Bundle、提示时检索、MCP 工具与回合结束 DSH 线程捕获。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:nowledge-co/nowledge-mem-deepseek-harness
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
One memory layer for every AI tool and agent, packaged as a DeepSeek Harness (dsh) bundle. Nowledge Mem brings DSH into the same durable memory system as your other agents, with startup context, prompt-time recall, MCP memory tools, and turn-end thread capture.
This repository is the canonical standalone plugin package, mirrored in nowledge-co/community for the Nowledge Mem connector index.
Install
dsh plugin --profile web add github:nowledge-co/nowledge-mem-deepseek-harness
dsh web
For a local checkout of nowledge-co/community, run this from the repository root:
dsh plugin --profile web add ./nowledge-mem-deepseek-harness-plugin
dsh web
Make sure the nmem CLI is on PATH, then verify:
nmem status
nmem config mcp show --host deepseek-harness
The bundle connects to the local Mem MCP endpoint by default:
http://127.0.0.1:14242/mcp
For Nowledge Cloud or another remote Mem, set:
export NMEM_MCP_URL="https://<workspace>/mcp"
export NMEM_API_KEY="<mem-api-key>"
What It Does
- Injects the Nowledge Mem Context Bundle once per DSH session through
agent/pre-step. - Runs prompt-time memory recall for continuation, release, regression, connector, plugin, and other recall-shaped prompts.
- Adds the Mem MCP server through DSH's reconnecting
@deepseek-ai/dsh-mcp-client, so tools appear asmcp__nowledge_mem__.... - Imports the real DSH surface transcript after completed turns with
nmem t import --source deepseek-harness. - Stamps CLI imports with
NMEM_IMPORT_ORIGIN=deepseek-harness.
Configuration
The bundle accepts these row config fields in a later cordis.patch.yml override:
- id: nowledge-mem
config:
cliPath: nmem
sourceApp: deepseek-harness
importOrigin: deepseek-harness
contextOnSessionStart: true
recallOnPrompt: true
syncOnTurnEnd: true
allowDangerFullAccessRetry: false
recallLimit: 8
spaceId: my-space-id
agentId: deepseek-harness
Ambient variables also work:
NMEM_SPACENMEM_AGENT_IDNMEM_HOST_AGENT_IDNMEM_MCP_URLorNOWLEDGE_MEM_MCP_URLNMEM_API_KEY
Model Experience
Startup Context
The model sees one plugin-sourced user message containing the current Nowledge Mem Context Bundle. It is marked as form: "snapshot" and reminds the model that it is cross-tool context, not an instruction override.
Prompt-Time Recall
When the user asks to continue, remember, review previous work, ship a release, debug a regression, or discuss connectors/plugins, the plugin calls:
nmem --json m search "<prompt>" -n 8
The model sees a bounded recall message with memory titles, source hints, scores, and content.
MCP Tools
Mem MCP tools are registered through DSH's MCP bridge under the nowledge_mem namespace. DSH currently bridges MCP tools only; MCP resources and prompts are not surfaced by the Harness client.
Thread Capture
After each completed DSH turn, the plugin serializes user, assistant, and tool-result events, skips its own injected context messages, and imports the transcript into Mem as source=deepseek-harness.
Sandbox Compatibility Retry
The plugin does not retry a sandbox-unavailable nmem command with
danger-full-access by default. An operator who explicitly accepts that wider
access may set allowDangerFullAccessRetry: true in the nowledge-mem plugin
config. Even with that opt-in, the retry runs only when the DSH host provides
ctx.sandboxPolicy and resolves the requested policy; otherwise it fails
closed and logs why the retry was skipped.
Known Limitations
- DeepSeek Harness is in developer preview, so public package APIs may change.
- Historical DSH sessions are not backfilled by this package yet; it captures new sessions while the plugin is active.
- The DSH MCP bridge exposes tools only, so Nowledge Mem resources/prompts are not shown through MCP today.
- Turn capture depends on the local
nmemCLI being available in the DSH process environment.
Community Position
The canonical public repository is nowledge-co/nowledge-mem-deepseek-harness, tagged with dsh-plugin for DeepSeek Harness ecosystem discovery. The community repository keeps a registry/index mirror for Nowledge Mem surfaces.
链接
同类插件
volcengine/OpenViking#examples/dsh-memory-plugin★ 38815
面向 DeepSeek Harness 的 OpenViking 记忆与上下文插件:pre-step 自动召回与画像注入、会话捕获、`viking://` URI 防护,以及对接 OpenViking 服务端的 recall/write 记忆工具。
vectorize-io/hindsight#coding-agents★ 37670
Hindsight:会学习的 Agent 长期记忆系统,自动召回/保存、知识页、深度反思与按仓库隔离的记忆银行。
agentscope-ai/ReMe#dsh★ 3526
将 DeepSeek Harness 接入 ReMe 本地优先、自进化的个人知识库:自动把已完成的主 Agent 对话沉淀为用户掌控的 Markdown 记忆,通过 reme_search 结合 BM25、可选向量检索和 wikilink 展开搜索对话与资料,并按日整理长期记忆。
zilliztech/memsearch#MemSearch★ 2670
供 DSH 与其他编程 Agent 共享的 Markdown 记忆,支持自动捕获、步骤前上下文注入、搜索召回,以及通过审阅面板实现 memory-to-skill 自进化。
vshulcz/deja-vu#extensions/dsh★ 1074
读取本机上其他三十三个编程智能体已经写下的会话文件——Claude Code、Codex、Cursor、VS Code Copilot Chat、opencode、OpenClaw、Hermes、Kimi、Cline、Zed 等,包括安装之前的历史:提供 deja_recall、deja_session、deja_blame、deja_fix、deja_how、deja_remember 六个工具与 /deja 命令,并可选地把召回结果加入运行时上下文。本地 BM25 索引,不用大模型,不用向量嵌入,不联网(dsh plugin --profile web add dsh-deja)。
adoresever/graph-memory★ 630
DeepSeek Harness 的可追溯、可检索跨会话记忆:把对话知识沉淀为带类型的图节点(任务/技能/事件)与关系边。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。