Preface

When using DeepSeek Harness (DSH), the context window gradually fills up as the number of conversation turns increases. If all history is simply retained, details from recent interactions may become diluted, and early decisions may be conflated with the current state. The StrataGate plugin is designed to address this local memory-management problem by automatically capturing conversation content, organizing information into a retrievable structure, and maintaining a balance between short-term and long-term memory in the background.

What It Is

StrataGate Agent Memory is a local-first, cross-session memory plugin. It is maintained by diqierjia and is designed to provide automated memory-management capabilities for DSH. The plugin automatically captures completed main-agent turns, builds a searchable memory store in the background, and converts important information into structured Event and Element cards.

Core Features

  1. Short-term Memory Management
    As the conversation proceeds, details are gradually condensed; however, the original records are preserved and can be expanded when needed.

  2. Long-term Memory Structure
    History is preserved through an event timeline, while the current state is organized through a knowledge graph.

  3. Evidence Gating
    After evidence is retrieved, the plugin first determines whether the evidence is sufficient before deciding whether to respond.

  4. Usage-based Reinforcement
    Only memories that are actually used are reinforced.

  5. Source Tracking and Import
    Imported content can be converted into traceable events, update the knowledge graph, and preserve the original text.

Installation and Enablement

If DeepSeek Harness is already installed, add StrataGate to your active profile:

dsh plugin --profile web add stratagate-dsh

Restart that profile, then use DSH normally. StrataGate will automatically capture completed main-agent turns, build searchable memory in the background, and expose its Memory UI under DSH Settings → StrataGate-AgentMemory.

By default, the database is stored in:

DSH_HOME/stratagate/memory.db

Notes

Removing the plugin does not delete the database. The plugin is licensed under the MIT License.