DSH Plugins Marketplace

DSH Plugins

Plugins

/

Memory & Context

/

dsh-memories

d

dsh-memories

Manifest valid

Long-term memory ported from the OpenAI Codex memory pipeline: sessions idle for 6 hours are extracted in the background by a chosen model, then merged by a hidden agent into a Markdown memory folder

UI (client)hasBundlePatch

dsh-memories

English | 中文

npm test

Long-term memory for DeepSeek Harness (dsh).

New sessions start knowing your preferences, your projects and what worked last time.

dsh-memories reads your finished sessions in the background, keeps what is worth remembering, and gives every new agent a short memory summary plus tools to look up the details. It is a port of the memory pipeline in OpenAI Codex, with the same prompts, limits and file layout.

[!WARNING] Beta. This is an early release, tested by one person on macOS with a release candidate of dsh. Expect bugs, and expect behaviour and settings to change between versions. Please report problems in Issues.

Install

Requires dsh 0.2.2-rc.1 or a later 0.2.x release, Node.js 24.9 or later (the version dsh needs) and git on your PATH.

dsh plugin --profile web add @libraqg/dsh-memories

From GitHub source instead of npm:

dsh plugin --profile web add github:Libraqg/dsh-memories

From a local checkout:

git clone https://github.com/Libraqg/dsh-memories
cd dsh-memories && npm install
dsh plugin --profile web add link:/absolute/path/to/dsh-memories

In the desktop app, add the plugin from its plugin manager instead; the desktop profile is managed by the app. Restart dsh after installing.

Use

Nothing to do: keep using dsh. Memory builds up on its own.

  1. When a session has been idle for 6 hours, the next turn you start in any session extracts memories from it in the background. Up to 2 sessions are processed each time.
  2. The extracted memories are merged into one memory folder by a background agent, at most once every 6 hours.
  3. Each new agent gets the memory summary in its system prompt and can search and read the full memory with tools. When you correct it ("from now on, always …"), it saves the correction as a note for the next merge.

So the first memories appear about 6 hours after your first sessions, not right away.

Choose the models

Open the plugin's settings in the plugin manager. Pick an extraction model (runs once for each idle session, a fast model is enough) and a consolidation model (runs the merge, a stronger model helps). Changes apply without a restart.

SettingDefault
Extraction modeldeepseek-official / deepseek-flash
Consolidation modeldeepseek-official / deepseek-v4-pro

Any provider configured in dsh works, including a signed-in subscription.

The /memories command

CommandWhat it does
/memories or /memories statusModels, number of stored memories, failed jobs and the last merge
/memories pathWhere the memory folder is
/memories model listProviders and models you can choose
/memories model set <extract|consolidation> <provider> <model> [effort]Change a model
/memories model clear <extract|consolidation>Go back to the default model
/memories reset --confirmDelete every stored memory

The memory folder is plain Markdown; you can read it and delete files in it. memory_summary.md is what new agents see; MEMORY.md is the full handbook.

Configuration

Other options go in the plugin's row of the profile's cordis.patch.yml.

OptionDefaultMeaning
memoryRoot$DSH_HOME/memories (~/.dsh/memories)Memory folder. Must be a folder used only by this plugin: it replaces any .git in it, removes symlinks and /memories reset deletes everything in it
stateDbPathbeside the memory folderSQLite state database
generateMemoriestrueExtract and merge new memories
useMemoriestrueGive agents the summary and the memory tools
externalKnowledgeoffKeep a knowledge base out of memory, see below
maxRolloutsPerStartup2Sessions extracted per pass
minRolloutIdleHours6Idle time before a session is extracted
maxRolloutAgeDays10Older sessions are skipped
maxRawMemoriesForConsolidation256Memories considered by each merge
maxUnusedDays30Unused memories are dropped after this

Keeping a knowledge base out of memory

If your agents read a hand-maintained notes folder (an Obsidian vault, say), its content would otherwise be copied into memory. Point the filter at it:

- id: memories
  name: '@libraqg/dsh-memories'
  config:
    externalKnowledge:
      root: ~/Documents/Notes
      sessionExcludedPaths:
        - personal

Content read from root is replaced with a placeholder before extraction. A session that reads anything under sessionExcludedPaths is left out of memory entirely, and its earlier memories are dropped at the next merge.

How it works

PieceWhat it does
ExtractionFilters and redacts a session, then asks the extraction model for a raw memory and a summary, or nothing if the session holds no lasting signal
ConsolidationA hidden agent, limited to five file tools inside the memory folder, merges the changes since the last merge into MEMORY.md, memory_summary.md and skills/
Read pathA system-prompt section with the summary (up to 2,500 tokens), plus the tools memories_list, memories_read, memories_search, memories_add_ad_hoc_note
StorageThe memory folder (Markdown, tracked by a private git baseline) and a SQLite job database

See docs/DESIGN.md for the design and every difference from Codex.

Permissions and risks

  • What is sent: your session contents go to the extraction model's provider, and the extracted memories to the consolidation model's provider. Secrets that look like API keys and tokens are redacted first, as in Codex. Sessions of subagents and of the plugin itself are skipped.
  • Files: writes only inside the memory folder, plus a .lock file next to it and the state database with its -wal and -shm files. The consolidation agent's file tools refuse any path outside the memory folder and inside its .git; its other tools are disabled.
  • Commands: runs git on the memory folder only, without your git config or hooks.
  • What it adds to dsh: four agent tools, one system-prompt section, the /memories command, a settings page, and one hidden subagent session per merge.
  • Model usage: each extraction is one model call per session; each merge is one agent run. Nothing runs while you are not using dsh.

Known limitations

  • Memory comes from sessions at least 6 hours old, so it lags behind.
  • Usage counting, which decides what is kept, is approximate: it counts summaries the agent opens, not search hits.
  • The knowledge-base filter matches paths. It cannot catch the agent paraphrasing a note in its reply, or a path built in a shell variable.
  • Each merge leaves a hidden subagent session in dsh's session store.
  • dsh is a release candidate. Tested on 0.2.2-rc.1, on macOS.

Develop

npm install
npm test

core/ must not depend on dsh; npm test runs scripts/check-boundaries.js to enforce it.

Licence

Apache-2.0. dsh-memories is a port of the memory pipeline of OpenAI Codex, Copyright 2025 OpenAI; NOTICE.md records what changed.

Comments

Loading…

Similar plugins

dsh-memory-file

by wojiao42

文件型长期记忆:每个会话注入你自己的 Markdown 记忆文件,提供读写工具,并能查出 DSH_HOME 漂移;不读对话、不联网 · File-backed memory for DeepSeek Harness, with verifiable constraints

Memory & ContextSessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 7, 2026

dsh plugin --profile web add dsh-memory-file

On-demand memory for DeepSeek Harness: session logs are distilled into layered markdown (a summary, an index and per-topic files), and a mem_query tool returns only the matched entries rather than the

Memory & ContextManifest valid

★ 0

dsh plugin --profile web add dsh-memory-lite

by Fishsb

DSH 长期记忆插件:记忆库 + 会话蒸馏自动沉淀 + 设置面板,越用越懂你。守藏(Shoucang)单插件,panel + scheduler + 内嵌记忆技能。

Terminal & ClientsManifest valid

★ 5

Apache-2.0

JavaScript

Sep 27, 2026

dsh plugin --profile web add dsh-shoucang-memory

by XHszDHM

Long-term notes and daily journals kept per workspace in a hot/cold archive, each tier with its own index and rebalanced once a day; read and written through seven memory_* tools, with a settings page

Memory & ContextManifest valid

★ 0

MIT

JavaScript

Nov 4, 2026

dsh plugin --profile web add dsh-memory-tide

by yangyongzhen

Long-term memory injected at session start: preferences/facts/summaries/knowledge in global and per-project scopes, budgeted recall via `agent/pre-step`, durable JSON store.

Memory & ContextSessions & MessagesManifest valid

★ 1

↓ 669/wk

JavaScript

Aug 15, 2026

dsh plugin --profile web add dsh-memory

by NoxTyrannus

Cipher memory platform as a DSH bundle: four memory types (attention, experience, preference, cognitive) sedimented per turn by four memory agents, cross-session deterministic recall injected via syst

Memory & ContextSessions & MessagesManifest valid

★ 2

↓ 87/wk

NOASSERTION

TypeScript

Aug 31, 2026

dsh plugin --profile web add dsh-cipher