deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
GitHub: Scorp1o117/dsh-tdai-memory · npm: dsh-tdai-memory
Part of the DeepSeek Harness Enhancement Suite — Vision · Soul/Persona · Long-term Memory · Plugin Marketplace.
A port of TencentDB Agent Memory (Tencent Cloud's open-source four-layer memory system, originally an OpenClaw plugin) into DeepSeek Harness.
records/ + SQLite + FTS + vectorstdai_memory_search (L1 structured search),
tdai_conversation_search (L0 raw-text search)The data directory reuses the existing ~/.memory-tencentdb/memory-tdai, so
previously accumulated memories carry over seamlessly.
| Layer | Content |
|---|---|
| Core | The host-neutral core of tdai-memory-openclaw-plugin (src/core, src/utils), tsc-compiled to ESM (dist-dsh/), zero changes |
| Host adapter | StandaloneHostAdapter (official standalone mode, direct OpenAI-compatible calls) |
| dsh shell | index.js: config mapping, session/event + session/flush capture, system-prompt/assemble recall injection on agent.ctx, tool registration, lifecycle |
| Fallback | recall-inject.js: preset-row recall injection (used when mounted inside an agent preset) |
Hard-won wiring details:
session/flush listener (await semantics; must complete before
headless exits); turn/start timestamps as the L0 cursor floor; turn-id dedupcore.handleSessionEnd() inside flush
(L1 extraction finishes before exit; otherwise the 5s shutdown timeout kills it)agent.ctx (assembly runs in
the agent scope; root listeners never see it); attach one tick after
session/created by resolving the agent from the agents serviceConfiguration is settings-namespace driven: the profile patch is the base
layer, and the tdai-memory: section of $DSH_HOME/settings.yaml overrides it
(LLM/embedding keys live in settings.yaml). The Web UI Settings → 记忆
section edits every field (v0.2.0, write-only keys); TdaiCore is built at
startup, so changes apply after a restart.
# $DSH_HOME/settings.yaml
tdai-memory:
llm:
apiKey: 'sk-...'
embedding:
apiKey: 'local-no-key'
# profile patch (base layer)
- id: tdai-memory
name: 'dsh-tdai-memory'
config:
extraction:
enabled: true
enableDedup: false # dedup LLM output parsing is flaky; off by default
llm: # L1/L2/L3 extraction model (OpenAI-compatible)
baseUrl: 'https://opencode.ai/zen/go/v1'
model: 'mimo-v2.5' # deepseek-v4-flash produces invalid extraction JSON
embedding: # vectors (OpenAI-compatible /v1/embeddings)
baseUrl: 'http://127.0.0.1:8088/v1'
model: 'Qwen3-Embedding-0.6B'
dimensions: 1024
sendDimensions: false
dsh plugin --profile web add dsh-tdai-memory
then mount it in $DSH_HOME/profiles/web/cordis.patch.yml:
- insert:
- id: tdai-memory
name: 'dsh-tdai-memory'
config: {} # keys can live in settings.yaml instead
and restart dsh web. LLM/embedding API keys can be set in the Web UI
settings page (记忆 / Memory) or directly in settings.yaml under
tdai-memory:.
Note for users
- This plugin is a standard profile bundle (
dsh.bundle.patch):dsh plugin --profile web add dsh-tdai-memoryinstalls and mounts it in one step — no manualcordis.patch.ymledits needed.- The settings section needs the
dsh-host-apiproxynamespace allowlist; the plugin patches it automatically on first start — restartdsh webonce more and the section appears. A dsh update overwrites the patch; the next plugin start re-applies it.- Settings changes apply after a restart (TdaiCore is built at startup).
- Tested against DSH
0.1.0-rc.6.
mimo-v2.5 extracts correctly but takes 20-30s per
call (background execution, does not block the conversation);
deepseek-v4-flash is fast but its JSON output is non-compliant (extracts 0)destroy() on headless exitnpx tsc -p dsh-tsconfig.json in the tdai project dir (output in dist-dsh/)MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。