quqxui/dsh-memgas
dsh-memgas
Long-term memory plugin for DeepSeek Harness (dsh): four-channel retrieval fusion and continuous memory evolution. Memory construction and retrieval are based on MemGAS (ICLR 2026).
Install
npx @deepseek-ai/dsh plugin --profile web add dsh-memgasRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/dsh-memgas)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from quqxui/dsh-memgas, cleaned of badges and images.
dsh-memgas
English | 简体中文
Long-term memory for DeepSeek Harness (dsh). Your agent remembers this project's conventions, decisions and pitfalls across sessions, and keeps that memory organized as you work.
Retrieval builds on the multi-granularity association and adaptive selection method from the ICLR 2026 paper From Single to Multi-Granularity: Toward Long-Term Memory Association and Selection of Conversational Agents (MemGAS).
Install
dsh plugin --profile web add dsh-memgas # from npm
dsh plugin --profile web add github:quqxui/dsh-memgas # or straight from GitHub
Both are equivalent. The repository ships a prebuilt single-file artifact, so a GitHub install needs no build step, no pnpm build authorization and pulls no runtime dependencies — the plugin uses nothing but Node built-ins.
Restart dsh and it is active. The package ships its own bundle patch, so there is nothing to wire up by hand. Zero configuration by default: no API key, no model download, no extra process.
What it does
Open a fresh session and the agent already knows. Verbatim output from two separate dsh processes (0.1.2-rc.1), translated from the Chinese original:
$ dsh --profile headless "Use memory_save to remember: this project deploys on port 8080,
and dependencies are managed with pnpm."
Saved to memory:
1. **Environment**: the project's deployment port is 8080.
2. **Convention**: dependencies are managed with pnpm (not npm/yarn).
# ——— process exits; a brand new session, no shared context ———
$ dsh --profile headless "What port does this project deploy on? What manages dependencies?
Answer directly."
From long-term memory:
- **Deployment port**: 8080
- **Dependency management**: pnpm
The second session called no tools and was never told to consult memory. The relevant entries were in its context before the model request went out.
This example asks for the save explicitly. In practice you do not have to: after each turn the plugin distils what is worth keeping into facts, summaries and keywords in the background.
Retrieval
Most memory plugins retrieve through one channel: vector similarity, or full-text match. dsh-memgas runs four in parallel and fuses them by rank:
| Channel | What it is | Good at | Can be disabled |
|---|---|---|---|
| Lexical | SQLite FTS5, identifiers kept intact | Paths, package names, error codes, exact wording | No |
| Dense | Vector similarity | The same question asked differently | No |
| Granularity | Session / turn / summary / keyword retrieved separately, weighted by an entropy router | Deciding whether a whole session or one turn is the right unit | Yes |
| Graph | Personalized PageRank over the association graph, seeded by the baseline hits | Multi-hop links across sessions | Yes |
Fusion is Reciprocal Rank Fusion: rank-based, never score-based. Channel scores are not comparable (BM25 against cosine against PageRank mass), so a channel whose scores are miscalibrated can still only contribute through its ordering.
Baseline floor. At least half the final slots are reserved for the lexical and dense channels. The enhancement channels can add and reorder, never evict. The worst case equals plain retrieval.
…
