Skip to content

dsh-memoria

Verified

dsh-memoria Β· v0.1.0 Β· MIT

Memoria long-term memory for DeepSeek Harness: one owned Python subprocess + native store/recall tools + auto recall injection

Install

dsh plugin add dsh-memoria

Confirm the layer applied with dsh --profile default --dump-config β€” see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Creators

Readme

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 a cwd that contains the memoria package.
  • The python and cwd defaults are portable (python/python3 on 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, optional types, importance, tags).
  • memoria_recall β€” recall structured context against a query.
  • memoria_forget β€” remove one memory by memory_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.