dsh-layered-memory: A DSH plugin that brings cross-session long-term memory to DeepSeek Harness
junnanlys/dsh-layered-memory
Adds cross-session long-term memory to DeepSeek Harness: auto-distills layered memories (L0-L3) and injects them into context, keeping personal and work memories separate, zero-config.
dsh-layered-memory is a DSH plugin built for DeepSeek Harness that lets the AI remember who you are, your projects, and preferences across sessions, automatically bringing context into new conversations. It distills memories in the background through four layers from L0 capture to L3 profile distillation, and injects relevant memories before each model step, while keeping personal and work memories separate. Running zero-config, it also offers per-session memory modes, a cost dashboard, and memory tools, making long-term memory both practical and transparent.
How to Install
dsh plugin --profile web add dsh-layered-memory- Category
- Memory & Context
- Platform
- DSH Plugin
- Author
- junnanlys
- Distribution
- Plugin
dsh-layered-memory Key Features
dsh-layered-memory Repo Summary
What Does It Do?
dsh-layered-memory is a DSH plugin for DeepSeek Harness that gives the AI long-term memory across sessions, remembering who you are, your projects and preferences, and automatically bringing that context into new conversations. It solves the problem of the AI starting from scratch every time, by distilling memories in the background through four layers (L0 capture → L1 atomic memories → L2 scene integration → L3 profile distillation) and injecting relevant memories before each model step. It runs zero-config and keeps personal and work memories separate, so they don't interfere with each other.
Core Features
- Layered memory distillation: conversations are automatically processed through L0→L1→L2→L3, extracting atomic memories, scene integration, and user profiles.
- Smart recall injection: relevant memories appear as a synthetic message before the user's new message, shown as a "context injection · memory" line, so users can see the memory in action; same-session deduplication and time-based weighting prevent slowdowns.
- Per-session memory modes: a pill in the input bar lets you switch modes (auto/off/write-only), persisted per session, with a write-only mode (#38) for debugging, evaluation, or sensitive conversations.
- Cost dashboard: token costs for each distillation LLM call are recorded by provider/model in SQLite, visualized in settings with trend lines, layer tables, and per-model totals.
- Memory tools: three tools (memory_search, conversation_search, memory_read_scene) let the model read scene blocks on demand.
How to Use This Plugin?
After enabling it in DSH, the plugin automatically hooks into native events (session/event capture, agent/pre-step injection) with no manual config file edits. After installation, restart DeepSeek Harness and verify that ~/.dsh/memory/ contains conversations/ records/ scenes/ directories and memory.db to confirm the plugin applied; the settings page shows a "Memory" page and the input bar shows a mode pill when the client side is ready. In daily use, just chat normally—memories are distilled automatically; to adjust behavior, change parameters like recall.decayHalfLifeDays in settings or switch the session memory mode via the pill.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: junnanlys/dsh-layered-memory. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
