@netzlabor/pi-session-memory0.2.0
Pi extension that gives the agent access to knowledge from previous sessions – auto-injected project memory, full-text search, LLM-generated summaries, and cross-project session access.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-session-memory
A pi extension that gives the agent persistent memory across sessions. Automatically injects context from previous sessions and lets the LLM search through past work.
What it does
On each session start, a compact summary of recent sessions is injected into context so the LLM knows what happened before. Three tools let it dig deeper on demand:
list_sessions– browse past sessions with metadatasearch_sessions– full-text search across session contentget_session_summary– LLM-generated summary of any session (cached)
All tools support cross-project access via an optional path parameter.
Sessions are auto-summarized on shutdown (if short enough). For larger histories, run /memory-update to batch-generate summaries. Stale memory triggers a warning.
Install
From npm (recommended):
pi install npm:@netzlabor/pi-session-memory
Or directly from GitHub:
pi install git:github.com/j-koester/pi-session-memory@v0.1.1
Or clone manually:
git clone https://github.com/j-koester/pi-session-memory.git ~/.pi/agent/extensions/pi-session-memory
Compatibility: Tested with pi v1.0.0. No breaking API usage; uses registerTool, registerCommand, and the session_start / session_shutdown / before_agent_start events, all stable in the 1.0 extension API.
Commands
| Command | What it does |
|---|---|
/memory-update [n] |
Generate summaries for unsummarized sessions (Esc to cancel) |
/memory-status |
Cache stats |
/memory-clear |
Wipe cached summaries |
How it works
Session JSONL files are read from ~/.pi/agent/sessions/. Summaries and metadata are cached per project in ~/.pi/agent/session-memory/. The auto-injected context stays under ~1000 tokens.
License
MIT