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:aqsk-BLG/dsh-memory
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
An installable DSH profile bundle for WorkBuddy-style layered memory: global persona and memory files, live explicitly bound workspace memory, skip-aware reminders and background consolidation, hybrid session recall, post-compaction flush, and a bundled usage skill. This repository is the standalone Git distribution of the implementation developed in DeepSeek Harness.
The expected user already runs an official DeepSeek Harness source checkout and may already have chats, model/provider settings, workspaces, and a web profile. Stop the running DSH process, then run the install from that same checkout root and from an environment with the same DSH_HOME used to start DSH:
pnpm dsh plugin --profile web add github:aqsk-BLG/dsh-memory#v1.0.2
pnpm dsh --profile web --dump-config
pnpm dsh web
Use github:aqsk-BLG/dsh-memory to follow the repository head, or replace the v1.0.2 tag with an exact commit SHA for the strongest reproducibility. A globally installed CLI may use dsh ... instead of pnpm dsh ....
dsh plugin updates only the existing profile's dependency metadata, lockfile, installed modules, and dsh.profile.bundles list. It does not modify the DSH source tree, create another agent or workspace, or reset existing sessions, models, settings, storage, or workspace registrations. The bundle also leaves dshHome unset, so the plugin uses the exact same single data root as the DSH instance: inherited $DSH_HOME, or DSH's own ~/.dsh default only when that variable is unset. It never opens both roots.
The bundle inserts the memory row and enables the session-query index at $DSH_HOME/session-query.sqlite; later profile and home patches may override either row. The repository commits its built lib/index.js, so installation does not need a dependency lifecycle build. Remove both the dependency and layer, then restart DSH, with:
pnpm dsh plugin --profile web remove dsh-memory
The public repository is discoverable through GitHub's dsh-plugin topic.
Mounting the bundle composes five bundled capabilities and the guide:
$DSH_HOME/IDENTITY.md and $DSH_HOME/SOUL.md snapshots, logged as persona/bootstrap.USER.md and MEMORY.md, live project MEMORY.md, and a lightweight every-turn reminder that skips greetings, simple lookups, and short Q&A.memory runtime skill — explains file roles, what to record and skip, append-only daily logs, semantic recall, and the 30-day distillation rule. A project or preset may override it with a same-named skill.The standalone build compiles all five capabilities into one lib/index.js and leaves only DSH host packages as runtime peers. Persona files remain a separate identity concern internally even though the facade installs them together with memory.
Project memory exists only when the session is explicitly attached to a registered workspace. At every prompt assembly, the bootstrap resolves the current session id through ctx.workspaceRegistry.list() and emits a live MEMORY SCOPE containing the exact project-memory directory and bounded .dsh/memory/MEMORY.md content. Dated .dsh/memory/YYYY-MM-DD.md logs remain on-demand.
A session with no matching membership — including the Web UI's Ungrouped group — receives global memory and session recall only. The plugin never infers ownership from cwd, never scans all workspaces, never auto-registers the source checkout, and never deletes project memory when a workspace registration is removed.
| Key | Default | Meaning |
|---|---|---|
dshHome |
unset | Advanced explicit override only. Normally omit it so the plugin uses the same root already selected by DSH: $DSH_HOME, otherwise DSH's default ~/.dsh |
memoryBudgetChars |
4000 |
Code-point budget for global MEMORY.md |
userBudgetChars |
1500 |
Code-point budget for global USER.md |
projectMemoryBudgetChars |
3000 |
Code-point budget for live project MEMORY.md |
reminderEnabled |
true |
Include the skip-aware every-turn memory reminder |
memorySectionOrder |
5 |
Frozen global-memory prompt order |
identityBudgetChars |
4000 |
Code-point budget for IDENTITY.md |
soulBudgetChars |
4000 |
Code-point budget for SOUL.md |
seedMissingPersonaFiles |
true |
Seed conservative persona defaults when absent |
personaSectionOrder |
-50 |
Persona-file prompt order before deployment persona |
maxHits |
20 |
Maximum sessions one session_search call may return |
semanticEnabled |
true |
Use semantic ranking when a model route is available |
semanticProvider |
"" |
Optional dedicated semantic provider, paired with semanticModel |
semanticModel |
"" |
Optional dedicated semantic model, paired with semanticProvider |
semanticBatchSize |
30 |
Candidates per semantic-ranking request |
semanticCandidateChars |
2000 |
Code-point budget retained from each past session |
semanticMaxTokens |
2048 |
Output-token cap for each ranking request |
semanticReadConcurrency |
4 |
Concurrent past-session surface reads |
semanticFallbackEnabled |
true |
Use and label full-text fallback when semantics cannot run |
flushEnabled |
true |
Queue the reminder after successful compaction |
consolidationEnabled |
true |
Run skip-aware reviews after eligible completed turns |
consolidationMode |
automatic |
Write controlled regions or log proposal candidates only |
consolidationEveryEligibleTurns |
1 |
Eligible completed tasks per ordinary review batch; raise above one only to opt into batching |
consolidationMinUserChars |
12 |
Minimum human code points for a non-tool turn |
consolidationMinAssistantChars |
24 |
Minimum assistant code points for a non-tool turn |
consolidationMaxTurnsPerReview |
20 |
Maximum eligible turns in one review |
consolidationTranscriptBudgetChars |
12000 |
Bounded review transcript text |
consolidationDailyBudgetChars |
1200 |
Daily append budget per review |
consolidationMaxTokens |
unset | Advanced route override only; normally omit it so the selected model adapter supplies its native output limit |
consolidationReasoningEffort |
unset | Normally inherit the live session's effort on the same route, or the dedicated route's adapter default |
consolidationTimeoutMs |
180000 |
End-to-end background-review deadline in milliseconds |
consolidationMaxDeletionRatio |
0.5 |
Larger automatic managed-list deletions become proposals; a full clear is always protected unless explicitly requested |
consolidationRetryBaseDelayMs |
60000 |
Initial transient-failure retry delay |
consolidationRetryMaxDelayMs |
3600000 |
Maximum transient-failure retry delay |
consolidationProvider |
"" |
Optional dedicated review provider, paired with consolidationModel |
consolidationModel |
"" |
Optional dedicated review model, paired with consolidationProvider |
For a raw Cordis composition rather than a profile bundle:
- name: dsh-memory
config:
reminderEnabled: true
semanticEnabled: true
flushEnabled: true
consolidationEnabled: true
A function/namespace plugin: it exports name / inject / Config / apply and no default.
Every session receives frozen persona and global-memory sections. Each request also receives a live MEMORY SCOPE: either one exact workspace plus its curated MEMORY.md, or an explicit statement that project memory is unavailable. The compact reminder distinguishes substantive project work from greetings and short Q&A. After an eligible turn, a separate tools-free reviewer receives bounded transcript and file evidence; its output never enters the conversation. session_search exposes evidence and its actual ranking mode, while the complete file policy is available on demand as the memory skill.
Persona and global snapshots spend bounded prompt tokens on every request. The live scope adds a bounded project snapshot and short reminder only where authorized. Daily logs and the full skill cost tokens only when read. Semantic recall makes separate bounded model calls only when the tool is invoked. Background consolidation makes one auxiliary call after each eligible completed task becomes idle by default; greetings and short Q&A are filtered first. The reviewer keeps the selected route's reasoning capability and returns only incremental add/exact-remove patches plus new daily notes. The plugin imposes no fixed output-token cap by default: the model adapter's native route limit remains the transport boundary, while the final USER.md, global/project MEMORY.md, and daily append character budgets are the write authority. A visible-JSON circuit breaker is calculated from those same file budgets and does not count hidden reasoning. Each successful batch schedules the next pending batch while the agent remains idle, so old tasks are drained without being packed into one oversized request. Operators who prefer fewer calls can raise consolidationEveryEligibleTurns, while explicit remember and forget requests still bypass batching.
Persona and global sections are frozen per session and prefix-stable. Workspace membership, curated project memory, and reminders travel in the dynamic runtime-context channel. Tool calls and loaded skill content append after the reusable prefix.
@deepseek-ai/* peer packages.^22.19.0 || >=24.This package is a standalone distribution of packages/memory/* and packages/identity/persona-files from DeepSeek Harness, licensed under MIT. See THIRD_PARTY_NOTICES.md.
IDENTITY.md, SOUL.md, USER.md, or global MEMORY.md enter existing model context only in a new session.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent-memory、memory。