@rohirik/pi-ltm
v2.1.1
Published
LTM (Long-Term Memory) native extension for Pi — share memories with Claude Code and OpenCode
Maintainers
Readme
@rohirik/pi-ltm
Long-Term Memory (LTM) native extension for Pi coding agent — shares the same memory database as Claude Code and OpenCode.
Install
pi install npm:@rohirik/pi-ltmOr add to pi.toml:
[[extensions]]
package = "@rohirik/pi-ltm"What it does
- Session start (
session:start): injects a## Prior Knowledgeblock into the system prompt - Compaction (
compact): saves session summary to LTM before conversation compaction - 3 tools:
ltm_recall,ltm_learn,ltm_forget
Shared memory
All three tools read from and write to the same database:
~/.claude/plugins/data/ltm-ltm/ltm.dbA memory learned in Pi appears in the next Claude Code session, and vice versa.
Custom DB path
export LTM_DB_PATH="/custom/path/ltm.db"