DeepSeek Harness Plugin · 记忆宫殿

Local-first long-term memory.
For your coding agent.

Cross-session long-term memory on plain local SQLite. No external service, no API key, no Docker — one command and it works. Hybrid FTS5 + local-vector retrieval, an evidence gate, full provenance audit, and SM-2 spaced repetition, behind 23 narrow-parameter tools and a zh / en / ru panel.

dsh plugin --profile web add @kenz1117/dsh-engram
View on GitHub npm DSH plugin store 中文 README

Why this one

Most memory plugins want you to stand up infrastructure first. Three mainstream shapes, side by side.

dsh-engramServer-based
(Postgres / pgvector / Milvus / Python service)
File-based
(plain Markdown memory)
SetupOne npm command, works immediatelyDocker + database + vector store + migrationsOne npm command
External depsNone — offline embeddings, degrades to keyword-onlyRequired, usually plus an LLM API keyNone
Agent tools23 — save, search, facts, timelines, audit, export, distill, beliefs, reviewUsually 1–3 (search only)Usually 0–1
Evidence gateYes — enforced in code, three conditions requiredGenerally noneGenerally none
AuditSession/turn/seq provenance, supersede chains, contradiction edges, full op_logUsually logs onlyNone
Spaced repetitionSM-2 — cues only, never the bodyNoneNone
Injection safetyProtocol tags, redaction on write, capture placeholdersNoneNone
PortabilityMarkdown / JSON export + Obsidian / Logseq mirrorVariesIt is already files

How a memory flows

Capture, retrieval, adjudication, consolidation — all local, all auditable.

session log --+ +--> capture / save --> four dispositions: accept · merge · defer · drop agent call+ | SQLite dual store: user.db (follows you) + project-<hash>.db (follows the repo) | +----------------------+----------------------+----------------------+ v v v FTS5 keyword lane local vector lane (RRF) one-hop relation edges +----------------------+----------------------+----------------------+ v engram_search --> hits carry id= / ref= and a batch id v engram_assess (evidence gate): not enough -> keep searching v profile injection <-- beliefs · facts · entities <-- distill · decay · SM-2

What you get

Six things no other memory plugin in the store does at once.

Evidence gate

Search hits only mean “relevant”, not “enough to answer”. engram_assess is enforced in code: the claim, a valid ref from the same batch, and nextStrategy=answer must all hold.

Spaced repetition

engram_review_queue hands out coordinates and placard cues but never the body — recall first, reveal later, then self-grade to drive the SM-2 schedule.

Full provenance

Every memory records its source session, turn and event seq. Supersede chains, contradiction edges and a complete op_log are queryable.

Two scopes

user.db follows you; project-<hash>.db follows the repository. Preferences travel with the person, conventions travel with the repo.

Injection-safe

Protocol tags on every recall, redaction of keys and PII before write, and capture placeholders that break the self-reinforcement echo loop.

Portable

Export Markdown or JSON, with a redacted view safe to share — or mirror to an Obsidian / Logseq friendly directory of linked notes.

The panel

Nine views in the sidebar: today, library, corridor, spiral, episodes, entities, beliefs, log, ops.

Today view: KPI hero, activity heatmap, room directory

Today — KPI hero, six-month activity heatmap, room directory, refurb list.

Refurb list: full-width, complete texts, in-place actions

Refurb — every suggestion shows its full reasoning and the complete memory text, read and acted on in place.

Library view: filters, sorting, inline details

Library — the whole store: filter by room, state and content; sort by time or by tour route.