pi-hindsight-memory

Hindsight long-term memory for Pi: recalls past decisions before each turn, saves the conversation after it, and shares one memory with Claude Code, Codex, and Hermes.

Packages

Package details

extension

Install pi-hindsight-memory from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-hindsight-memory
Package
pi-hindsight-memory
Version
0.1.0
Published
Oct 11, 2026
Downloads
262/mo · 262/wk
Author
csk917work
License
MIT
Types
extension
Size
6.1 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/hindsight.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-hindsight-memory

Hindsight long-term memory for Pi. Pi gets the same memory your Claude Code, Codex, and Hermes sessions use:

  • Recall before each turn. Relevant past decisions, conventions, and the repository's knowledge pages are added to the system prompt.
  • Save after each turn. The conversation is sent to Hindsight, which keeps what is worth remembering.
  • Tools. hindsight_search_knowledge_pages, hindsight_reflect, hindsight_ingest_document, and the rest of the hindsight_* tools, plus the hindsight-coding-agent skill, which the adapter installs into ~/.pi/agent/skills.

This package is a thin loader. The memory behaviour is Hindsight's official Pi adapter (dist/pi.js in @vectorize-io/hindsight-coding-agents), so Pi stays on the same adapter version as your other agents.

Install

  1. Set up the Hindsight server and its agent hooks with hindsight-agent-setup. It installs this package for you when pi is on your PATH.

  2. Or add it to Pi yourself:

    pi install npm:pi-hindsight-memory
    # or straight from GitHub
    pi install git:github.com/cskwork/pi-hindsight-memory

Start a new Pi session. Without a Hindsight install, the extension loads nothing and shows a warning at session start.

How it works

The extension imports ~/.hindsight/coding-agents/dist/pi.js (override with HINDSIGHT_CODING_AGENTS_DIR) and hands it Pi's extension API. If you already registered that file directly with npx @vectorize-io/hindsight-coding-agents install pi, the extension stands down so the tools are not registered twice. It also loads only once when installed from both npm and git.

Memory settings (server URL, bank, per-repo opt-in) come from ~/.hindsight/coding-agent.json, the same file the other agents read. Pi events appear as "harness":"pi" in ~/.hindsight/coding-agents-logs/diag.jsonl: look for inject_ok and retain_ok to confirm recall and saving.

Develop

npm test                                  # unit tests (Node 22+)
pi -e . -p "hello" < /dev/null            # load this checkout into one Pi run

License

MIT. Hindsight and its Pi adapter are MIT, © 2025 Vectorize AI, Inc.