Introduction¶
The core design philosophy of DeepSeek Harness (dsh) is “everything is a plugin.” When building agent applications, session context is usually limited to the current conversation window and cannot preserve key information across multiple sessions or long periods. This forces agents to repeatedly repeat known information or lose users’ historical preferences. The dsh-plugin-memory plugin resolves the challenges of agent long-term memory and preference tracking by using a persistent knowledge graph.
Plugin Overview¶
This plugin is maintained by menotbobbybrown and follows the MIT License. It provides dsh agents with long-term factual storage, preference recording, and retrieval based on semantics and keywords. By integrating with the Cordis framework, it can also automatically expose memory tools to agents.
Core Features¶
- Long-term factual and preference storage: Supports preserving user habits, coding conventions, architecture decisions, and more across sessions.
- Semantic and keyword retrieval: Provides relevance ranking and can accurately recall the required memory fragments based on semantics or keywords.
- CLI management: Provides the
dsh-memorycommand-line tool, allowing direct memory creation, deletion, updating, and querying in the terminal. - Cordis native support: Automatically exposes the
memory_rememberandmemory_recalltools to agents, enabling active memory reading and writing during conversations.
Installation and Enabling¶
Run the following command in the terminal to install the plugin:
dsh plugin --profile web add "github:menotbobbybrown/dsh-plugin-memory"
Typical Usage¶
After installation, you can use the memory features via the CLI or programmatic interfaces.
CLI Usage¶
# List all stored entries
npx dsh-memory list
# Add a new preference or fact, and tag it
npx dsh-memory add "User prefers TypeScript and strict ESLint rules" --type preference --tags coding,style
# Search memories, with support for semantic and keyword matching
npx dsh-memory search "coding style"
# Delete a specific memory by ID
npx dsh-memory forget <id>
Programmatic Usage¶
Use it in a Cordis context:
import { Context } from 'cordis';
import * as MemoryPlugin from 'dsh-plugin-memory';
const ctx = new Context();
ctx.plugin(MemoryPlugin);
// Store a memory
ctx.memory.remember('Target database is PostgreSQL 16');
// Recall from memory
const results = ctx.memory.recall('database version');
Notes¶
- Runtime permissions: This plugin runs with the permissions of the current DSH process. Make sure the source is trustworthy.
- License: Plugin distribution follows the MIT License.
- Ecosystem context: DSH community catalogs (such as SkillHub) have no official affiliation with DeepSeek / High-Flyer. Please verify plugin functionality through the GitHub source code.
Conclusion¶
dsh-plugin-memory provides the infrastructure needed to build long-term memory capabilities for DeepSeek Harness. Through simple CLI or API calls, agents can easily create user profiles and historical knowledge bases, maintaining contextual consistency across multi-turn conversations.
Plugin directory: https://www.skillhub.cn/plugins/menotbobbybrown/dsh-plugin-memory
GitHub repository: https://github.com/menotbobbybrown/dsh-plugin-memory