Evidence snapshot reviewed Sep 16, 2026GitHub checked Aug 21, 2026
Evidence-verifiedPlugin BundleMemory & ContextDeepseek Harness Profile

dsh-memory

Persistent, searchable per-project memory and enforced rules for DeepSeek Harness.

At a glance

What it does

Persistent, searchable per-project memory and enforced rules for DeepSeek Harness.

Use cases
Memory & ContextMemoryContextSearch
Works with
Deepseek HarnessDuckdbOpenai Compatible Embeddings
Compatibility

Deepseek Harness Profile
Not declared in supplied evidence

Trust & status

Evidence-verified
Checked Sep 15, 2026, 2:22 PM UTC

Code-evidenced contributions

What it adds to DSH

Model ToolsProject memory tools

Adds tools to search, store, recall, and manage project memories and binding rules.

Mechanism evidence
Web UIMemory tab

Adds a project-session Memory tab for browsing, searching, editing, archiving, deleting, and auditing memories and rules.

Mechanism evidence

Before you choose it

dsh-memory keeps decisions, rules, session summaries, and project context in a DuckDB file at .dsh/memory.db. It adds memory tools and a Web Client Memory tab; stored rules are injected into each model request by default, while session context is added at session start.

Best for

DeepSeek Harness users who want an agent to retain project-specific decisions and operating rules across sessions.

Common tasks

  • Keep architecture decisions, sprint goals, and session summaries available in later sessions.
  • Create mandatory or forbidden project rules that remain in the system-prompt rule block.
  • Search, edit, archive, or audit project memories from the Memory tab.
  • Optionally add semantic retrieval through an OpenAI-compatible embeddings endpoint.

Permissions and data

Uses local project storage and can optionally contact a configured embeddings service.

Permissions
  • Reads and writes the per-project DuckDB database at .dsh/memory.db.
  • Adds memory-management tools and a Web Client Memory surface.
  • Injects stored rules into model requests when injectRules is enabled.
Data handling
  • Project memories, rules, session context, and provenance are stored in the local DuckDB file.
  • The database may be committed to share rules or ignored to keep memory local.
External services
  • Optional semantic recall supports endpoints compatible with OpenAI /v1/embeddings, including hosted, local, or Ollama endpoints.
Credentials
  • Optional embeddings use an environment-variable name such as OPENAI_API_KEY; the README says the key is referenced rather than stored.

Limitations

  • Without an enabled embeddings provider, retrieval remains keyword-only.
  • The default bundle enables the core toolset; agent-driven listing, editing, archiving, and provenance require the full toolset.
  • DuckDB permits a single writer; close the running harness before opening the database read-write elsewhere.
  • Harness version compatibility and successful runtime installation were not established by the supplied evidence.

What DSHub checked

  • Pinned Git source, bundle patch structure, package identity, and MIT license were verified.
  • The manifest declares Node.js ^22.19 or >=24 and DeepSeek Harness peer dependencies.

What DSHub did not check

  • Installation, tests, runtime behavior, and Web Client behavior were not executed.
  • npm registry package contents were not audited.

Pinned install

Install dsh-memory

This plugin bundle does not have a DSH Plugin install action. Use its source documentation for the delivery method.

Visit the source project

Maintainer source

Project README

View at commit 48420be
Maintainer-authored contentCaptured from README.md on Sep 15, 2026. The text and repository-relative media are fixed to commit 48420be11215 with content hash 17a725ab02ab; provider-hosted badges may update independently. README commands are upstream documentation; the DSHub copy action above is the verified, version-pinned install.

@achasoft/dsh-memory

Persistent, searchable, per-project memory for the DeepSeek Harness.

An agent forgets everything between sessions. You re-explain the same decisions, the same conventions get missed, and the context you built up disappears the moment the window fills. This plugin gives each project its own memory — decisions, rules, architecture notes, and sprint goals — stored in a DuckDB file inside the project, retrieved by keyword and by meaning, and injected into every model request so a rule cannot be compacted away.

It is the Claude Memory MCP idea rebuilt as a first-class harness plugin: no daemon, no separate server, no second process owning your data.


What you get

  • Per-project memory. One DuckDB file at <project>/.dsh/memory.db. Two workspaces open in one client never share a rule set, and nothing follows you to another checkout.
  • Rules that actually bind. Mandatory and forbidden rules are a system-prompt section, re-read at every prompt assembly — so they survive context compaction, and an edit in the UI binds the very next request without restarting anything.
  • Hybrid search. BM25F over title, entities, tags, summary, and body, blended with recency and how often a memory has proved useful. Add an embeddings endpoint and vector similarity joins the ranking; without one everything still works, keyword-only.
  • A management UI. A Memory tab beside Chat in every project session — browse, search, add, edit, archive, and delete memories and rules, read each one's audit trail, and see the exact text the model is being given. The tab is a view of the session's own project, so it is always the memory the conversation beside it is bound by.
  • Model-facing tools. memory_search, memory_store, memory_recall, memory_rules, memory_add_rule, memory_session_end by default; listing, editing, archiving, and provenance when you opt into the full set.
  • Session continuity. Each session opens with the last session's summary, the current sprint goals, and recent decisions, and is reminded to file a summary before it ends.
  • Retention. A sprint note is not a decision. Each category carries a lifetime, priority extends it, and rules never expire.
  • Queryable by hand. duckdb .dsh/memory.db "select * from rules" is a supported way to use this, not a debugging trick.
  • Import and export. Turn an existing CLAUDE.md or AGENTS.md into structured rules, or export everything as JSON to commit and share.

Install

dsh plugin --profile <name> add @achasoft/dsh-memory

Then add it to your profile's dsh.profile.bundles. The plugin composes itself: the capability, the tools, and the browser surface all mount from its own cordis.patch.yml.

How it works

your project/
  .dsh/memory.db            ← DuckDB: memories, rules, sessions, provenance

agent session starts  ──►  open the project's memory
                           register a rules section in THAT agent's scope
                           inject the last summary, sprint goals, decisions

every model request   ──►  the section re-reads the rule block  ← survives compaction

the agent works       ──►  memory_search / memory_store / memory_add_rule

session ends          ──►  memory_session_end files the summary

Rules go through the system prompt, not a per-turn message: the prompt is reassembled before every request, so the rules are always present and always current. Session context — history rather than obligation — is injected once at session start instead, so you do not pay for it on every turn.

Configuration

Every field is a validated setting, changeable from your profile's cordis.patch.yml or from Settings → Plugins → Memory in the Web Client.

Setting Default What it does
databasePath .dsh/memory.db Relative to each project's directory.
injectRules true Put the rule block in every model request. Off keeps rules stored but unenforced.
injectSessionContext true Seed a starting session with the last summary, sprint goals, and recent decisions.
autoSession true Open and close a memory session alongside each agent session.
remind once When to remind the model to file a summary: never, once, every-turn.
vectorWeight 0.6 The semantic signal's share of a blended ranking. Ignored without embeddings.
minSimilarity 0.05 Similarity floor for a search that does not name one.
searchLimit 10 Hits returned when the caller does not say.
candidateLimit 1000 Rows either search probe considers.
embedBatch 64 Memories embedded per background pass.
toolset core core or full — see below.
retentionDays per category Days per category; 0 means never. Rules never expire regardless.

Semantic recall (optional)

Enable the embeddings row and point it at any endpoint speaking OpenAI's /v1/embeddings — a hosted API, a local inference server, or Ollama:

- id: memory-embeddings-openai
  disabled: false
  config:
    baseUrl: https://api.openai.com/v1
    model: text-embedding-3-small
    apiKeyEnv: OPENAI_API_KEY
    timeoutMs: 30000
    batchSize: 64

The key is addressed by reference, never stored: apiKeyEnv names an environment variable resolved through the harness credential seam at the start of every call.

Memories are embedded in the background and vectors are stored as DuckDB FLOAT[]. Changing model strands the old vectors — they are excluded from comparison rather than compared — and Rebuild vectors in the UI re-embeds everything.

Tools

toolset: core registers six:

Tool For
memory_search Find what the project already knows, by meaning and by keyword.
memory_store Record a decision, architecture note, devops fact, sprint goal, or feedback.
memory_recall Read one memory in full, by id or exact title.
memory_rules Read the complete binding rule set.
memory_add_rule State something the agent must always or must never do.
memory_session_end File the summary the next session opens with.

toolset: full adds memory_list, memory_update, memory_archive, and memory_provenance for deployments where the agent, rather than a person, curates the memory.

The database

Two views exist for reading the file by hand:

duckdb .dsh/memory.db "select kind, title, content from rules"
duckdb .dsh/memory.db "select category, title, updated, expires from memory"

DuckDB allows a single writer, so the running harness owns the file; close it before opening the database read-write elsewhere.

.dsh/memory.db is a normal file — commit it to share a team's rules, or add it to .gitignore to keep memory local.

Categories

decision · architecture · devops · sprint · project_plan · developer_docs · feedback · reference · session · mandatory_rules · forbidden_rules

Category decides retention and whether an entry is enforced. Rules are enforced verbatim and completely — never ranked, never truncated.

Development

pnpm install
pnpm run typecheck
pnpm test          # checks the RPC artifact, then runs the suite
pnpm run build     # emits generated/, then tsc → tsdown (node + browser halves)

generated/ is the Typert RPC contract, emitted by scripts/build-typert.mjs from the endpoint table in scripts/typert-endpoints.mjs. pnpm test fails if it drifts from src/host/, and tests/typert.spec.ts runs the emitted manifest through the harness's own validator.

License

MIT

Operate deliberately

Install and manage

Prerequisites and target Profile

Target Deepseek Harness Profile

Delivery Dsh Bundle Git — navid-kianfar/dsh-memory#48420be11215c1e29e1012de4baa65da247baab8

Verify, update, and remove

Show lifecycle commands
Verify
dsh plugin --profile deepseek-harness list

Compatibility and access

DeepSeek Harness bundle; requires Node.js ^22.19 or >=24 Not declared in supplied evidence

Review compatibility evidence

Risk facts

Local Data Storage

Stores project memory in .dsh/memory.db

Evidence
Model Context Injection

Injects stored rules into every model request by default

Evidence
External Credentials

Optional embeddings can call an OpenAI-compatible endpoint using an environment-variable credential reference

Evidence
Evidence and editorial reviewManifest, Bundle patch, distribution and freshness

Immutable evidence

Review status and source activity

AI reviewed

Use the pinned Git bundle source for review. Treat enforced rules as model-visible project content.

AI reviewed Sep 15, 2026, 2:23 PM UTCGitHub facts last checked Sep 15, 2026, 2:23 PM UTC

No material source change has been recorded since this evidence baseline.

Next step

Follow the Plugin installation workflow

Subscribe to material changes for dsh-memory