lpb-memory is a persistent memory extension for Pi. It originated from chandra447/pi-hermes-memory but has been extensively refactored and is now fully independent.
This document explains how to contribute — whether by improving lpb-memory directly, forking for your own stack, or feeding experiences back to the community.
Pi Session
└─ Every 10 turns → Background Review (subprocess: pi -p)
├─ Extract facts → Memory (Markdown + SQLite)
├─ Detect corrections → Failure Memory
├─ Discover patterns → Procedural Skills
└─ Consolidate if full → Merge entries
Key components:
- Subprocess reviews — run in child processes for context isolation
- SQLite FTS5 — full-text search across sessions and memories
- Markdown storage — human-readable, git-tracked memory files
- Secret scanning — blocks API keys, tokens, SSH keys from persistence
- Two-tier storage — global (
~/.pi/agent/) + per-project
git clone https://github.com/lpb-stack/lpb-memory.git
cd lpb-memory
npm install
npm run check
npm test# Load as a development extension
pi -e /path/to/lpb-memory/src/index.ts
# Or symlink into extensions
ln -s /path/to/lpb-memory ~/.pi/agent/extensions/lpb-memory- Make your changes in a feature branch
- Run
npm run checkandnpm test - Test with
pi -e ./src/index.ts - Push and open a PR against
main
If you want to customize the memory extension:
- Fork
localpibox/lpb-memoryto your own GitHub account - Customize — adjust review frequency, storage paths, scanning rules, or add new memory categories
- Install from your fork:
pi install git:github.com/<you>/lpb-memory@<your-branch>
- Repoint any existing installation:
pi remove git:github.com/lpb-stack/lpb-memory pi install git:github.com/<you>/lpb-memory@<your-branch>
- Review transport — switch to
"inline"if subprocess mode doesn't work for your setup - Model override — pin reviews to a specific model for consistent behavior
- Memory categories — add custom categories for your team's conventions
- Secret scanning patterns — extend the scanner for organization-specific token formats
If you discover patterns or improvements that would benefit other users:
- Document what works — if a configuration or customization proves reliable, share it
- Open an issue on
localpibox/lpb-memorydescribing your use case and the improvement - Submit a PR with your changes — keep them focused and well-tested
The LocalPibox project values feedback about what works reliably in local LLM setups. If you run the stack on different hardware, with different models, or in different configurations, please share:
- Hardware — CPU, memory, GPU/NPU configuration
- Models — which models you tested, sizes, quantizations
- Behavior — what worked well, what broke, what you had to adjust
- Configuration — settings that made things reliable
You can share via:
- GitHub Issues — localpibox/lpb-memory/issues
- GitHub Discussions — general stack: localpibox/localpibox
- Extension bugs → localpibox/lpb-memory/issues
- Original Hermes Memory → chandra447/pi-hermes-memory/issues
- Stack configuration → localpibox/devstack/issues
- Pi Discord — upstream Pi community
- Issues and PRs on GitHub — preferred for technical discussions