Every dsh session starts as a blank slate. Transcripts are written to disk for auditing, but the model can no longer see them. This plugin adds that missing layer: a persistent memory index + 5 memory tools + background automatic extraction.

What Is This

The plugin is alanzhao0128/dsh-memory-lite, maintained by alanzhao0128. It gives the dsh agent cross-session long-term memory. Its core features are pure Markdown files and zero dependencies. Preferences, decisions, and constraints from sessions are recorded and persist after restarts, upgrades, or profile changes.

Core Features

  1. Explicit memory tools: Provides 5 tools: read_memory, search_memory, remember, update_memory, and forget_memory. update archives old content into ## History, and forget performs a soft delete (moves to .trash/).
  2. L0 index injection: Injects a persistent memory index message into each session (rendered from _index.md); it is automatically resent when the index changes or when compression pushes it out of the visible context.
  3. Implicit extraction: In the background, new conversation windows are fed to the model, producing create / merge / update / skip decisions, with deduplicated retrieval and retries on parsing failures.
  4. Cross-peer sharing: Other peers’ memories are mounted read-only under shared/<name>/.
  5. Header indicator: A title-bar capsule + three-color dot polls the running status every 10 seconds.
  6. Peer isolation: The peer name is derived from the session cwd (directory name + short hash); sessions without a cwd fall back to defaultPeer.

Installation and Activation

Install the plugin first, then restart dsh. The installation command is:

dsh plugin --profile web add @alanzhao/dsh-memory-lite

After restarting dsh, both the host plugin and the browser-side components are loaded at startup. After installation, you should see:

  • A memory-lite capsule appears in the session title bar: green dot = most recent extraction succeeded, gray = extraction disabled, red = most recent extraction failed.
  • Settings → memory-lite shows the full configuration page.
  • If you tell the model “Remember: I use pnpm as the package manager,” it will call remember, and the file will be saved to ~/.agent-memory/peers/<peer>/memories/preferences/.

Typical Usage

  • Explicit invocation: Tell the model “Remember: I use pnpm as the package manager,” and it will call remember.
  • Configure implicit extraction: Set “reasoning intensity” to off to prevent the model from spending its output budget on thinking.
  • Verify status: After restarting dsh, verify the memory-lite capsule in Settings (green dot = OK, red = failed).

Use Cases and Cautions

Suitable for developers who need to maintain context across multiple sessions and store decision preferences and constraints.

Keep the following points in mind:

  • Permissions and security: All file access is bounded (only relative paths are allowed; absolute paths and symlink escapes are rejected); all writes use a serial queue + atomic replacement (tmp + rename).
  • Behavioral limitations: forget_memory has no approval gate (the model can directly soft-delete); automatic maintenance of ## Related is not implemented yet; there is no CLI / MCP entry point.
  • Environment dependencies: The browser-side components (indicator + settings page) require the connection service of the web profile; in a headless profile, only the tools are available; the quality of implicit extraction depends on the model, and small models may easily produce JSON that requires repair.
  • Compatibility: Requires dsh ≥ 0.1.5 and Node ≥ 22.

Once these steps are complete, you will have a zero-dependency, Markdown-based long-term memory plugin. It uses explicit tools and implicit extraction to ensure that the agent’s decisions and preferences are not lost when a session restarts. GitHub link: https://github.com/alanzhao0128/dsh-memory-lite