dsh-mem0
Mem0 long-term memory for DeepSeek Harness: managed Platform, self-hosted server or local OSS, with a visual settings page, automatic recall/capture, editable memory summary, token budgets and weekly memory hygiene.
同名パッケージの別リポジトリ
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:light-cheng/DSH-Mem0ドキュメント
README 全文を読む ↗Configuration
After installation, configure it visually in Plugins → Mem0 Memory in the DSH sidebar (recommended); you can also write the profile's cordis.patch.yml. Full YAML example:
- id: dsh-mem0
name: dsh-mem0
config:
backend: platform
apiKey: "your-platform-api-key"
userId: "your-user-id"
agentId: "dsh"
Backend modes
Platform (simplest, recommended for new users)
config:
backend: platform
apiKey: "your-platform-api-key"
userId: "your-user-id"
The API key can also come from an environment variable instead of the config:
config:
backend: platform
apiKeyEnv: MEM0_API_KEY
Self-hosted Mem0 server
config:
backend: server
baseUrl: "http://127.0.0.1:8888"
authType: apiKey
apiKey: "your-server-key"
userId: "your-user-id"
authType supports apiKey (X-API-Key), bearer, token and none (for local services with AUTH_DISABLED=true).
OSS Python sidecar (local Qdrant / bge-m3)
First prepare a Mem0 OSS config file, for example ~/.dsh/mem0/oss.json; see examples/oss-config.example.json.
config:
backend: oss
pythonPath: "~/.dsh/mem0/venv/bin/python"
mem0ConfigPath: "~/.dsh/mem0/oss.json"
collectionName: "dsh_mem0"
userId: "your-user-id"
The Python environment needs:
python3 -m venv ~/.dsh/mem0/venv
~/.dsh/mem0/venv/bin/pip install "mem0ai>=2.0.10,<3" qdrant-client openai
This version does not silently install Python or Qdrant when the plugin loads, and does not modify the system Python. The settings page shows connection errors; prefer Platform, or prepare the local environment manually with the commands above. A better future flow is a guided environment check + explicit one-click venv creation in the settings page, rather than automatic execution at plugin install time.
The sidecar reads oss.llm, oss.embedder and oss.vector_store from mem0ConfigPath and overrides the collection name with collectionName; other Mem0 clients can keep using their own collections.
All options
| Field | Default | Description |
|---|---|---|
backend | auto | auto / platform / server / oss |
apiKey | empty | Platform or server API key |
apiKeyEnv | MEM0_API_KEY | API key environment variable name |
baseUrl | Platform: https://api.mem0.ai; server: http://127.0.0.1:8888 | API endpoint |
authType | apiKey (Platform is fixed to token) | apiKey / bearer / token / none |
pythonPath | auto-discovered | OSS-mode Python interpreter |
mem0ConfigPath | ~/.dsh/mem0/oss.json | OSS-mode Mem0 config file |
collectionName | dsh_mem0 | OSS-mode Qdrant collection |
historyDbPath | ~/.dsh/mem0/history.db | OSS sidecar local history database |
userId | dsh-user | Memory owner |
agentId | dsh | Agent identifier attached on DSH writes; recall currently filters by userId, not agentId |
autoRecall | true | Automatic recall |
autoCapture | true | Automatically save completed turns |
announceToAgent | true | Announce memory capability to the model |
includeSubagents | false | Enable automatic memory for subagents |
captureMaxChars | 450 | Per-message truncation limit for automatic capture |
captureFilter | heuristic | heuristic skips low-value turns; off saves every completed turn |
recallTopK | 5 | Number of automatic recall results |
memoryBudgetTokens | 2200 | Token budget for injected recalled memories |
profileEnabled | true | Generate and inject a compact user profile |
profileBudgetTokens | 1375 | Token budget for the injected profile |
storeMaxMemories | 500 | Maximum memories retained after hygiene |
storeMaxTokens | 20000 | Estimated token limit for retained memories after hygiene |
hygieneEnabled | true | Enable memory hygiene |
hygieneIntervalDays | 7 | Hygiene interval in days, 1–90 |
timeoutMs | 30000 | Per-request timeout for REST backends |
enabled | true | Master switch |
Reload the plugin or restart DSH after changing configuration.