Skip to main content

dsh-noema

116Stars7Forks1Issues0Watchers

Provides auditable long-term memory for DSH Agent based on Noema: cross-session fact storage and retrieval, settings page management, and memory import from 9 other AI tools.

Categories◆ Memory
Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
MIT
Branch
main
agent-memoryai-agentscoding-agentdeepseek-harnessdshdsh-pluginlong-term-memorymcp

Install

cmdweb profile
$ dsh plugin --profile web add @zseven-w/dsh-noema

Run 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

Install via your agent

Install the DeepSeek Harness plugin ZSeven-W/dsh-noema for me: review the repository at https://github.com/ZSeven-W/dsh-noema first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

At a Glance

Provides Noema-based local long-term memory for DeepSeek Harness (DSH) Agent: enables the Agent to remember user facts, decisions, and preferences across sessions. Also allows importing old memories from other AI tools like Codex, Claude Code, Cursor for unified management.

Core Features

  • Automatically recall relevant historical memories at session start or before new tasks (noema_recall)
  • Persist long-term facts, decisions, constraints, or preferences stated by users as auditable local memories (noema_remember)
  • Find memories through full-text search, PageIndex browsing, and multi-hop graph association三种方式查找记忆 (noema_search / noema_browse / noema_recall_graph + noema_neighbors)
  • Support both "软删除(墓碑)" and "硬删除"两种方式移除记忆 (noema_forget)
  • Import memories from Codex, Claude Code, opencode, Cursor, Grok, WorkBuddy, Antigravity, Trae, Qoder 共 9 个 AI 工具的 AGENTS.md/CLAUDE.md/rules files with deduplication by content (noema_import)
  • Provide settings page and local status route for hot-restarting service, configuring import sources, browsing/adding/reviewing/deleting memory entries

Technical Implementation

  • Language: TypeScript(宿主插件)+ Rust(noema-mcp 子进程)
  • Key Dependencies: @deepseek-ai/cordis(插件运行时)、@deepseek-ai/dsh-tools(工具注册)、@deepseek-ai/schemastery(设置 schema)、react ^18.2.0(客户端 UI)
  • Architecture Pattern: Plugin entry with id dsh-noema injected via cordis.patch.yml; host side mounts 15 noema_* tools, registers system prompt "记忆使用指南" section, and registers /_dsh/dsh-noema/status status route on webServer; memory engine runs as independent subprocess communicating via MCP stdio (JSON-RPC + Content-Length framing), managed by NoemaServerManager for start/stop, Keep-alive and idle recycling
  • Entry Files: src/index.ts(宿主 apply), src/client/index.tsx(设置页 UI)

Use Cases

When you want DSH Agent to remember user identity, project conventions, long-term decisions and constraints instead of starting from scratch each time. Especially suitable for those who switch between multiple AI tools and want to consolidate old tool memories into a unified local knowledge base. The import feature enables seamless migration from existing tools like Codex, Claude Code, Cursor.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DeepSeek Harness (DSH)^0.1.0-rc.6From package.json peerDependencies
Node.js>=24.11.0From package.json engines.node
React^18.2.0From package.json peerDependencies
Platform packagesMatching platformOne optionalDependencies sub-package each for darwin-arm64/x64, linux-arm64/x64 (glibc), win32-arm64/x64; optional installation must be enabled
Native moduleRust precompiled binary noema-mcpAuto-distributed by platform via optionalDependencies; source dev可用 cargo build --release -p noema-mcp

Installation

dsh plugin --profile web add github:ZSeven-W/dsh-noema

Note: After first adding to profile, DSH server needs one restart. After that, builds work with Cordis HMR and client SSE hot reload—no further restart needed.

Configuration Options

ConfigurationTypeDescriptionDefault
Enable memoryToggleMaster switch; all noema_* tools fail immediately when disabledEnabled
Server commandTextCommand to start noema-mcp; use bundled for precompiled binary, or custom command/pathbundled
Working directoryTextServer process cwd (usually needs to point to noema repo for cargo run)Empty
Memory storage root (NOEMA_ROOT)TextWhere memory files are saved; defaults to ~/.agent-memory if emptyEmpty
Start server on mountToggleServer starts on plugin mount if enabled, otherwise starts on first tool callEnabled
Idle timeout (ms)NumberHow long server runs before stopping when idle; 0 means never stop0
Keep-aliveToggleWhether to automatically restart server in background after exit/crashEnabled
Keep-alive interval (ms)Number (>=1000)Minimum interval for health checks5000
Call timeout (ms)NumberMax wait time for a single tool call30000
Restart delay (ms)NumberMinimum wait between exit and restart1000
Recall token budgetInteger (>=1)Default token limit when noema_recall has no specification1200
Auto-accept new memoriesToggleWhether noema_remember persists directly (otherwise enters review queue)Enabled
Show memory usage guideToggleWhether to include memory tool instructions in system promptEnabled
Enable external tool importToggleMaster switch for importing external tool memoriesEnabled
Import on startupToggleRun import once automatically when DSH startsDisabled
Import workspace filesToggleWhether to also read current workspace AGENTS.md / CLAUDE.md etc.Enabled
Import file size limit (bytes)Integer (>=1024)Max bytes to read from a single external file65536
Enabled import sourcesString arrayChoose which of 9 external tool IDs to scanAll 9

FAQ

Q: Is data uploaded to the cloud?

A: No. Memories are stored as auditable Markdown files locally in NOEMA_ROOT (default ~/.agent-memory/), with the entire engine running independently on your machine (local-first). The import feature only reads data from local config files of other tools.

Q: Do I need to restart DSH after installation?

A: One server restart is required when adding the plugin to profile for cordis to detect it. After that, both pnpm run build and pnpm run build:client support hot reloading through Cordis HMR and client SSE—restarting again is unnecessary.

Q: What if the server process crashes?

A: Keep-alive is enabled by default. The keep-alive loop checks every second (minimum interval adjustable in settings), and after detecting subprocess exit, waits for Restart delay before launching in the background. Failed restarts log warnings and surface errors on the next tool call. Intentional idle stop and manual stop are not overridden by keep-alive.

Q: I want to migrate memories from other AI tools (Codex / Claude Code / Cursor), how do I do it?

A: Three ways: ① Check desired sources in settings and click "Import now"; ② Have the model invoke noema_import; ③ Enable "Import on startup" when launching DSH. Each snippet deduplicates via SHA-256(path + heading + body), so repeated runs won't create duplicates. Use force: true to force re-import.

Q: Does the noema-mcp subprocess start by default? What's the resource usage?

A: "Start server on mount" is enabled by default, so noema-mcp persists after DSH launches (unless idle timeout is set to a positive value). The subprocess communicates with the host via Rust stdio on a single connection and consumes no additional resources when idle.

Q: Which settings take effect immediately?

A: Fields modified through the Settings page (/_dsh/dsh-noema/status) write and apply hot instantly, including server command, keep-alive, budget, sources, etc. After changing Server command, manually clicking "Restart" is recommended for the new command to take effect.

Q: What operating systems are supported?

A: Six npm optional packages cover macOS (arm64/x64), Linux (arm64/x64, requires glibc), and Windows (arm64/x64). Other ABIs like Linux musl lack precompiled binaries and require compiling noema-mcp manually, then specifying its path in the Server command.

Q: Are memory files deleted after uninstall?

A: No. The uninstall command dsh plugin --profile web remove @zseven-w/dsh-noema only removes the plugin itself. Memory files stay in NOEMA_ROOT and the import deduplication ledger remains in $DSH_HOME/storages/dsh-noema-imports.json—manual cleanup is needed if desired.

Learning Curve

Intermediate — The plugin runs out of the box, but effective use requires understanding long-term memory mechanics (recall vs search vs browse), the review queue, write strategies (manual/review/auto-safe/auto), and concepts like keep-alive and import ledgers. After first installation, spend a few minutes reviewing the status cards and import sources in settings, then have the model explain a few stored memories.

Known Issues & Limitations

  • First load requires DSH restart: Cordis HMR only hot-swaps already-loaded plugins. After first adding dsh-noema to profile, one server restart is required for the plugin inventory to recognize it (README.md:188)
  • Limited platform coverage: Only 6 optionalDependencies packages cover macOS arm64/x64, Linux arm64/x64 (glibc), Windows arm64/x64. Other platforms (Linux musl, FreeBSD, Linux x86 musl) need to compile noema-mcp binary themselves and specify the path in Server command (package.json:87-94, platforms.json:1-58)
  • Linux links glibc: Both linux-arm64 and linux-x64 optional packages explicitly require libc: glibc; musl distributions (Alpine, etc.) cannot use precompiled binaries directly (platforms.json:24, 34)
  • Startup fails when optional dependencies stripped: If the package manager skips optional dependencies (npm installs them by default, but some CI tools omit them), first noema-mcp launch throws "bundled package ... is not installed" with a fix hint: reinstall with optional enabled or run npm run build:noema:dev in source (src/bundled-binary.ts:101-120, src/server-manager.ts:266-273)
  • Import ledger cap at 2000 entries: To prevent unbounded ledger growth, saveLedger trims to 2000 entries by most recent timestamp; in extreme re-import scenarios, old entries get discarded (src/import-service.ts:124, 144-151)
  • Import recursion depth cap at 3: When scanning directories like Cursor rules, Trae memory, Qoder rules/memory/projects, directory recursion is hard-limited to 3 levels; files in deeper directories won't import (src/import-service.ts:170-205)
  • Status route only listens on localhost: Status route IP check restricts access to 127.0.0.1 / ::1, with Origin validation requiring same-origin; direct settings API calls are unavailable when accessing DSH web port remotely (src/status-route.ts:34-94)
  • Status route request body cap at 16 KB: POST requests to /status readBody limited to 16384 bytes; oversized write requests return 413 (src/status-route.ts:121-137)
  • Startup failure doesn't block DSH startup: If noema-mcp fails to start, the host continues without interruption, only logging a warning and erroring on tool calls; if keep-alive is enabled, confirm successful startup in logs (src/index.ts:124-127)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/ZSeven-W/dsh-noema)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory