Long-term memory plugin for DeepSeek Harness (dsh). Automatically recalls relevant memories before answering, saves key facts after answering, and provides a visual settings page for full memory management.
- Persistent memory store: JSON file under
$DSH_HOME/memory-plugin/memories.json - Auto-recall: System-prompt instructions tell the model to call
memory_recallat the start of every answer - Auto-save: Model is instructed to call
memory_savewhen it learns worth-remembering facts - Dynamic context: Recent high-importance memories (≥3 stars) are automatically injected into every request's runtime context
- Full CRUD: 5 model tools — save, recall (search), list, update, delete
- Smart search: Keyword + tag matching with importance and recency scoring
- Visual settings page: Browse, search, add, edit, delete memories in a dedicated settings section
- Import / Export: Backup and restore memories as JSON files (merge or replace mode)
dsh plugin --profile web add dsh-memoryThen restart dsh (or the web UI).
dsh plugin --profile web add github:doublehappy123/dsh-memoryThe plugin registers 5 tools that the model can call automatically:
| Tool | Description |
|---|---|
memory_save |
Save a fact/preference to long-term memory |
memory_recall |
Search memory by keywords/tags, returns ranked results |
memory_list |
List all memories (paginated, tag-filterable) |
memory_update |
Update an existing memory by ID |
memory_delete |
Delete a memory by ID |
The system prompt instructs the model to:
- Call
memory_recallbefore answering to retrieve relevant context - Call
memory_saveafter answering when new worth-remembering facts emerge
After installation, open Settings → 长期记忆 (Long-term Memory) in the dsh web UI. You can:
- Browse all memories as cards with tags, importance stars, and timestamps
- Real-time search by content or tags (300ms debounce)
- Add new memories with content, tags, category, and importance (1-5 stars)
- Edit existing memories
- Delete memories (with confirmation)
- Paginate through large memory collections (20 per page)
- Export all memories to a downloadable JSON file
- Import memories from a JSON file (merge mode: dedupe by ID, update existing, add new)
{
"id": "uuid",
"content": "self-contained fact or preference",
"tags": ["preference", "python"],
"category": "technical",
"importance": 4,
"createdAt": "2026-09-01T12:00:00.000Z",
"updatedAt": "2026-09-01T12:00:00.000Z",
"source": "model"
}| Level | Meaning |
|---|---|
| 1 | Ephemeral — likely irrelevant soon |
| 2 | Low — minor preference or context |
| 3 | Normal — default, useful recurring info |
| 4 | High — important preference or decision |
| 5 | Critical — must never be forgotten |
Memories with importance ≥3 are automatically injected into the model's context at the start of every request.
- Memory store:
~/.dsh/memory-plugin/memories.json - Plugin log:
~/.dsh/logs/dsh-memory/dsh-memory.log
Exported files have the following structure:
{
"version": 1,
"exportedAt": "2026-09-02T...",
"count": 42,
"memories": [ ... ]
}Import accepts either this format or a raw array of memory objects.
- dsh >= 0.1.1-rc.2
- Node.js >= 20
- Web profile (for the visual settings page; tools work on headless profiles too)
MIT