@ramarivera/pi-supermemory
Pi coding-agent extension that recalls and captures session memory through Supermemory.
Package details
Install @ramarivera/pi-supermemory from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ramarivera/pi-supermemory- Package
@ramarivera/pi-supermemory- Version
0.2.0- Published
- May 3, 2026
- Downloads
- not available
- Author
- ramarivera
- License
- MIT
- Types
- extension
- Size
- 29.2 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-supermemory
Pi coding-agent extension that recalls and captures development memory through Supermemory.
The extension uses Supermemory's v4 API directly. Pi does not expose MCP servers natively, so this package complements the toolbox mcporter MCP bridge instead of replacing it.
Configuration
Set an API key in the Pi runtime environment:
SUPERMEMORY_API_KEY=...
By default, the extension uses a generic Supermemory container:
PI_SUPERMEMORY_CONTAINER_TAG=pi-supermemory
Set PI_SUPERMEMORY_CONTAINER_TAG to your own shared memory container if you want Pi to write into the same namespace as your other agents.
Supported environment variables:
SUPERMEMORY_API_KEY,SUPERMEMORY_CC_API_KEY, orSUPERMEMORY_OPENCLAW_API_KEYPI_SUPERMEMORY_CONFIGPI_SUPERMEMORY_CONTAINER_TAGorSUPERMEMORY_CONTAINER_TAGPI_SUPERMEMORY_ENABLEDSUPERMEMORY_API_BASE_URLPI_SUPERMEMORY_MAX_RECALLPI_SUPERMEMORY_AUTO_RECALLPI_SUPERMEMORY_AUTO_CAPTURE
Policy file
By default, the extension reads:
~/.pi/agent/pi-supermemory.json
Use PI_SUPERMEMORY_CONFIG to point at a different file.
Example:
{
"default": {
"enabled": true,
"containerTag": "pi-supermemory"
},
"directories": {
"/workspace/app": {
"containerTag": "app-memory"
}
},
"models": {
"local/no-memory-model": {
"enabled": false
},
"openai-codex/gpt-5.5": {
"containerTag": "codex-memory"
}
}
}
Overrides are merged in this order:
default -> longest matching directory -> matching model
Model overrides win over directory overrides. Directory overrides win over defaults.
Behavior
- Injects relevant Supermemory search results into Pi context before the model runs.
- Captures completed user/assistant turns back to the same Supermemory container.
- Registers tools:
supermemory_searchsupermemory_savesupermemory_status
- Registers command:
/supermemory status/supermemory search <query>/supermemory save <content>
Local development
npm install
npm test
npm run typecheck
The repo includes .pi/extensions/pi-supermemory/index.ts so Pi's DefaultResourceLoader can discover the extension locally.