在输入框左侧选择自建腾讯 agent-memory Hub 团队里的 agent 作为专家,把它的长期记忆召回并注入每轮对话,也可以把每轮对话写回它的记忆块。其 HTTP 路由未做 DSH 权限校验,浏览器中打开的任意网页都可能直接调用。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:whalezhao/dsh-plugin-agent-memory
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。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 只有英文版本。
DeepSeek Harness (DSH) plugin that connects a self-hosted Tencent agent-memory Hub (the
Memory Hub RPC service on port 8125) into the conversation.
It adds an expert selector to the left of the composer. An expert is one agent of one team
in the Hub; that agent's long-term memories are recalled for each user message and appended to the
step as an <agent-memory> block, so the model sees them without any tool call.
The rest of the agent's team assets are available as read-only tools: am_knowledge_resources
(lists wiki and code-graph resources), am_knowledge_call (gets a resource's tool list, then runs
explore / search / callers / impact / read_page …), am_skill_search, am_skill_read, and am_memory_search (on-demand L0/L1 lookup).
Requirements
- DSH
>=0.2.2-rc.5(the plugin declaresdsh.bundleand a Web client half). - A reachable agent-memory Hub: the RPC endpoint
POST {hubUrl}/api/v1/...that acceptsX-Tdai-Service-Id(instance id) andX-Tdai-User-Key(user key) headers.
Install
dsh plugin --profile <profile> add dsh-plugin-agent-memory
It is listed on the DSH plugin market too. Without npm access, install the prebuilt release asset or the checked-out source:
dsh plugin --profile <profile> add \
https://github.com/whalezhao/dsh-plugin-agent-memory/releases/download/v0.1.0/dsh-plugin-agent-memory-0.1.0.tgz
dsh plugin --profile <profile> add /path/to/dsh-plugin-agent-memory
From a running DSH session, the plugin manager can install the same npm name or tarball URL.
Configure
Open the plugin's settings page (or the panel's gear button) and set:
| Field | Meaning |
|---|---|
hubUrl |
Memory Hub base URL, e.g. http://10.0.0.10:8125 |
instanceId |
Hub instance id, sent as X-Tdai-Service-Id |
userKey |
Hub user key, sent as X-Tdai-User-Key (stored as a secret field) |
defaultAgentId |
Agent used before the user picks an expert; empty means "pick one" |
injectMemory |
Recall memories and inject them before each step (default on) |
writeMemory |
Write each turn back to the expert's memory (default off) |
writeAssistant |
Include the assistant's reply in that write, matching the official L0 pairing of question + answer (default on) |
topK |
Max memories per recall (1–10, default 4) |
layers |
Memory layers injected each turn (default L3,L2, matching the official proxy) |
timeoutMs |
Per-request timeout (default 6000) |
refreshMs |
List cache / auto-refresh interval in ms (minimum 5000, default 10000); refresh pauses while the settings form is open, so it cannot overwrite what you are typing |
kernelUrl |
Kernel API base for wiki / code-graph / skills (default: Hub host on port 8420). The knowledge service address is discovered from the kernel, and the proxy endpoint is not used |
tools |
Register the read-only asset tools (default on) |
skillLearning |
Send each finished turn to the kernel (/v3/skill/conversation/add) so agent-memory can archive it and extract skills (default off) |
skillIndex |
Inject the catalogue of skills bound to the expert each turn, so the model knows what exists (default on) |
respectBindings |
Narrow wiki / code-graph / skill access to the assets bound to the expert in the Hub (default on; falls back to the whole team when bindings cannot be read) |
debug |
Append diagnostics to ~/.dsh/agent-memory-debug.log (default off, 256 KiB cap) |
With no hubUrl or userKey the plugin stays idle: the selector is hidden and nothing is sent.
Where state lives
Unsaved settings input survives switching conversations (the draft lives in the plugin's client module), and after a save the panel retries the connection check while the plugin restarts.
- The user key is stored in the DSH credentials store (
dsh-plugin-agent-memory/user-key), not in the profile'scordis.patch.yml; the config field is only a fallback for headless setups. Saving a key from the panel migrates it there and blanks the config copy. - The chosen expert per session is persisted in
~/.dsh/agent-memory-selections.json(mode0600), so a plugin reload or an app restart keeps the expert instead of dropping back to 「请选择专家」. - The panel shows the last recall / write-back / skill-learning outcome for the session, and a 记忆 tab browses the expert's L3 → L0 layers read-only.
Skill learning
agent-memory grows skills by reading finished conversations. With skillLearning on, each closed
turn is posted to the kernel with its user message, the turn's tool calls and results, and the
assistant's reply. The kernel buffers turns per session and archives them on its own thresholds
(roughly ten tool calls or 40 KiB), which is what queues a skill-extraction task; a single short
turn staying ok instead of archived is expected.
The plugin sends one turn per request, strictly ordered per session, and only when the session has an expert selected (the expert supplies the team and agent the skill belongs to).
What data leaves the machine
- The Hub URL and user key are only used by the Host half; the browser talks to same-origin plugin routes and never sees the key.
- With
injectMemory, the last user message of a turn is sent to the Hub as a recall query. - With
writeMemory, each turn is also sent to the Hub to be stored (plus the assistant reply unlesswriteAssistantis off). - With
skillLearning, each finished turn is sent to the kernel as described above. - Nothing is sent to any third party.
Asset scope follows the Hub
Each agent in the Hub can have wiki, code-graph, skill and memory assets bound to it (the
「原子能力」 page). The plugin reads that binding list from the kernel
(POST /v3/meta/agent-fixed-asset/list-with-detail) and uses it as the scope for every knowledge
and skill tool, plus the per-turn skill catalogue. The panel gateway answers NOT_IN_SCOPE for the
same action family, which is why the kernel is the source of truth here.
If the binding list cannot be read, the plugin falls back to the whole team and the tool output says so.
Limits
- Only agents owned by the configured user key can be selected; selecting someone else's agent is
rejected (
403 NOT_YOUR_AGENT) because the Hub refuses cross-owner reads and writes. - The Hub's public RPC surface has no per-message delete endpoint, so memories are curated in the Hub's own memory UI, not from DSH.
- Recalled memories are injected as a user-role message; a turn whose message has no relevant hit injects nothing.
中文说明
在输入框左侧点「选择专家」 → 右上角「设置」里填 Hub 地址、实例 ID 与 userkey → 保存后点 「检测连接」确认连通 → 回到列表选团队与 agent。选中后,该 agent 的长期记忆会在每轮对话前被 召回并注入上下文;打开写回后,每轮用户消息也会写入记忆库。插件默认保持空闲,直到你填好地址与 userkey。只允许选择自己 userkey 名下拥有的 agent。
License
MIT — see LICENSE.
链接
同类插件
vectorize-io/hindsight#coding-agents★ 64488
Hindsight:会学习的 Agent 长期记忆系统,自动召回/保存、知识页、深度反思与按仓库隔离的记忆银行。
volcengine/OpenViking#examples/dsh-memory-plugin★ 43111
面向 DeepSeek Harness 的 OpenViking 记忆与上下文插件:pre-step 自动召回与画像注入、会话捕获、`viking://` URI 防护,以及对接 OpenViking 服务端的 recall/write 记忆工具。
MemTensor/MemOS#memos-local-plugin★ 12554
DeepSeek Harness 本地记忆插件:分层 L1/L2/L3 记忆,自动沉淀与手动 memos_* 检索工具并存,内置记忆浏览器。
agentscope-ai/ReMe#dsh★ 3880
将 DeepSeek Harness 接入 ReMe 本地优先、自进化的个人知识库:自动把已完成的主 Agent 对话沉淀为用户掌控的 Markdown 记忆,通过 reme_search 结合 BM25、可选向量检索和 wikilink 展开搜索对话与资料,并按日整理长期记忆。
zilliztech/memsearch#MemSearch★ 2977
供 DSH 与其他编程 Agent 共享的 Markdown 记忆,支持自动捕获、步骤前上下文注入、搜索召回,以及通过审阅面板实现 memory-to-skill 自进化。
vshulcz/deja-vu#extensions/dsh★ 1717
跨会话长期记忆与上下文恢复:读取本机上其他四十五个(45+)编程智能体已经写下的会话文件,支持安装前历史找回与中断恢复(Claude Code、Codex、Cursor、Windsurf、Trae、Antigravity、VS Code Copilot Chat、opencode、OpenClaw、Hermes、Kimi、Qoder、Cline、Zed、Magpie 等):提供 deja_recall、deja_session、deja_blame、deja_fix、deja_how、deja_remember 六个工具与 /deja 命令,并可选地把召回结果加入运行时上下文。共享本地 BM25 CLI/MCP 索引,不用大模型,不用向量嵌入,不联网(dsh plugin --profile web add dsh-deja)。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。