dsh-hindsight
Agent 与会话 活跃维护

dsh-hindsight

Ryu6Zero/dsh-hindsight

自包含跨会话记忆插件,依托Hindsight实现会话记忆的持久化存储,内置/hindsight交互指令与回忆、记忆、状态查询、列表、遗忘类Agent工具,轻量易集成。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
101 KB
仓库大小
26 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Ryu6Zero/dsh-hindsight
git clone https://github.com/Ryu6Zero/dsh-hindsight.git
git clone git@github.com:Ryu6Zero/dsh-hindsight.git
README.md main

dsh-hindsight

Official-grade DeepSeek Harness memory plugin backed by Hindsight.

Give your DSH agent real cross-session memory: recall past decisions, remember new facts, inspect memory health — through a self-contained Cordis plugin. No dsh-mnemon, no orchestrator, no bundled storage engine. Just a thin HTTP client over the Hindsight REST API your server already exposes.

Why

DSH agents are stateless by default — every session starts empty. Existing memory tooling (e.g. dsh-mnemon) is a heavyweight three-tier orchestration bundle. If you already run Hindsight (a high-quality vector memory engine with entity resolution + knowledge graph + multi-strategy retrieval), this plugin connects DSH to it directly, in a single installable package.

Confirmed working end-to-end: a live DSH agent calling hindsight_recall retrieved real memories from a Hindsight bank in a headless profile.

Features

  • /hindsight slash commandstatus / recall <query> / list [query] / remember <content> / forget <ID>
  • 5 model toolshindsight_status, hindsight_recall, hindsight_list, hindsight_remember, hindsight_forget (callable by the agent in the next step)
  • Live settingsendpoint / token / bankId / timeouts, applied without restart
  • Standalone clientHindsightClient is a dependency-free HTTP layer (health, recall, list, listBanks, stats, remember, forget), reusable outside the plugin

Install

Requires Node ≥ 20 and DeepSeek Harness ≥ 0.1.1-rc.2.

Add to the Web profile (full UI) and the Headless profile (CLI tasks) — they mount the same tools:

# npm registry (once published)
dsh plugin --profile web add dsh-hindsight
dsh plugin --profile headless add dsh-hindsight

# or a local development checkout
dsh plugin --profile web add "link:/absolute/path/to/dsh-hindsight"
dsh plugin --profile headless add "link:/absolute/path/to/dsh-hindsight"

Then start/restart the profile:

dsh --profile web

Configure

The default points at http://localhost:8888, bank hermes. Override per profile or globally via user settings (never edit the bundle patch): the DSH settings surface shows a hindsight namespace with:

Field Default Meaning
endpoint http://localhost:8888 Hindsight server base URL
token '' Bearer token for remote servers; leave empty for local open servers
bankId hermes Memory bank id
defaultRecallLimit 10 Max results per recall
requestTimeoutMs 15000 Data-plane request timeout
healthTimeoutMs 5000 Health probe timeout

Environment/user settings take precedence over the bundle defaults. Tokens are kept out of checked-in config.

Usage

/hindsight status                 # bank stats, memory/link/doc counts
/hindsight recall 记忆架构决策     # semantic recall, shows text + ID
/hindsight list                   # recent memories
/hindsight remember 记住X          # queue content for async extraction
/hindsight forget <ID>            # soft-delete (invalidate) one memory

The agent can do all of the above on its own in a conversation via the model tools — just ask it to "check memory" or "remember that...".

Build & test

pnpm install
pnpm build        # tsdown: lib/index.js + index.d.ts + sourcemap
node scripts/test-client.mjs   # real integration tests against a running Hindsight

scripts/test-client.mjs hits real Hindsight endpoints (health/stats/listBanks/recall/list/remember/forget). Remember→recall visibility has a totally valid caveat: Hindsight extracts asynchronously through its own LLM/consolidation queue, so a freshly remembered fact may take longer than the test window to appear in recall — that's an environmental dependency of Hindsight itself, not the plugin.

Scope

This is a lightweight standalone plugin, deliberately not a dsh-mnemon replacement:

  • ✅ In scope: Hindsight REST client + slash commands + model tools + live settings.
  • ❌ Out of scope: WebUI workbench, multi-provider orchestration, bundled storage, client/browser bundle, extraction/distillation sub-agents.

License

MIT. See LICENSE.