light-cheng/DSH-Mem0 ↗★ 1

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.

套件
dsh-mem0
相容性
待驗證
Harness 依賴範圍
>=0.2.1-rc.5 <0.3.0
版本
0.2.2
授權
MIT
最近更新
2026年11月3日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:light-cheng/DSH-Mem0

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

FieldDefaultDescription
backendautoauto / platform / server / oss
apiKeyemptyPlatform or server API key
apiKeyEnvMEM0_API_KEYAPI key environment variable name
baseUrlPlatform: https://api.mem0.ai; server: http://127.0.0.1:8888API endpoint
authTypeapiKey (Platform is fixed to token)apiKey / bearer / token / none
pythonPathauto-discoveredOSS-mode Python interpreter
mem0ConfigPath~/.dsh/mem0/oss.jsonOSS-mode Mem0 config file
collectionNamedsh_mem0OSS-mode Qdrant collection
historyDbPath~/.dsh/mem0/history.dbOSS sidecar local history database
userIddsh-userMemory owner
agentIddshAgent identifier attached on DSH writes; recall currently filters by userId, not agentId
autoRecalltrueAutomatic recall
autoCapturetrueAutomatically save completed turns
announceToAgenttrueAnnounce memory capability to the model
includeSubagentsfalseEnable automatic memory for subagents
captureMaxChars450Per-message truncation limit for automatic capture
captureFilterheuristicheuristic skips low-value turns; off saves every completed turn
recallTopK5Number of automatic recall results
memoryBudgetTokens2200Token budget for injected recalled memories
profileEnabledtrueGenerate and inject a compact user profile
profileBudgetTokens1375Token budget for the injected profile
storeMaxMemories500Maximum memories retained after hygiene
storeMaxTokens20000Estimated token limit for retained memories after hygiene
hygieneEnabledtrueEnable memory hygiene
hygieneIntervalDays7Hygiene interval in days, 1–90
timeoutMs30000Per-request timeout for REST backends
enabledtrueMaster switch

Reload the plugin or restart DSH after changing configuration.