{"_id":"@awesamarth/pi-supermemory","_rev":"5-3ad659a4efb1926c304f89ecde27450f","name":"@awesamarth/pi-supermemory","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@awesamarth/pi-supermemory","version":"0.1.1","keywords":["pi-package","pi","supermemory","supermemory-local","memory","private-agents","coding-agent"],"author":"","license":"MIT","_id":"@awesamarth/pi-supermemory@0.1.1","maintainers":[{"name":"awesamarth","email":"samarthsaxena1672003@gmail.com"}],"homepage":"https://github.com/awesamarth/pi-supermemory#readme","bugs":{"url":"https://github.com/awesamarth/pi-supermemory/issues"},"pi":{"skills":["./skills"],"extensions":["./extensions"]},"dist":{"shasum":"2d1ea6cee2a7dec1a1fdb9b8185c324e82790800","tarball":"https://registry.npmjs.org/@awesamarth/pi-supermemory/-/pi-supermemory-0.1.1.tgz","fileCount":10,"integrity":"sha512-TM1gczuznSbXgImTOCiqIf6yRZIskRs3sEEVpmrWm9+W7wLYUiXTcp3uzvcgvd/zyIrxkdAubCdRN4Tu3bLO6w==","signatures":[{"sig":"MEYCIQCq/90l4p/I10B/0+Vy0H1CnhbJG3pSWgjaCu0/uq7g3QIhAIoUxUjtmbZcinErCSTQsB/kvQX8sPpqr1wIhuwgfP7m","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51897},"type":"module","gitHead":"73713e2a44424d7001163ca59c0d0a6093c3c8be","scripts":{"typecheck":"tsc --noEmit"},"_npmUser":{"name":"awesamarth","email":"samarthsaxena1672003@gmail.com"},"repository":{"url":"git+https://github.com/awesamarth/pi-supermemory.git","type":"git"},"_npmVersion":"11.6.2","description":"Persistent private memory for Pi coding agent — powered by Supermemory Local","directories":{},"_nodeVersion":"24.12.0","dependencies":{"supermemory":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typebox":"latest","typescript":"latest","@types/node":"latest","@earendil-works/pi-coding-agent":"latest"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-supermemory_0.1.1_1783685379588_0.25108236077373847","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@awesamarth/pi-supermemory","version":"0.1.2","description":"Persistent private memory for Pi coding agent — powered by Supermemory Local","type":"module","license":"MIT","author":"","repository":{"type":"git","url":"git+https://github.com/awesamarth/pi-supermemory.git"},"keywords":["pi-package","pi","supermemory","supermemory-local","memory","private-agents","coding-agent"],"pi":{"extensions":["./extensions"],"skills":["./skills"]},"scripts":{"typecheck":"tsc --noEmit"},"dependencies":{"supermemory":"^4.0.0"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","typebox":"*"},"devDependencies":{"@earendil-works/pi-coding-agent":"latest","@types/node":"latest","typebox":"latest","typescript":"latest"},"gitHead":"3e2d6de36d8c42f6d777f70b89d88c5ae2dbfd24","_id":"@awesamarth/pi-supermemory@0.1.2","bugs":{"url":"https://github.com/awesamarth/pi-supermemory/issues"},"homepage":"https://github.com/awesamarth/pi-supermemory#readme","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-Y0qmieeao/QumZvsTPBV8qg1ZBj2kNMVYn0SPU1pm8UVQEkMmlaKJyn/df8KSxlUqzTKCHFhPTYzHRXJKXBcEw==","shasum":"028ed4eb7bcf6547ba959881abb081f73c3e1965","tarball":"https://registry.npmjs.org/@awesamarth/pi-supermemory/-/pi-supermemory-0.1.2.tgz","fileCount":10,"unpackedSize":49877,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDB91K12E7kfUk2w+RFt2jpMm0m3AxmqvDydr0utYZ2YAIhAP2VrW8Y5K8khatPiyquSHvlIo3Xf5UJsR5zX0O6IUKG"}]},"_npmUser":{"name":"awesamarth","email":"samarthsaxena1672003@gmail.com"},"directories":{},"maintainers":[{"name":"awesamarth","email":"samarthsaxena1672003@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-supermemory_0.1.2_1783810529794_0.28332741053025656"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-10T12:09:39.421Z","modified":"2026-07-11T22:55:30.059Z","0.1.0":"2026-07-09T16:46:35.661Z","0.1.1":"2026-07-10T12:09:39.725Z","0.1.2":"2026-07-11T22:55:29.939Z"},"bugs":{"url":"https://github.com/awesamarth/pi-supermemory/issues"},"license":"MIT","homepage":"https://github.com/awesamarth/pi-supermemory#readme","keywords":["pi-package","pi","supermemory","supermemory-local","memory","private-agents","coding-agent"],"repository":{"type":"git","url":"git+https://github.com/awesamarth/pi-supermemory.git"},"description":"Persistent private memory for Pi coding agent — powered by Supermemory Local","maintainers":[{"name":"awesamarth","email":"samarthsaxena1672003@gmail.com"}],"readme":"# pi-supermemory\n\nPersistent private memory for the [Pi](https://pi.dev) coding agent, powered by [Supermemory Local](https://supermemory.ai/docs/self-hosting/quickstart).\n\n`pi-supermemory` is a Pi package that brings Supermemory-style coding-agent memory to Pi: implicit recall, automatic capture, explicit memory tools, privacy redaction, and user/project-scoped memory containers.\n\nIt is local-first. By default it talks to Supermemory Local at `http://localhost:6767`, so your memory database stays on your machine.\n\n## Features\n\n- Recall relevant memories before Pi responds.\n- Capture useful coding-session knowledge after turns.\n- Save, search, forget, inspect profile memory, and check status from Pi.\n- Separate user-level memory from project-level memory.\n- Redact `<private>...</private>` blocks before storage.\n- Use Supermemory Local by default, with optional hosted Supermemory support.\n\n## Install\n\nInstall the Pi package:\n\n```bash\npi install npm:@awesamarth/pi-supermemory\n```\n\nThen run Pi as usual:\n\n```bash\npi\n```\n\n## Run Supermemory Local\n\nInstall and start Supermemory Local:\n\n```bash\nbunx supermemory local\nsupermemory-server\n```\n\nSupermemory Local stores the memory database on your machine and serves the Memory API locally. The server needs an LLM provider key, or a local OpenAI-compatible model endpoint, for memory extraction and summarization.\n\nWith OpenAI:\n\n```bash\nexport OPENAI_API_KEY=\"sk-...\"\nsupermemory-server\n```\n\nWith a local OpenAI-compatible model:\n\n```bash\nOPENAI_BASE_URL=http://localhost:11434/v1 \\\nOPENAI_API_KEY=ollama \\\nOPENAI_MODEL=gpt-oss:20b \\\nsupermemory-server\n```\n\n`pi-supermemory` defaults to:\n\n```bash\nSUPERMEMORY_API_URL=http://localhost:6767\n```\n\nFor normal local use, no Supermemory API key is required. Supermemory Local accepts unauthenticated requests from `localhost` by applying its local key server-side.\n\n## Hosted or remote Supermemory\n\nTo use hosted Supermemory instead of Supermemory Local:\n\n```bash\nexport SUPERMEMORY_API_KEY=\"sm_...\"\nexport SUPERMEMORY_API_URL=\"https://api.supermemory.ai\"\n```\n\nFor non-local URLs, an API key is required.\n\n## Commands\n\nInside Pi:\n\n```txt\n/supermemory-status\n/supermemory-search <query>\n/supermemory-profile [query]\n/supermemory-save <text>\n```\n\nExamples:\n\n```txt\n/supermemory-status\n/supermemory-save This repo uses Bun and tests run with bun test.\n/supermemory-search test command\n```\n\nYou can also ask naturally:\n\n```txt\nremember that this repo uses Bun\nwhat do you remember about this repo?\nforget the old test command\n```\n\n## Tools and skills\n\nThe package includes a Pi extension plus Pi skills.\n\nThe extension registers these tools:\n\n- `supermemory_save` — save durable user or project knowledge\n- `supermemory_search` — search user/project memories\n- `supermemory_forget` — remove outdated or incorrect memories\n- `supermemory_profile` — fetch user profile facts\n- `supermemory_status` — check connection and active scopes\n\nThe included skills teach Pi when and how to use those memory workflows.\n\n## How it works\n\n| Supermemory integration pattern | Pi implementation |\n| --- | --- |\n| Recall before the model runs | `before_agent_start` extension hook |\n| Capture useful session context | `agent_end` extension hook |\n| Explicit memory tools | `pi.registerTool()` |\n| Slash commands | `pi.registerCommand()` |\n| User/project scoping | `pi_user_<hash>` and `pi_project_<hash>` |\n| Local server support | `SUPERMEMORY_API_URL=http://localhost:6767` |\n\nBefore each Pi turn, the extension searches user and project containers in Supermemory Local. Relevant profile facts and memories are appended to Pi's context as private local context. After useful turns, signal-based capture stores durable preferences, decisions, setup notes, bugs, fixes, and implementation lessons.\n\n## Memory scopes\n\n`pi-supermemory` separates memory into two scopes:\n\n- User container: `pi_user_<hash(git config user.email)>`\n- Project container: `pi_project_<hash(git root)>`\n\nIf git metadata is unavailable, it falls back to OS user/hostname for user scope and current directory for project scope.\n\nOverride scopes with config:\n\n```json\n{\n  \"userContainerTag\": \"my-user\",\n  \"projectContainerTag\": \"my-project\"\n}\n```\n\n## Privacy\n\nBefore saving, the adapter removes injected Supermemory context and redacts private tags.\n\nInput:\n\n```txt\nremember this <private>sk-secret</private>\n```\n\nStored memory:\n\n```txt\nremember this [REDACTED]\n```\n\n## Configuration\n\nEnvironment variables:\n\n| Variable | Default | Description |\n| --- | --- | --- |\n| `SUPERMEMORY_PI_API_KEY` | — | API key for this Pi adapter; optional for localhost |\n| `SUPERMEMORY_API_KEY` | — | Standard Supermemory API key fallback; optional for localhost |\n| `SUPERMEMORY_API_URL` | `http://localhost:6767` | Supermemory API base URL |\n| `SUPERMEMORY_BASE_URL` | — | SDK-compatible base URL fallback |\n| `SUPERMEMORY_AUTO_RECALL` | `true` | Enable implicit recall |\n| `SUPERMEMORY_AUTO_CAPTURE` | `true` | Enable signal-based auto-capture |\n| `SUPERMEMORY_CAPTURE_TOOLS` | `true` | Include edit/write/bash tool summaries in captures |\n| `SUPERMEMORY_INJECT_PROFILE` | `true` | Include user profile facts in recall |\n| `SUPERMEMORY_DEBUG` | `false` | Debug logs to stderr |\n\nOptional config files, later entries override earlier ones:\n\n- `~/.pi/supermemory.json`\n- `~/.pi/agent/supermemory.json`\n- `<project>/.pi/supermemory.json` when the project is trusted\n\nExample:\n\n```json\n{\n  \"baseUrl\": \"http://localhost:6767\",\n  \"similarityThreshold\": 0.6,\n  \"maxMemories\": 5,\n  \"maxProfileItems\": 5,\n  \"autoRecall\": true,\n  \"autoCapture\": true,\n  \"signalExtraction\": true,\n  \"signalKeywords\": [\"remember\", \"decision\", \"bug\", \"fix\", \"prefer\", \"important\"],\n  \"containerTagPrefix\": \"pi\"\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}