@vectorize-io/hindsight-coding-agents
Hindsight:会学习的 Agent 长期记忆系统,自动召回/保存、知识页、深度反思与按仓库隔离的记忆银行。
安装
dsh plugin --profile web add @vectorize-io/hindsight-coding-agents
沙箱测试结果
| 阶段 | 结果 |
|---|---|
| 1 安装 | ✓ |
| 2 列装 | ✓ |
| 3 挂载 | — |
| 4 启动 | — |
四阶段在隔离沙箱里跑:安装(有网)→ 列装 → 挂载 → 启动(后三步断网)。
README
hindsight-coding-agents
Long-term project memory for coding agents, backed by Hindsight.
One package, several agents: a shared reflect-and-inject core with a thin entry point per agent
(Claude Code, Codex CLI, DeepAgents Dcode, opencode, opencode 2, Kilo CLI, Cursor CLI, GitHub Copilot CLI, Grok Build, Qwen Code, Kimi Code, Factory Droid, ZCode, TraeCode, Antigravity CLI, Devin CLI, Cline CLI, pi, Prime Agent, DeepSeek Harness, WorkBuddy, CodeBuddy). Ingestion is fully
automatic — there is no setup command: a repo's git history and conversations flow into its memory
bank in the background as you work.
The premise: most of a real fix is derivable from the code, but the _last mile_ often hinges on a
project-specific decision that isn't in the code at all — a rounding rule, a retry allowlist, a
tie-break policy. Those decisions live in git history and past conversations. This package puts them
in front of the agent at the moment it starts working, and keeps a curated set of knowledge pages
(architecture, conventions, in-flight initiatives) that future sessions start from.
<!-- figure: coding-agents -->
Does it work?
AMB's sdebench is the measurement: a coding
agent over 61 real repository tasks, three runs each, with and without memory.
Accuracy is not what moves — every run solves 60–61 of the 61 either way. These are tasks a good
agent can already do. What memory changes is how much it costs you to get there: how often you have
to stop and correct the agent, and what the tokens cost.
<!-- figure: coding-agents-benchmark -->
Agent · Corrections / task · Cost / task
Claude Code · 0.85 → 0.36 · $0.445 → $0.338
Codex CLI · 1.34 → 0.47 · $0.577 → $0.276
opencode · 1.20 → 0.80 · $0.634 → $0.553
No memory → with Hindsight, mean of 3 runs. Corrections reproduce the labels AMB prints on its own
chart; cost is derived from the same per-run table.
Both numbers move together, and that is the mechanism rather than a coincidence. A correction is a
round trip: the agent guesses a project-specific decision wrong, you stop it, you explain, it redoes
the work. Every one of those costs a turn of tokens and a turn of your attention. Handing the agent
the decision _before_ it starts — the rounding rule, the retry allowlist, the tie-break policy that
was settled in a commit message or a conversation months ago — removes the guess, and the round trip
with it.
Install
<!-- skill:begin title="Install / update" -->
npx @vectorize-io/hindsight-coding-agents install all # every detected agent, wired natively npx @vectorize-io/hindsight-coding-agents install claude-code # or just one npx @vectorize-io/hindsight-coding-agents uninstall all # removes exactly what install added npx @vectorize-io/hindsight-coding-agents update # refresh the runtime only, no rewiring npx @vectorize-io/hindsight-coding-agents stats # how often each agent uses Hindsight
install takes an explicit target — all, or one or more harness names. A bare
npx @vectorize-io/hindsight-coding-agents install changes nothing and prints the choice, so wiring every agent on
the machine is never something that happens by accident. **Updating is the same install
command again** — it re-copies the runtime in place.
Day to day you should not have to: once a day, a session start checks npm and re-stages a newer
runtime in the background (autoUpdate, on by default — set it to false to pin the version you
have). That is the update command above, which refreshes the copy every wired agent already
points at and deliberately touches no host config; re-run install yourself after a release that
adds a new hook, or to wire another agent.
<!-- skill:end -->
On a terminal it also asks where memory should live — Hindsight Cloud, a server you run, or a
local daemon on this machine (see [Where memory lives](#where-memory-lives)). Scripted installs pass
--server cloud|self-hosted|daemon instead; it is asked only once, and never again on re-install.
Per agent
Same command, only the harness name changes. Run after installing the package globally.
<img src="https://hindsight.vectorize.io/img/harness/claude-code.png" alt="" width="20" height="20" /> Claude Code
npx @vectorize-io/hindsight-coding-agents install claude-code
3 hooks in ~/.claude/settings.json, MCP via claude mcp add (user scope), and the companion skill.
<img src="https://hindsight.vectorize.io/img/harness/codex.svg" alt="" width="20" height="20" /> Codex CLI
npx @vectorize-io/hindsight-coding-agents install codex
3 hooks in ~/.codex/hooks.json plus [mcp_servers] in config.toml (needs codex_hooks = true).
<img src="https://hindsight.vectorize.io/img/harness/dcode.svg" alt="" width="20" height="20" /> DeepAgents Dcode
npx @vectorize-io/hindsight-coding-agents install dcode
The installer registers this package as a local marketplace with Dcode, then invokes Dcode's own
plugin install command. The package is a native Agent Plugin: its root plugin.json contributes the shared skill, the
Hooks V2 SessionStart, UserPromptSubmit, and Stop lifecycle, and the namespaced
hindsight_* MCP server. Enable the plugin through Dcode's normal plugin manager; no Dcode config
patcher or compatibility bridge is required.
Dcode namespaces a plugin's MCP tools, so they appear as
plugin__hindsight-coding-…__hindsight_… rather than under their bare names — the agent resolves
them from the tool guide either way. In headless runs (dcode -n) Dcode allows the
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:35,最后更新 2026-11-06