Long-term, cross-session memory for DeepSeek Harness
projects · preferences · decisions — still there after you close the window
> **Mneme** (Μνήμη) is the name of **Mnemosyne**, the goddess of memory — and of dreams. The name means the same thing here: remember by day, tidy up at night. `autoDream` does that while you are idle: hot memories stay hot, stale ones compress into summaries, old ones archive.
## What it is for
Every new chat, the AI meets you for the first time. You explain the project again, restate your preferences, and re-argue a decision that was already settled.
**dsh-mneme** gives [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) memory that outlives a conversation: when a chat ends, what is worth keeping is distilled into your machine, and the relevant pieces surface on their own next time. The memories are not a pile of floats locked in a vector store — they live in a local SQLite file with a Markdown mirror beside it: open it, read it, edit it, and your edits are not overwritten.
The whole loop in one picture (labels in Chinese): [docs/memory-loop.svg](docs/memory-loop.svg).
## Install
```bash
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web
```
Two hard requirements — without them it will not install:
- **Node 24+** — the store uses `node:sqlite`; on Node 22 the database will not open.
- **DSH 0.1.x or 0.2.x** — both lines are in range, and CI is green on the 0.2 line.
> This repository is a **multi-package repo**: the installable plugin lives in `dsh-mneme/`, and the root `package.json` is only a repo shell (`private`, no `dsh` field). Git and tarball specs must point at the subdirectory, or you install the shell itself. All four install sources are in the [full docs](dsh-mneme/README.md) (Chinese).
Where it lands on your machine:
| Path | What it is |
|------|------------|
| `~/.mneme/memory` | The store itself: the SQLite original plus ten hand-editable Markdown mirrors (an existing library under `~/.dsh/memory` keeps being used; when both exist, size decides, so a stray empty library cannot take over) |
| `~/.mneme/{models,runtime}` | Local embedding model and runtime cache; delete it and it refetches (a legacy `~/.dsh/mneme` keeps being used, and that legacy path follows `DSH_HOME`) |
| `~/.dsh-mneme` | CLI / MCP connection settings (url and token) |
To remove it:
```bash
dsh plugin --profile web remove @modusensus/dsh-mneme
```
The plugin directory goes away, the memories stay (default `~/.mneme/memory`, or the legacy `~/.dsh/memory`) — check **every** memory directory you have ever used, including a custom `memoryDir` / `MNEME_MEMORY_DIR`, and delete them yourself if you want them gone. Both the new and the legacy path can hold a database at once: the resolver keeps both on disk, so deleting only the currently selected one leaves the other behind and it may be picked up again later. The three names are easy to mix up: [directories](dsh-mneme/docs/DIRECTORIES.md).
## What you get
- **Remembered automatically** — when a chat ends, the facts, preferences and decisions worth keeping are distilled; there is no "save to memory" step.
- **Injected on demand** — the relevant handful enters context next time, ranked by heat, recency and importance rather than simply by date.
- **Consolidated while idle** — `autoDream` merges duplicates, compresses what went stale, archives what expired. The store gets leaner, not fatter.
- **Conflicts are not decided for you** — when two memories disagree, both are frozen and shown side by side, and you pick which one stays.
- **Memories are files** — ten Markdown mirrors you can read, edit and export; hand-edited text wins when it is merged back.
- **A panel** — record, browse, filter, search, edit, delete, all in the settings page.
## Why you can trust it
- **Every memory carries its provenance** — which conversation it came from, when it changed, who touched it. Consolidation leaves a receipt too: input snapshot, decision detail, result hash, so the same run can be replayed.
- **Isolation and offline** — memories can be scoped per agent and workspace; point the embedder at a local model and semantic search runs fully offline, with no API key.
- **Delete the session ≠ delete the memory** — memories are cross-session knowledge; clearing a chat window leaves what was saved alone.
- **You can always take it over** — the store is a local SQLite file plus Markdown; no proprietary format holds your data.
How does it compare with Zep / Mem0 / Letta / Hindsight? An 11-row table — storage, retrieval, write-time extraction, offline consolidation, conflicts, forgetting, scoping, auditability, multi-host, offline, license: [capability comparison](docs/COMPARISON.md) (Chinese). **"—" does not mean "worse"**.
## The panel
One panel in the settings page: record, browse, filter, search, edit, delete — plus an entity graph and an audit view. Screenshots live in [docs/PANEL.md](docs/PANEL.md): when the panel changes, only that page needs updating.
## Elsewhere
| Way in | What you get |
|--------|--------------|
| **MCP** | A zero-dependency stdio server (standalone package `mneme-memory`); Claude Code / Cursor / Codex / OpenCode and any other MCP client can mount the six memory tools |
| **Standalone daemon** | `dsh-mneme-serve` keeps the store running: with DSH closed, scripts, web bridges and your own panels read and write the same memories |
| **External API** | An HTTP surface, so another plugin can write memories in through the API |
| **Melete** | [slow-stack/melete](https://github.com/slow-stack/melete): a fork of DeepSeek's official chat-demo wired to the same store — a local companion service injects `/context` before each turn and distills and writes back after it; chat source stays untouched |
| **Community adapters** | Such as [Mneme-Bridge](https://github.com/SternChiri/Mneme-Bridge), which brings the DeepSeek web chat into the same store |
## Privacy
- **Local only.** A SQLite store plus a hand-editable Markdown mirror; no mneme server sits in between.
- **Memories are files you can open.** Markdown, human readable and hand editable; your edits are kept when merged back.
- **No mneme API key required.** Consolidation and summaries go through the host model you already configured (`autoDream` / `autoSummarize`, on by default).
- **Fully offline consolidation** is possible: point the host at a local model, and clear `dreamProvider` / `dreamModel` and `summarizeProvider` / `summarizeModel` (if set, they bypass the host), or turn the two switches off.
- **No telemetry, no analytics, no remote logs.**
## Docs
| Looking for | Where |
|-------------|-------|
| Full reference: every setting, CLI, external API, architecture | [dsh-mneme/README.md](dsh-mneme/README.md) |
| Defaults and meaning of each config key | [docs/CONFIGURATION.md](dsh-mneme/docs/CONFIGURATION.md) |
| How it compares with other memory systems | [docs/COMPARISON.md](docs/COMPARISON.md) |
| What changed in each version | [CHANGELOG](dsh-mneme/CHANGELOG.md) · [Releases](https://github.com/slow-stack/mneme/releases) |
| Which of the three directories is which | [docs/DIRECTORIES.md](dsh-mneme/docs/DIRECTORIES.md) |
| Credits and related work | [full docs · credits](dsh-mneme/README.md#-致谢) (Chinese) |