dsh-memoria
已验证dsh-memoria · v0.1.0 · MIT
Memoria long-term memory for DeepSeek Harness: one owned Python subprocess + native store/recall tools + auto recall injection
安装
dsh plugin add dsh-memoria 用 dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南。
源码
发布到 npm 但没有公开仓库。安装前请检查包内容。
标签
作者
说明文档
dsh-memoria
Long-term memory for DeepSeek Harness, backed by the Memoria memory framework.
The plugin owns one long-lived Python subprocess (python -m memoria.plugin_server) so store and recall share a single in-memory Memoria instance. It registers four tools and — by default — auto-injects recalled context at the start of every turn, so the agent stays grounded in what it already remembers without an explicit recall prompt.
Requirements
- A Python interpreter that can
import memoria(Memoria installed into that interpreter), or acwdthat contains thememoriapackage. - The
pythonandcwddefaults are portable (python/python3on PATH,process.cwd()); override them per machine (see Configuration).
Install
dsh plugin --profile <profile> add dsh-memoria
Or, for a local checkout:
dsh plugin --profile <profile> add link:/path/to/memoria-dsh-plugin
The package declares a dsh.bundle patch, so dsh plugin add reconciles it into the profile's dsh.profile.bundles automatically.
Configuration
Set these in the profile's cordis.patch.yml:
- id: memoria
config:
python: /path/to/python # interpreter that can import memoria
cwd: /path/containing/memoria # subprocess working dir
autoInject: true # inject recall at agent/pre-step
recallLimit: 10 # max memories injected per turn (1-50)
| Key | Default | Description |
|---|---|---|
python |
python (win) / python3 (other) |
Interpreter for the Memoria subprocess. |
cwd |
process.cwd() |
Working directory of the subprocess; must let python -m memoria.plugin_server resolve. |
autoInject |
true |
Whether to auto-inject recall before the first step of each turn. |
recallLimit |
10 |
Maximum reference memories injected per turn. |
Tools
memoria_store— store a durable, context-free fact (content, optionaltypes,importance,tags).memoria_recall— recall structured context against aquery.memoria_forget— remove one memory bymemory_id.memoria_status— report per-layer memory counts and lifecycle distribution.
How it works
apply(ctx, config) spawns python -m memoria.plugin_server over stdio (newline-delimited JSON-RPC) and registers the four tools on ctx.tools. A prepend listener on agent/pre-step calls recall for the turn's text and, when it returns memories, prepends them as a user message tagged source.form = "recall" — so the model sees its memory before answering, and the injected message never reaches the model as tool chatter.