Zhang-Zhengyuan/dsh-memory-amem

Zhang-Zhengyuan★ 1TypeScriptLast synced: 2026-08-15

Open on GitHub

Long-term, agentic memory for DeepSeek Harness — A-MEM with prompt-injection defenses, atomic persistence, and native + MCP integration.

README excerpt

dsh-tool-memory-amem Long-term agentic memory for DeepSeek Harness (DSH). Implementation of A-MEM (NeurIPS 2025). 中文文档 / Chinese README DSH ships its own chat agents but has no first-class memory: every new session starts from zero. dsh-tool-memory-amem plugs an A-MEM style agentic memory into DSH — every user message is captured as a structured note, automatically linked to existing memories through an LLM-driven evolution step, and re-injected into the system prompt on every turn so the model can recall prior conversations. This plugin follows the canonical DSH plugin model used by every community plugin in the DSH ecosystem (same package layout as @linxin666/dsh-tool-describe-image , same installation via dsh plugin --profile web add ). Architecture Pipeline (faithful to the A-MEM paper, §3): 1. Analyze content — LLM extracts keywords[] , a one-sentence context , and broad tags[] . Falls back to a TF heuristic if the LLM produces nothing usable. 2. Retrieve neighbors — BM25 (k₁=1.5, b=0.75) over the corpus of note documents, α-blended with a TF-IDF semantic score. Returns the top-k notes. 3. Decide evolution — LLM picks one of NO EVOLUTION STRENGTHEN UPDATE NEIGHBOR STRENGTHEN A…

View full README on GitHub →
Agentsdeepseekdeepseek-harnessdshdsh-plugindsh-pluginsagent

Category