OpenViking
volcengine
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Culeot/dsh-agent-memory
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Cross-session long-term memory plugin for DeepSeek Harness (DSH).

Remembers facts, preferences, decisions, and lessons across sessions, so a new session starts with what earlier sessions already learned. Storage lives in $DSH_HOME/storages/memory.json (plain JSON — inspectable, git-friendly). No MCP servers, no vector database, no embedding API, no extra runtime dependencies.
injectMinScore), and injects up to injectCount that pass the threshold. Low-relevance memories are discarded — you only pay for what actually matters.lessonizeAfter, default 2), the plugin nudges the agent to write it as an importance-3 lesson; the lesson then auto-injects on related topics, preventing recurrence. User corrections are covered by the memory protocol (write the lesson right away).reasons (substring/tag/bigram/BM25/importance/recency/access signal breakdown), so both you and the agent can audit why a memory surfaced.ctx.storageDomain), tool registry, and agent lifecycle hooks, so it stays compatible with official releases.| Tool | Purpose |
|---|---|
memory_remember |
Store a durable memory (content, kind, tags, scope, importance, optional TTL). |
memory_recall |
Search memory by keywords; ranks by relevance, importance, recency, past usage. |
memory_index |
Browse the inventory with kind/tag/scope filters, paginated, title-level. |
memory_forget |
Delete by id or tags; importance-3 records need confirm: true. |
memory_import |
Import memories from a JSONL/JSON file through the write chain (not by editing the store file) — safe bulk loading. |
memory_reload |
Reopen the store from disk after an external edit; merges external changes without a restart. |
memory_sediment |
Batch-persist several memories at once (session wind-down), with an entry cap and cooldown guard. |
Kinds: fact | preference | decision | lesson | todo | note. Scopes: user (applies everywhere) or project (this project only).
The store file is loaded once at startup and written as a whole by the running process (single-writer model). To prevent an in-process write from silently wiping external edits:
memory_import is the supported way to bulk-load data (goes through the write chain, file and memory stay in sync);memory.json by hand or copy it in, call memory_reload to merge it back (or restart).Per-step injection skips when the recalled set is unchanged from the previous step, so consecutive messages about the same topic don't re-inject the same block — the「相关记忆」notice appears on topic change, not on every message.
# 1. Add the dependency to your profile
cd ~/.dsh/profiles/<name>
npm install dsh-agent-memory
# 1. add the dependency to your profile
cd ~/.dsh/profiles/<name>
pnpm add dsh-agent-memory@file:/path/to/dsh-agent-memory
# 2. add one row to your agent preset (~/.dsh/.agent-presets/<preset>/agent.cordis.yml)
- id: memory
name: 'dsh-agent-memory'
# 3. restart DSH — the four tools appear in new sessions
No preset? Mount it on the host plane instead, in ~/.dsh/profiles/<name>/cordis.patch.yml:
- insert:
- id: memory
name: 'dsh-agent-memory'
Requires the storage trio already present in the profile (dsh-storage, dsh-storage-json, dsh-storage-domain — the web profile ships with it).
All options are optional:
| Option | Default | Meaning |
|---|---|---|
maxRecords |
400 | Capacity cap; lowest-value records evicted first. |
maxContentChars |
2000 | Max content length per record. |
injectEnabled |
true | Per-step injection of relevant memories (via agent/pre-step). |
injectCount |
3 | Max memories injected per step (0 disables). |
injectMinScore |
1.0 | Minimum relevance score to inject (0 = no threshold, just rank). |
injectMaxChars |
120 | Max chars per injected memory summary. |
lessonizeEnabled |
true | Auto-nudge to solidify repeated errors as lessons. |
lessonizeAfter |
2 | Same error fingerprint occurrences before nudging. |
recencyHalfLifeDays |
90 | Freshness half-life. |
mergeSimilarity |
0.7 | Near-duplicate merge threshold. |
protocolSection |
true | Inject the memory protocol prompt section. |
pnpm remove dsh-agent-memory in the profile, delete the preset/patch row. Data stays in memory.json and is restored on reinstall.memory.json: it is plain JSON — fix it by hand or delete it (deleting resets memory).npm install && npm run build && npm test # build + 31 unit tests
npm run smoke # real-machine headless round-trip check
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: memory。