dsh-agentmemory
DSH ↔ agentmemory session-memory bridge (backend-only). Mirrors session lifecycle into agentmemory with standard hookTypes (compression-friendly, dedup-safe), exposes memory_recall / memory_remember tools, and injects memory context via agent/pre-step. Configuration comes from the cordis.yml row. 适合需要通过本地 agentmemory 守护进程为 Agent 注入长期记忆工具的用户。
Other repositories with this package name
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Yiipu/dsh-agentmemoryREADME
Read the full README ↗Configuration keys
All keys live under the row's config; omitted keys are filled with defaults automatically — no need to copy default values into the row by hand. Cordis validates natively: an invalid value (such as curlTimeoutMs: -5) makes the plugin fail to load with a clear error.
| Key | Default | Range | Purpose |
|---|---|---|---|
baseUrl | http://localhost:3111 | — | daemon base URL |
secret | '' | — | Bearer token — plaintext or env reference (see below) |
enabled | true | — | lifecycle-bridge master switch; false = no observations, session rows, or injection data sources (model tools stay live) |
enableTools | true | — | register memory_recall / memory_remember |
enableSessionStartEnd | true | — | mirror session/start and session/end rows |
compactionBridge | true | — | persist compaction summaries via /remember |
agentId | 'dsh' | — | identity stamped on every written row; resolution: env AGENT_ID → this value |
curlTimeoutMs | 4000 | 1–60000 | per-request curl deadline |
observeBatchLimit | 20 | 1–200 | flush the session buffer at this many buffered observations |
maxContentChars | 4000 | 1–100000 | per-observation content cap |
maxArgsChars | 2000 | 1–50000 | tool-call arguments cap |
injectContext | true | — | project recall switch (route 1) |
injectContextMaxChars | 6000 | 1–200000 | cap on the injected project window text |
injectContextOnCompaction | true | — | re-inject /context right before compaction |
injectSemantic | false | — | semantic recall switch (route 2) |
injectSemanticMaxResults | 8 | 1–50 | cap on smart-search results folded into the semantic block |
injectSemanticMaxChars | 3000 | 1–100000 | cap on the rendered semantic recall text |
secret: plaintext or an environment-variable reference
secret accepts two forms — plaintext or an environment-variable reference (the latter with three variants). Note a plaintext secret is stored verbatim in cordis.yml — prefer an env reference if the file is shared or version-controlled:
| Form | Behavior |
|---|---|
secret: "xxx" | Plaintext, used verbatim as the Bearer token |
secret: '${AGENTMEMORY_SECRET}' | Reads the env var; if unset → load fails (loudly) |
secret: '${AGENTMEMORY_SECRET:default}' | Reads the env var; if unset → uses default |
secret: '${AGENTMEMORY_SECRET:?goes nowhere}' | Reads the env var; if unset → fails with the message goes nowhere |
Environment variables are resolved through the shell seam at the start of apply() (the sandbox has no direct env access).