Introduction

In the plugin-based ecosystem of DeepSeek Harness (DSH), providing agents with persistent and isolated session memory is a common technical challenge. Traditional memory solutions may face issues such as uncertain context root directories, tool registration conflicts, or lack of session isolation. dsh-engram-session aims to address these pain points by using session-level Engram MCP child processes, providing agents with stable and reusable memory storage capabilities.

What Is This

dsh-engram-session is a standalone Engram memory package maintained by developer xiuyuan18. As a standalone DSH plugin, it provides Engram memory functionality for agent sessions and is a reusable independent project, supporting use across profiles and presets.

Core Features

This plugin has the following core capabilities:

  1. Session-level memory management: Generates a separate Engram MCP child process for each agent session, ensuring that memory storage is bound to the session context.
  2. Deterministic root directory: Sets the child process current working directory (cwd) to the session workspace root directory, resolving the uncertainty of Engram project auto-detection (such as Git root directory or .engram/config.json), especially compatibility issues in environments like DSH web GUI, VS Code, or CI.
  3. Scope isolation: Registers the mem_* series of tools within the agent’s own scope, avoiding naming conflicts with other agents or global tools.
  4. Protocol injection: Injects the Memory Protocol as part of the system prompt during loading, defining how agents interact with memory tools.
  5. Side-effect-free removal: The plugin is an independent Bundle project and includes a dsh.bundle.patch layer. Removing or disabling the plugin leaves no tool registrations or memory directives behind and produces no side effects.

Installation and Activation

Before using it, you need to install dependencies and add the plugin to the configuration file.

  1. Enter the plugin directory and install dependencies:
    cd /home/xiuyuaned/dsh-plugins/dsh-engram-session && pnpm install
  1. Add the plugin to the specified configuration file (for example, web):
    dsh plugin --profile <name> add /home/xiuyuaned/dsh-plugins/dsh-engram-session
  1. Restart the application corresponding to the configuration file to activate the plugin.

Typical Usage

After installation is complete, agents can use the mem_* tools for memory operations. If you need to remove the plugin, run the following command:

dsh plugin --profile <name> remove dsh-engram-session

Because the source code is in an external directory, the removal operation does not delete the plugin itself, so you can reinstall it at any time.

Applicable Scenarios and Notes

This plugin is suitable for scenarios that require providing agents with isolated session memory contexts and avoiding memory pollution.

Notes:
1. Unofficial project: This is a community standalone project and is not part of the official DeepSeek Harness products. Use it at your own risk.
2. No reconnection supervision: The plugin has no reconnection mechanism for Engram child processes. If a child process terminates unexpectedly during a session, its registered tools will become unavailable until the current session ends.
3. Result projection limitations: Currently, only text result projection is supported. If Engram returns images, audio, or embedded MCP blocks, they will be converted into diagnostic information, and agents cannot process them directly.
4. Binary dependency: The plugin depends on the Engram executable file. If the binary file is not found, the plugin will log a warning and mount, but it will skip the memory tools and protocol injection parts.

Short Conclusion

dsh-engram-session provides a reliable memory solution for DSH agents through session isolation and deterministic path resolution. Its side-effect-free design also makes it easy to reuse across profiles. For more technical details and source code, refer to its GitHub repository.