Chuyển đến nội dung chính

dsh-memoria

Đã xác minh

dsh-memoria · v0.1.0 · MIT

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

Cài đặt

dsh plugin add dsh-memoria

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Phát hành lên npm mà không có repository công khai. Hãy kiểm tra nội dung package trước khi cài.

Thẻ

Tác giả

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.