In the pluggable architecture of DeepSeek Harness (DSH), long-term memory for Agents often needs to be managed independently from the host process. dsh-mem0 is designed for this scenario: it allows the host Agent to read from and write to a self-hosted mem0 REST service directly through mem0_* tools.

This plugin is maintained by orangeshinee. It integrates with the new OSS build (mem0/mem0-api-server), supports the Dashboard and X-API-Key authentication, and uses REST endpoints without the /v1 prefix. It is mounted via a hot-plug mechanism without modifying DSH source code.

Core Tool Capabilities

The plugin provides the following tools, covering read and write operations across the memory lifecycle:

  • mem0_add: Write a memory. Supports a string or message array. By default, entries are categorized by defaultUserId / defaultAgentId.
  • mem0_search: Semantic search. Returns results with relevance scores.
  • mem0_get: Read a memory list (filtered by identifier) or a single memory.
  • mem0_update: Update memory text, metadata, or expiration time.
  • mem0_delete: Delete a single memory. Bulk deletion requires confirm: "DELETE ALL" and the user must be an admin.
  • mem0_history: View the change history of a single memory.
  • mem0_reset: Clear all memories. Requires confirm: "RESET" and the user must be an admin.
  • mem0_status: Health check, authentication status, and configuration status (does not output the apiKey).

Installation and Enablement

The installation process is completed through the DSH CLI and supports mounting from a GitHub repository or a local directory.

# 从 GitHub 安装
dsh plugin --profile web add github:orangeshinee/dsh-mem0

# 从本地目录安装(热插拔)
dsh plugin --profile web add link:$(pwd)

# 装完重启 dsh web 生效

Configuration

The plugin does not provide a sidebar UI, but includes a browser-side configuration card. Users need to edit the dsh-mem0 card in Settings → Plugins → Plugin Configuration.

Key Configuration Options

Key Default Value Description
baseUrl http://127.0.0.1:8888 Self-hosted mem0 address (no trailing slash, no /v1)
apiKey Empty m0sk_... created in the Dashboard “API Keys” or legacy ADMIN_API_KEY
authType apiKey Authentication method: apiKey / adminKey / jwt / none
defaultUserId HeTony Default owner when user_id is not specified
defaultAgentId dsh-agent Default owner when agent_id is not specified
timeoutMs 15000 Timeout for a single request
announceToAgent true Whether to announce plugin capabilities to the Agent
enabled true Master switch

Security Mechanism

Configuration is persisted via the dsh settings provider. The plugin configuration card is provided on the browser side (client/client.cjs) and reads/writes through the plugin’s built-in /api/dsh-mem0/config route. Because the online channel for Harness settings only exposes whitelisted namespaces, the plugin cannot add its own namespace. apiKey is marked as role('secret') in the schema: the route only returns a “configured/not configured” flag, and the key literal is not sent to the browser.

Runtime Dependencies

Runtime dependencies (@deepseek-ai/dsh-settings / @deepseek-ai/schemastery) are listed as hard dependencies. dsh plugin add installs them with the package (the profile defaults to autoInstallPeers:false, so peerDependencies are not installed).

Use Cases

This plugin is suitable for scenarios that require long-term storage of Agent context, conversation history, or business data. Because it runs with the permissions of the current dsh process, review the source code and license before installation.