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.
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-supermemorySet 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
By default, the extension reads:
~/.pi/agent/pi-supermemory.jsonUse 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.
- 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>
npm install
npm test
npm run typecheckThe repo includes .pi/extensions/pi-supermemory/index.ts so Pi's DefaultResourceLoader can discover the extension locally.