Skip to content

ramarivera/pi-supermemory

Repository files navigation

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, or SUPERMEMORY_OPENCLAW_API_KEY
  • PI_SUPERMEMORY_CONFIG
  • PI_SUPERMEMORY_CONTAINER_TAG or SUPERMEMORY_CONTAINER_TAG
  • PI_SUPERMEMORY_ENABLED
  • SUPERMEMORY_API_BASE_URL
  • PI_SUPERMEMORY_MAX_RECALL
  • PI_SUPERMEMORY_AUTO_RECALL
  • PI_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_search
    • supermemory_save
    • supermemory_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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors