Yiipu/dsh-agentmemory ↗★ 4

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 注入长期记忆工具的用户。

Package
dsh-agentmemory
Compatibility
Unverified
Harness peer range
^0.1.1-rc.2 || ^0.1.2-rc.1
Cordis peer range
^4.0.1
Version
0.4.0
License
MIT
Last updated
Sep 4, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Yiipu/dsh-agentmemory

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.

KeyDefaultRangePurpose
baseUrlhttp://localhost:3111—daemon base URL
secret''—Bearer token — plaintext or env reference (see below)
enabledtrue—lifecycle-bridge master switch; false = no observations, session rows, or injection data sources (model tools stay live)
enableToolstrue—register memory_recall / memory_remember
enableSessionStartEndtrue—mirror session/start and session/end rows
compactionBridgetrue—persist compaction summaries via /remember
agentId'dsh'—identity stamped on every written row; resolution: env AGENT_ID → this value
curlTimeoutMs40001–60000per-request curl deadline
observeBatchLimit201–200flush the session buffer at this many buffered observations
maxContentChars40001–100000per-observation content cap
maxArgsChars20001–50000tool-call arguments cap
injectContexttrue—project recall switch (route 1)
injectContextMaxChars60001–200000cap on the injected project window text
injectContextOnCompactiontrue—re-inject /context right before compaction
injectSemanticfalse—semantic recall switch (route 2)
injectSemanticMaxResults81–50cap on smart-search results folded into the semantic block
injectSemanticMaxChars30001–100000cap 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:

FormBehavior
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).