@ryan_nookpi/pi-extension-memory-layer

Long-term memory layer for pi — remember, recall, forget, and browse memories across sessions.

Package details

extension

Install @ryan_nookpi/pi-extension-memory-layer from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@ryan_nookpi/pi-extension-memory-layer
Package
@ryan_nookpi/pi-extension-memory-layer
Version
0.1.0
Published
Apr 16, 2026
Downloads
129/mo · 6/wk
Author
ryan_nookpi
License
MIT
Types
extension
Size
70.1 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

memory-layer

Long-term memory layer for pi — remember, recall, forget, and browse memories across sessions.

What it does

Provides persistent memory that survives across pi sessions:

  • remember tool — save facts, rules, or lessons with user (global) or project (repo-specific) scope
  • recall tool — search memories by keyword, retrieve by ID, or list the full index
  • forget tool — permanently delete memories that are no longer valid
  • memory_list tool — list all active memories, optionally filtered by scope
  • /remember command — interactive memory save with topic selection UI
  • /memory command — full-featured overlay browser with search, scope filter, view, copy, and delete

Storage

Memories are stored as Markdown files under ~/.pi/memory/:

~/.pi/memory/
  user/
    MEMORY.md          # index
    general.md         # topic file
    coding-rules.md    # topic file
  projects/
    <project-id>/
      MEMORY.md
      general.md

Project ID resolution

Project identity is resolved automatically:

  1. git remote origin URL → normalized slug
  2. Root commit hash → commit-{hash8}
  3. Fallback: cwd path hash → local-{hash8}

System prompt injection

On each turn, the memory index is injected into the system prompt so the LLM knows what's stored without needing an explicit recall call.

Install

pi install npm:@ryan_nookpi/pi-extension-memory-layer