← Catalog

pi-agents-memory

Cross-session persistent memory for Pi agents. Loads project context at session start and auto-saves conversation memory at session end.

Package

Install

Install with PiG

pig install npm:pi-agents-memory

Install with Pi

pi install npm:pi-agents-memory
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.

pi-agents-memory

Pi extension for agents-memory — cross-session persistent memory for AI coding agents.

When you open a project, the agent knows what it is, what you did last time, your standards for that stack, and how your team works — without you repeating anything.

Install

# From npm (once published)
pi install npm:pi-agents-memory

# From a local checkout
pi install ./path/to/pi-agents-memory

Uninstall with pi remove pi-agents-memory.

Requires an agents-memory instance at ~/agents-memory/ (or $AGENT_MEMORY_DIR).

What it does

Session start

Reads your project memory and injects it as context:

  • Project index, latest sessions, open threads
  • Stack standards (python, typescript, etc.)
  • Team conventions
  • Global preferences

New projects are auto-detected and scaffolded.

Auto-save

Extracts memory from the conversation automatically:

TriggerEventBehavior
Session endsession_shutdown (quit)Always saves
Compactionsession_before_compactAlways saves
Periodicagent_endOnly when threshold reached (default: 10)

The threshold is configurable in ~/agents-memory/config.json:

{ "auto_save_threshold": 10 }

Background consolidation

At session start, checks if a consolidation cycle is due and launches it in the background via pi -p.

Configuration

The extension reads ~/agents-memory/config.json (shared with Claude Code and Cursor hooks). No Pi-specific configuration needed.

Projects with a .skip file in their memory directory are excluded.

Requirements

  • agents-memory instance
  • pi CLI available in PATH (for auto-save and consolidation subprocesses)

License

MIT — see LICENSE.

Author

Juanje Ojeda