When developing agents, managing contextual memory often relies on temporary conversations or non-standardized storage approaches. DSH advocates a plugin-based architecture, and dsh-agent-memory is a standalone plugin designed to address memory persistence for Claw Agents. It provides each Agent with USER / MEMORY vaults, journals, and a post-turn review mechanism.

Core Features

  • Vaults and Journals: Each Claw Agent has dedicated USER and MEMORY vaults, as well as journal files archived by date.
  • Post-turn Review: After each conversation turn ends, a review operation is performed based on the settings.
  • Compaction Sync: When official session compaction starts, the plugin listens for the compaction/start event on session/event and immediately writes the content that needs to be persisted into the vaults.
  • Configuration Options: Supports configuring memory writes as “free-write” or “approval-required,” as well as the enabled state of the “review toggle.”
  • Scope Isolation:
    • Claw sessions only read their own vaults.
    • Workspace / official sessions do not inject Claw memory.
    • The memory tool is attached only to Claw sessions.

Installation and Enablement

It is recommended to install dsh-agent-registry and dsh-agent-identity before installing.

  1. Install via GitHub:
    dsh plugin --profile web add github:xingyingyuzhui/dsh-agent-memory
  1. Install for Local Development:
    dsh plugin --profile web add link:/abs/path/to/dsh-agent-memory
  1. Restart the Service:
    After installation, restart dsh web.

Data Storage Locations

The following files are generated when the plugin runs:

  • Vault Files:
    • ~/.dsh/DSclaw/<slug>/USER.md
    • ~/.dsh/DSclaw/<slug>/MEMORY.md
  • Journal Files:
    • ~/.dsh/DSclaw/<slug>/memory/YYYY-MM-DD.md
  • Global Configuration:
    • ~/.dsh/agent-memory/settings.json

Notes

  • Tool Mounting: The memory tool is attached only to Claw sessions (DSH 0.1.6+ uses serial initialization).
  • Uninstall Behavior: After uninstalling, the above files remain on disk, but the plugin no longer injects memory or performs reviews, and the memory tool disappears.
  • Permissions and Security: The plugin runs with the permissions of the current dsh process. Before installing, review the source code and license.

This plugin provides a standardized memory layer for Claw Agents under DSH. For more details, refer to the project directory or source code.