Integrates a three
$ dsh plugin --profile web add github:omdsh-dev/dsh-mnemonRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
dsh-mnemon introduces a three-layer memory control plane for DeepSeek Harness: runtime USER.md / MEMORY.md automatically injected per turn, full-text searchable project archives, and Memory Spaces that switch between 9 long-term memory Providers—the long-term memory backend doesn't need to be bound to Mnemon.
/mnemon status|recall|related|remember|forget commandstsdown)schemastery (config schema validation), @deepseek-ai/dsh-client-runtime + dsh-client-ui-conversation + dsh-client-ui-settings + dsh-client-ui-primitives (DSH Host/Client access), markdown-to-jsx + fflate (Markdown rendering and package compression)tools / settings / commands / agents / subagents; host loads runtime graph via apply(ctx, config); all Mnemon CLI calls go through runner.ts's spawn(command, args, { shell: false }) with process queuing; long-term memory writes supervised by MnemonSubagentCoordinator spawning independent task Agentssrc/index.ts (exports apply entry and name = 'dsh-mnemon'), Cordis injection config in cordis.patch.ymlWhen users want DSH Agents to remember preferences, project conventions, post-mortem conclusions, and long-term facts across sessions, this plugin enables Agents to automatically restore context in new sessions, retrieve historical project archives, and recall evidence from external memory services on demand. It's suitable for research/engineering Agents requiring long-term collaboration, team workflows needing cross-project memory sharing, and migration scenarios where the memory backend is moved from single SQLite to external services like Mem0 / OpenViking.
| Dependency | Min Version | Description |
|---|---|---|
| DSH Host | 0.1.0-rc.6 | peerDependencies locked; Host APIs before rc.6 are incompatible |
| Node.js | >= 20 | Declared in package.json#engines.node |
| Platform | Cross-platform | Supported on macOS / Windows / Linux; Windows auto-discovers mnemon.exe; third-party Providers use HTTP or local CLI |
| External CLI | mnemon >= 0.2.3 | Recommended as default long-term memory engine; missing causes all semantic read/write to fail |
provider named spawn | Required | Supervised task Agents need toolFilter / persona / depthLimit; missing makes semantic tasks unavailable |
provider named fork | Optional | Enables background scoring review when inheritsParentContext=true; missing only affects background review, UI and manual flows still work |
dsh plugin --profile web add github:omdsh-dev/dsh-mnemon
| Config | Type | Description | Default |
|---|---|---|---|
displayMode | sidebar / buildin | Whether workspace attaches to Sidebar or returns to conversation tab | sidebar |
storageScope | global / workspace / custom | Unified storage root for Runtime / Documents / Memory Spaces | global |
dataDir | Absolute path or ~ / ~/... | Required persistent directory when storageScope: custom | unset |
cliPath | Executable path | Explicitly specify mnemon executable location; if empty, auto-discover via MNEMON_CLI_PATH → PATH → common directories | unset |
store | [A-Za-z0-9][A-Za-z0-9_-]* | Legacy Store compatibility discovery hint, no longer used for runtime routing | unset |
timeoutMs | 100–120000 | Hard timeout for single Mnemon CLI call (ms) | 10000 |
defaultRecallLimit | 1–50 | Default recall count; shared by UI and /mnemon recall command | 10 |
recallQuality.policy | Registered policy id | Deterministic filtering strategy for recall results before entering Agent | strict-v1 |
recallQuality.lowScoreThreshold | 0–1 | Below this score, normalized relevance is discarded in strict policy | 0.25 |
recallQuality.highScoreThreshold | 0–1 | Above this score marked as high relevance, must be > lowScoreThreshold | 0.6 |
recallQuality.candidateMultiplier | 1–5 | Expansion multiplier before recall (cap 50 candidates) | 3 |
recallQuality.maxMediumResults | 0–50 | Cap on medium relevance results allowed in strict policy | 4 |
recallQuality.maxUnknownResults | 0–50 | Cap on unknown-scale results allowed in strict policy | 2 |
routingGuidance | boolean | Whether to register additional layered routing system prompts | true |
lifecycleEnabled boolean | Whether to enable pre-step prompts and idle scoring review | true | |
recallMode | guided / off | Whether to inject "on-demand recall" prompts; explicit mnemon_recall unaffected | guided |
writebackMode | guided / off | Whether to inject hot memory prompts and enable idle scoring review; explicit writes still work | guided |
idleReviewMs | 5000–600000 | Continuous idle duration required to trigger background scoring review | 30000 |
tabEnabled | boolean | Whether to mount the Web entry for selected displayMode; after disabling, Host RPC, commands, and Agent tools still registered | true |
writeEnabled | boolean | Whether to expose semantic write tools, write RPC, `/mnemon remember | forget` |
taskAgentModel.mode | inherit / fixed | Model routing for independent task Agents: AI meta-info, Agent queries, memory distillation, archiving | inherit |
taskAgentModel.provider | string | Required in fixed mode for Provider ID | unset |
taskAgentModel.model | string | Required in fixed mode for model ID | unset |
remoteAccess | read-only / trusted-host | Whether remote Web pages can call privileged Mnemon RPC; locked at startup, requires Host restart | read-only |
mnemon-ui.turnBar | boolean | Turn memory activity bar at conversation end | true |
mnemon-ui.saveAction | boolean | "Save to memory" icon and confirmation below assistant reply | true |
persistenceStrategy | object | Hard rules + soft preferences for selecting Memory Space Provider during supervised writes | manual + only mnemon-native |
customPackId / customPacks | string / array | Explicitly specify multiple custom data directories (max 32), can be viewed as multi-package registry for "custom scope" | unset |
Q: After installation, the plugin shows unavailable. How do I troubleshoot?
A: First check if mnemon CLI is executable in PATH (run command -v mnemon on macOS/Linux, Get-Command mnemon in PowerShell on Windows), and confirm mnemon --version is at least 0.2.3. If the CLI is in a non-standard location, fill in mnemon.cliPath in user settings or export MNEMON_CLI_PATH environment variable before restarting Host.
Q: Can I switch from "all Agents share" to "only use in current project"? Will data be moved?
A: Yes, but the plugin won't automatically migrate. storageScope of global / workspace / custom is a one-time root selection—switching only makes the new location effective. Runtime, Documents, and Memory Spaces under the old root remain unchanged. It's recommended to do a ZIP backup in the original scope before switching, then import and verify after saving to the new scope.
Q: Can I store all memories in third-party services like Mem0 / OpenViking / Holographic?
A: Yes. Third-party Providers are disabled by default; after enabling, configure endpoint, API key, etc., in the Provider service config page to register one or more Memory Spaces. Mnemon Native (local SQLite) as the default backend can coexist with third-party Memory Spaces. Switching DSH workspaces won't automatically rewrite third-party service namespaces like URI, workspace, user, project, container.
Q: What's the AI's permission boundary for writing memory? Will it automatically delete remote data?
A: No remote data is deleted. All changes are first validated for legality and path on the Host side; persistent Provider writes are supervised by independent task Agents via MnemonSubagentCoordinator, and the "Save to memory" dialog before execution allows cancellation. Provider shutdown only cleans up local directory mappings, activation state, and local metadata (title, description)—it doesn't unsubscribe or delete actual remote service data.
Q: Will uninstalling the plugin clear my memory database?
A: No. Uninstalling only unregisters the plugin. Runtime, Documents, Mnemon Native database, and state/ config stored under ~/.mnemon / <workspace>/.mnemon / custom dataDir are all preserved. After reinstalling, the plugin will rediscover this data. If you want to completely clean up, you can manually delete the corresponding directories.
Q: What are "Turn memory" and "Save to memory" in the Web UI?
A: "Turn memory" displays which memory tools the Agent used this turn (recall, write, document search, etc.), each linking to the corresponding Memory Space or Document page; "Save to memory" opens the current assistant reply as a draft in an editable confirmation dialog, and only starts the supervised write flow after user confirmation—canceling produces no changes.
Q: Can the model used by sub-Agents / task Agents be changed? Will it conflict with my conversation model?
A: No conflict. After selecting "fixed" in mnemon.taskAgentModel and filling in Provider/Model, independent task Agents for AI meta-info, archiving, Agent queries, memory distillation, etc., all use that routing; the default inherit mode follows DSH's default Provider/Model fallback when "new session" is created. Neither mode affects the main conversation Agent's model selection.
Advanced — the plugin works out of the box, but introduces three layers of Runtime/Archive/Long-term memory with 9 Providers, plus 12 Agent tools and 6 sets of Slash commands; ordinary users can complete their first Recall in 5 minutes, but to leverage advanced capabilities like layered routing, Recall quality policies, and background review, understanding the three concepts "Memory Body / runtime store / Documents" and storageScope boundaries is required.
storageScope does not automatically migrate, merge, or delete data from the old scope: migration can only go through "old scope export ZIP → switch save → new scope import" pathglobal / custom may be shared across multiple workspaces, but records don't carry independent workspace affiliation fields; sourcePaths are only validated relative to current cwd at write timewriteEnabled: false is functional read-only, not disk-level read-only: Runtime projection initialization, document last-access time updates, and Mnemon read-triggered database migration may still occur at startupEnglish · 简体中文
The three-tier, pluggable, Agent-driven memory system for DeepSeek Harness.
Three memory tiers · Nine long-term providers · One supervised workflow
Explore the capability map · Start in five minutes · Read the v0.2.9 notes · Watch the widescreen demo
dsh-mnemon gives DSH one memory control plane without forcing every kind of knowledge into one database. Runtime Memory keeps compact context available every turn. Project Documents preserve complete narratives. Memory Spaces retrieve durable evidence on demand and can use Mnemon, OpenViking, Honcho, Mem0, Hindsight, Holographic, RetainDB, ByteRover, or Supermemory.
Mnemon remains the official, prioritized native engine. The third tier is replaceable; the first two keep the same storage, workspace, and interaction model regardless of provider.
| Tier | Keep here | How it reaches the Agent | Managed by |
|---|---|---|---|
| Runtime | Preferences, collaboration rules, project conventions, environment facts | Compact USER.md / MEMORY.md projection on every turn | Deterministic dsh-mnemon Host |
| Documents | Designs, investigations, procedures, postmortems, handoffs | Search first, full Markdown on demand | Deterministic dsh-mnemon Host |
| Memory Spaces | Cross-session facts, decisions, entities, relations | Bounded recall from active spaces | Mnemon Native or an external Provider |
The tiers are not copies. A useful rule is: every-turn context goes to Runtime, complete narratives go to Documents, and cross-task evidence goes to Memory Spaces. Current instructions, repository files, and live tool results always outrank historical memory.
| User action | What actually runs | Data effect |
|---|---|---|
| Search | Concurrent provider-native recall | Read-only |
| Agent query | A clean top-level task Agent receives bounded evidence and writes an answer | Read-only |
| Remember / Save to memory | A clean task Agent qualifies, routes, deduplicates, distills, and writes behind Host controls | Writes only if accepted |
| Smart selection | Hard rules filter providers; a task Agent resolves only genuine ambiguity | Saves a routing receipt |
| AI metadata | One asynchronous task Agent per selected Memory Space, each using the provider's fastest sample path | Local title/description only |
| Archive Document | A task Agent creates a searchable cold reference before the Host moves the original | Supervised move |
| Turn memory | Expands exact recall, write, and Document-search activity; each item navigates to its source | Read-only |
These tasks do not reuse or consume the main conversation history. By default they follow DSH's new-session model route; Settings → Memory System → Background task Agent can select a dedicated Provider and model.
| Provider | Shape | Best fit |
|---|---|---|
| Mnemon | Official native local CLI + SQLite | Exact writes, entities, typed relationships, local-first sharing |
| OpenViking | HTTP + viking:// | Resource trees and asynchronous extraction |
| Honcho | HTTP workspace / peers | Team and Agent-peer conclusions |
| Mem0 | Platform or self-hosted HTTP | Existing user / Agent memory |
| Hindsight | HTTP memory bank | Banks, entities, provider-native graph |
| Holographic | Local structured fact files | Auditable facts, trust scores, local entities |
| RetainDB | HTTP project / user | Project- and user-scoped profiles |
| ByteRover | Local brv CLI | Code knowledge trees and curate workflows |
| Supermemory | HTTP container | Document ingestion and container sharing |
Provider capability differences stay visible. dsh-mnemon never invents graph edges, deletion semantics, or enumerable content for an engine that does not provide them. Settings owns reusable Provider services; Memory Spaces owns concrete instances, activation, scope, and metadata. External Providers are off by default.
See the provider capability and deployment matrix.
The following roughly 55-second capture comes from a live 1600×900 DSH WebUI. It deliberately pauses on full-page scrolling, page transitions, Provider cards, dialogs, button-state changes, and a completed read-only Agent Query. Destructive confirmations are deliberately not submitted.

Watch the 1600×900 MP4 · Open the page-by-page UI guide
Mnemon is the default engine and the simplest local-first starting point:
# macOS
brew install --cask mnemon-dev/tap/mnemon
# macOS / Linux via Go
go install github.com/mnemon-dev/mnemon@latest
mnemon --version
Windows users can install the official v0.2.3-or-newer release ZIP. The expected installation path and checksum procedure are in Getting Started.
dsh plugin --profile web add dsh-mnemon
dsh --profile web
DSH profiles have independent plugin rosters. Install the same package separately for one-shot Headless tasks:
dsh plugin --profile headless add dsh-mnemon
dsh --profile headless "Check durable project context before answering this task."
For a local checkout, use an absolute path:
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"
dsh plugin --profile headless add "link:/absolute/path/to/dsh-mnemon"
The primary tab order is intentionally stable: Status, Runtime, Documents, Memory Spaces.
The workbench makes the task boundary explicit before dispatch and keeps the returned answer beside its evidence scope. Conversation-native Turn memory and Save to memory remain enabled by default and can be changed independently under Settings → Memory System → Conversation interface.
Manual creation always asks the user to choose. Smart selection is a distillation policy: hard rules define the eligible set, then an optional prompt guides the Agent only when several candidates remain.
| Scope | Behavior |
|---|---|
global | Uses ~/.mnemon; ideal for a local control plane shared across workspaces and Agents |
workspace | Uses <workspace>/.mnemon; local Providers that support workspace following move with the effective workspace |
custom | An explicit path with global semantics, useful for team conventions or isolated environments |
Remote Provider workspaces, users, banks, projects, containers, and URIs remain their own namespaces; switching the DSH workspace never silently rewrites them. In workspace mode, the workbench may inspect one selected workspace while the current conversation continues to execute in its own cwd. Independent task Agents launched from the workbench use the inspected workspace even when no main session is selected.
| Surface | What remains available |
|---|---|
| Sidebar WebUI | Status, Runtime, Documents, Memory Spaces, Provider services, visualization, and confirmation surfaces |
| Conversation UI | Turn memory, Save to memory, exact navigation to the corresponding page |
| Headless | Runtime injection, Document search, Memory Space tools, workspace routing, and supervised writes without a WebUI |
| Commands | /mnemon status, recall, related, remember, and forget |
0600 under <storageRoot>/state/memory-providers.json. They are never returned to the browser, smart-selection Agent, or Mnemon Pack.See Operations, security, and troubleshooting for backup, recovery, and diagnostics.
| I want to… | Start here |
|---|---|
| See the complete product boundary | Capability map |
| Install and verify the first workflow | Getting Started |
| Follow every visible click and Agent action | Sidebar and conversation UI guide |
| Compare or deploy all nine Providers | Long-term memory providers |
| Understand tiering and lifecycle | Storage model · Workflows |
| Configure scope, routing, and model selection | Configuration |
| Back up, update, or troubleshoot | Operations |
| Integrate tools, commands, or RPC | Interface reference |
| Review the release | v0.2.9 release notes |
See the documentation hub for the full map.
pnpm install
pnpm run verify
verify runs TypeScript checks, Vitest, a reproducible double build, an isolated real Headless-profile activation check, and published-package validation. lib/ is generated and intentionally not tracked.
MIT. Report security issues privately through SECURITY.md, not a public issue.