{"_id":"@askjo/pi-mem","_rev":"2-b94fe553039ee731f832591692ea1f32","name":"@askjo/pi-mem","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@askjo/pi-mem","version":"1.0.0","keywords":["pi-package","pi-extension","pi","pi-coding-agent","memory","context","scratchpad","daily-log"],"author":{"name":"jo-inc"},"license":"MIT","_id":"@askjo/pi-mem@1.0.0","maintainers":[{"name":"askjo","email":"oss+jo@askjo.ai"}],"homepage":"https://github.com/jo-inc/pi-mem#readme","bugs":{"url":"https://github.com/jo-inc/pi-mem/issues"},"pi":{"image":"https://raw.githubusercontent.com/jo-inc/pi-mem/main/logo.png","extensions":["./index.ts"]},"dist":{"shasum":"7694000991a5dea9e0af3ecf793465e83276269d","tarball":"https://registry.npmjs.org/@askjo/pi-mem/-/pi-mem-1.0.0.tgz","fileCount":14,"integrity":"sha512-pLe8DEfZrdSQrv4QnfcUNjZl1KsgWQbl8dqzuxONMUWmi39RSx31G560vgFEo2kEKCjsg+6vF6uF+cMX2rx8NQ==","signatures":[{"sig":"MEYCIQDaU1t3etqzN+y5eSYwx7wdM2O9YluwMSyQhGG/G2DwlgIhANScGW83q3shSjGINk3hdEvLXgufeDd5EguoErgRc/Yn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":396309},"main":"index.ts","type":"module","gitHead":"00df49ddfe921866c5709d0c65e0d24b8877be50","scripts":{"test":"node --import tsx --test tests/*.test.ts"},"_npmUser":{"name":"askjo","email":"oss+jo@askjo.ai"},"repository":{"url":"git+https://github.com/jo-inc/pi-mem.git","type":"git"},"_npmVersion":"11.9.0","description":"Pi coding agent extension for plain-Markdown memory system — long-term memory, daily logs, and scratchpad checklist","directories":{},"_nodeVersion":"24.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","@types/node":"^22.0.0"},"peerDependencies":{"@sinclair/typebox":"*","@mariozechner/pi-ai":"*","@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-mem_1.0.0_1771450260685_0.0379497394046604","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@askjo/pi-mem","version":"1.2.0","description":"Pi coding agent extension for plain-Markdown memory system — long-term memory, daily logs, and scratchpad checklist","main":"index.ts","type":"module","keywords":["pi-package","pi-extension","pi","pi-coding-agent","memory","context","scratchpad","daily-log"],"scripts":{"test":"node --import tsx --test tests/*.test.ts"},"author":{"name":"jo-inc"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/jo-inc/pi-mem.git"},"bugs":{"url":"https://github.com/jo-inc/pi-mem/issues"},"homepage":"https://github.com/jo-inc/pi-mem#readme","pi":{"extensions":["./index.ts"],"image":"https://raw.githubusercontent.com/jo-inc/pi-mem/main/logo.png"},"publishConfig":{"access":"public"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*","@mariozechner/pi-ai":"*","@mariozechner/pi-tui":"*","@sinclair/typebox":"*"},"devDependencies":{"tsx":"^4.19.0","@types/node":"^22.0.0"},"gitHead":"ffb706b8805d64e04919ceff4c82084a67504e5d","_id":"@askjo/pi-mem@1.2.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-ZuLEgN6WqgoPFOeSursfOQaFas6f7zEjYXmv6Y3/sp/oDTZhfmOZafKudxyqxCnDYaUJD9Rv0gYKZ7XwQxksFA==","shasum":"1622017087269f2a6f303ee688ba34f9043dc043","tarball":"https://registry.npmjs.org/@askjo/pi-mem/-/pi-mem-1.2.0.tgz","fileCount":19,"unpackedSize":439518,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@askjo%2fpi-mem@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGKZvqW+AXy1YXTJkuhWTzhihvNC+EmLsw46sa8FaMMGAiEAgM2OQ8IVVq5wthQvZH8z+S+TN4tidaBVgwYUbN/baKs="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:afb9c11d-9ccf-4553-9166-e9a17fe69849"}},"directories":{},"maintainers":[{"name":"askjo","email":"oss+jo@askjo.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-mem_1.2.0_1784655085494_0.5197378821965617"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-18T21:31:00.571Z","modified":"2026-07-21T17:31:26.058Z","1.0.0":"2026-02-18T21:31:00.844Z","1.2.0":"2026-07-21T17:31:25.700Z"},"bugs":{"url":"https://github.com/jo-inc/pi-mem/issues"},"author":{"name":"jo-inc"},"license":"MIT","homepage":"https://github.com/jo-inc/pi-mem#readme","keywords":["pi-package","pi-extension","pi","pi-coding-agent","memory","context","scratchpad","daily-log"],"repository":{"type":"git","url":"git+https://github.com/jo-inc/pi-mem.git"},"description":"Pi coding agent extension for plain-Markdown memory system — long-term memory, daily logs, and scratchpad checklist","maintainers":[{"name":"askjo","email":"oss+jo@askjo.ai"}],"readme":"<p align=\"center\">\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\" /></a>\n  <a href=\"https://www.npmjs.com/package/@askjo/pi-mem\"><img src=\"https://img.shields.io/npm/v/@askjo/pi-mem\" alt=\"npm version\" /></a>\n  <a href=\"https://github.com/jo-inc/pi-mem/stargazers\"><img src=\"https://img.shields.io/github/stars/jo-inc/pi-mem\" alt=\"GitHub stars\" /></a>\n</p>\n<p align=\"center\">\n  <picture>\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"logo-dark.png\" />\n    <source media=\"(prefers-color-scheme: light)\" srcset=\"logo.png\" />\n    <img src=\"logo.png\" alt=\"pi-mem\" width=\"300\" />\n  </picture>\n</p>\n<h1 align=\"center\">pi-mem</h1>\n<p align=\"center\"><em>surprisingly useful daily memory for the <a href=\"https://pi.dev/\">pi</a> coding agent</em></p>\n<p align=\"center\"><sub><a href=\"https://pradeep.md/2026/02/11/pi-mem.html\">Read the blog post</a></sub></p>\n\n---\n\n<p align=\"center\"><sub>Inspired by <a href=\"https://openclaw.ai\">OpenClaw</a>'s approach to agent memory.</sub></p>\n\n## Layout\n\nMemory files live under `~/.pi/agent/memory/` (override with `PI_MEMORY_DIR`):\n\n| Path | Purpose |\n|------|---------|\n| `MEMORY.md` | Curated long-term memory (decisions, preferences, durable facts) |\n| `SCRATCHPAD.md` | Checklist of things to keep in mind / fix later |\n| `daily/YYYY-MM-DD.md` | Daily append-only log (today + yesterday loaded at session start) |\n| `notes/*.md` | LLM-created files (lessons, self-review, reference material, etc.) |\n\nIdentity and behavioral files (e.g. `SOUL.md`, `AGENTS.md`, `HEARTBEAT.md`) can also live in the memory directory and be injected into context via `PI_CONTEXT_FILES`.\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `memory_write` | Write to `long_term` (MEMORY.md), `daily` (today's log), or `note` (notes/filename). Supports `append` and `overwrite` modes. |\n| `memory_read` | Read MEMORY.md (`long_term`), SCRATCHPAD.md (`scratchpad`), daily logs (`daily`), notes (`note`), any root file (`file`), or list everything (`list`). |\n| `memory_search` | Search across all files — filenames and content. Case-insensitive keyword search across root, notes/, and daily/. |\n| `scratchpad` | Manage a checklist: `add`, `done`, `undo`, `clear_done`, `list`. |\n\n## Context Injection\n\nThe following are automatically injected into the system prompt before every agent turn:\n\n- Files listed in `PI_CONTEXT_FILES` (e.g. `SOUL.md,AGENTS.md,HEARTBEAT.md`)\n- `MEMORY.md`\n- `SCRATCHPAD.md` (open items only)\n- Today's and yesterday's daily logs\n\nFiles in `notes/` and older daily logs are **not** injected — they're accessible on-demand via `memory_search` and `memory_read`.\n\n## Configuration\n\nSettings can be configured via environment variables or a `.pi-mem.json` file in the memory directory. Environment variables take precedence over file values.\n\n### .pi-mem.json\n\nPlace a `.pi-mem.json` in your memory directory (default `~/.pi/agent/memory/.pi-mem.json`):\n\n```json\n{\n  \"searchDirs\": [\"catchup\", \"projects\"],\n  \"contextFiles\": [\"SOUL.md\", \"AGENTS.md\"],\n  \"autocommit\": true\n}\n```\n\n### Environment variables\n\nEnvironment variables override `.pi-mem.json` values when set.\n\n| Env Var | Default | Description |\n|---------|---------|-------------|\n| `PI_MEMORY_DIR` | `~/.pi/agent/memory/` | Root directory for all memory files |\n| `PI_DAILY_DIR` | `$PI_MEMORY_DIR/daily/` | Directory for daily logs |\n| `PI_CONTEXT_FILES` | *(empty)* | Comma-separated list of extra files to inject into context (e.g. `SOUL.md,AGENTS.md,HEARTBEAT.md`) |\n| `PI_SEARCH_DIRS` | *(empty)* | Comma-separated list of subdirectories (relative to `PI_MEMORY_DIR`) to include in `memory_search`. Searched recursively one level deep. (e.g. `catchup,projects`) |\n| `PI_AUTOCOMMIT` | `false` | When `1` or `true`, auto-commit to git after every write |\n| `PI_TIMEZONE` | `TZ`, then `UTC` | IANA timezone used for daily log filenames and today/yesterday context windows. Invalid values fall back to `UTC`. |\n\n## Dashboard Widget\n\nAn auto-generated \"Last 24h\" summary is shown on session start and switch:\n- Scans recent session files for titles, costs, and sub-agent counts\n- Groups by topic using an LLM call (falls back to flat list)\n- Rebuilt every 15 minutes in the background\n- Also shows open scratchpad items\n\n## Related\n\n- **[pi-reflect](https://github.com/jo-inc/pi-reflect)** — Self-improving reflection engine for pi. Analyzes recent conversations and iterates on memory, behavioral rules, and identity files. Pairs naturally with pi-mem.\n\n## Installation\n\n```bash\npi install git:github.com/jo-inc/pi-mem\n```\n\n## License\n\nMIT\n\n## Pi Ecosystem\n\n| Package | Description |\n|---------|-------------|\n| [pi-reflect](https://github.com/jo-inc/pi-reflect) | Self-improving behavioral files |\n| [pi-boss](https://github.com/skyfallsin/pi-boss) | Multi-agent orchestration via tmux |\n| [pi-room](https://github.com/skyfallsin/pi-room) | Multi-agent awareness and coordination |\n| [pi-vertex-anthropic](https://github.com/skyfallsin/pi-vertex-anthropic) | Claude via Google Cloud Vertex AI |\n| [pi-skill-posthog](https://github.com/skyfallsin/pi-skill-posthog) | PostHog analytics skill for pi agents |\n","readmeFilename":"README.md"}