@bitbonsai/pi-memory
v0.2.0
Published
Small persistent memory extension for Pi.
Maintainers
Readme
This keeps corrections, preferences, and project facts in one local SQLite database. New sessions receive one memory block, capped at 8KB. After a session, an optional cheap model extracts anything worth keeping.
Why a fork
I wanted the useful part of @samfp/pi-memory v1.3.5 without its newer direction: semantic search and a larger context stack. This fork stays with SQLite, keyword lookup, one bounded injection, and optional consolidation. No embeddings, vector store, file index, session index, watchers, or agent loops.
Install
pi install npm:@bitbonsai/pi-memoryUse
| Tool | What it does |
|------|--------------|
| memory_search | Find stored facts and lessons |
| memory_remember | Save a fact or lesson |
| memory_forget | Remove a fact or lesson |
| memory_lessons | List lessons |
| memory_stats | Show memory counts |
/memory-consolidate extracts memory from current session when asked. /memory-context shows exact local memory block this session receives.
Configure
Database: ~/.pi/memory/memory.db.
Automatic consolidation runs only when you set a model:
{
"memory": {
"consolidationModel": "opencode-go/mimo-v2.5"
}
}With a configured model, consolidation starts after three user messages. It sends user messages from that session to configured provider. Manual /memory-consolidate uses Pi's current default if no model is configured.
Keep one project's memory separate:
{
"pi-memory": {
"localPath": ".pi/memory"
}
}Develop
Node 24+ or Bun 1.4+.
npm test
npm run build
# or
bun test
bun run buildLicense
MIT.
Credits
Derived from @samfp/pi-memory v1.3.5, under MIT license.
Memory icon by Adrien Coquet from Noun Project.
