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:WeilaiSun/dsh-hindsight-memory
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Semantic long-term memory for DeepSeek Harness — native hindsight_retain / hindsight_recall / hindsight_reflect tools over a local Hindsight daemon (PostgreSQL + pgvector + DeepSeek embeddings), with optional auto-recall injection before each agent step.
Everything is a plugin — this is a Cordis plugin that installs with dsh plugin add.
DeepSeek Harness's built-in memory is session-scoped (per-session event logs + AGENTS.md instructions). This plugin adds cross-session semantic memory: high-value facts, user preferences, and lessons learned are embedded into a vector store and retrieved by meaning, not keywords — like Hermes's Hindsight integration.
hindsight_retain — write a memory; Hindsight automatically extracts facts, resolves entities, generates the embedding, deduplicates similar facts, and links temporally/semantically.hindsight_recall — semantic search (embedding similarity + knowledge-graph spreading activation). The query does not need to match keywords.hindsight_reflect — LLM synthesis over recalled facts / mental models / directives for a distilled answer.autoRecall — when enabled, the plugin hooks agent/pre-step and injects relevant memories as a <system-reminder> user message before each step, so the model never starts a task cold.deepseek): independent daemon port, independent PostgreSQL instance, independent bank. It never reads or writes another profile's data.hindsight_embed in a venv.The defaults expect the standard Hermes layout (F:\Hermes\HERMES_HOME\...); override with config if your install lives elsewhere.
From GitHub (works today):
dsh plugin --profile web add git+https://github.com/WeilaiSun/dsh-hindsight-memory.git
From npm (once published):
dsh plugin --profile web add dsh-hindsight-memory
Then add the row to your agent preset or profile patch (cordis.patch.yml):
- id: hindsight-memory
name: 'dsh-hindsight-memory'
config:
autoRecall: true
A new session picks it up (agent presets are fixed per session at creation).
| Key | Default | Description |
|---|---|---|
venvPython |
F:\Hermes\HERMES_HOME\hermes-agent\venv\Scripts\python.exe |
Python with hindsight_embed installed |
configJson |
F:\Hermes\HERMES_HOME\hindsight\config.json |
JSON with llm_api_key / llm_base_url / llm_model (source of the DeepSeek key; never hardcoded) |
llmBaseUrl / llmModel / llmProvider |
DeepSeek defaults | Embedding endpoint; deepseek/openai_compatible/openrouter map to openai |
profile |
deepseek |
Hindsight profile name (own daemon port + PG instance + bank) |
bank |
= profile |
Bank id used by retain/recall/reflect |
autoRecall |
false |
Inject relevant memories before each agent step |
recallTypes |
["observation","experience","world"] |
Fact types searched |
recallLimit |
4 |
Max memories per recall |
recallMinUserChars |
20 |
Min user-message length before auto-recall triggers |
recallBudgetTokens |
1200 |
Token budget for auto-recall injection |
The model calls the tools directly. Example retention policy (mirrors a self-evolution protocol):
# agent preset row with auto-recall enabled
- id: hindsight-memory
name: 'dsh-hindsight-memory'
config:
autoRecall: true
recallLimit: 5
agent step (autoRecall) / model tool call
│
▼
plugin (node) ──ensure daemon──▶ hindsight_embed (Python) ──spawn──▶ Hindsight daemon (REST)
│ │
└────────── fetch ──▶ /v1/default/banks/{bank}/memories[/recall|/reflect]
│
PostgreSQL + pgvector + DeepSeek embeddings
The daemon auto-starts on first use and idle-stops (default 10 min). The plugin caches the daemon URL and re-ensures on failure.
git clone <this-repo>
cd dsh-hindsight-memory
node --check lib/index.js # syntax
node smoke-test.mjs # end-to-end: fake ctx + real daemon
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: memory、semantic-search、vector-database。