← Catalog

m3m0s-pi

Long-term memory from m3m0s for the pi coding agent (recall and capture).

Package

Install

Install with PiG

pig install npm:m3m0s-pi

Install with Pi

pi install npm:m3m0s-pi
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": [
    "./m3m0s-memory.ts"
  ]
}

README

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

pi integration

A pi extension that gives pi the same memory loop as the Claude Code hooks, by reusing the m3m0s binary:

  • Recall (before_agent_start): runs m3m0s hook claude-code --inject with the prompt and injects the relevant memories as a hidden custom message (D44).
  • Capture (agent_end as Stop, session_shutdown as SessionEnd): runs m3m0s hook claude-code against pi's session file. The transcript parser accepts pi's message lines; memories are stored with source: "pi" (D46).

Install

From npm (needs the m3m0s binary on PATH or at ~/go/bin/m3m0s, plus ~/.m3m0s/hook.env):

pi install npm:m3m0s-pi

Manual install:

  1. go install (or copy) m3m0s to ~/go/bin/m3m0s, and create ~/.m3m0s/hook.env with M3M0S_URL and M3M0S_API_KEY.
  2. Copy m3m0s-memory.ts to ~/.pi/agent/extensions/. Adjust BIN at the top if the binary lives elsewhere.
  3. Optional: register the MCP server read-only in ~/.pi/agent/mcp.json: {"m3m0s": {"command": "sh", "args": ["-c", "set -a; . \"$HOME/.m3m0s/hook.env\"; exec \"$HOME/go/bin/m3m0s\" mcp --read-only"]}}

Failures are silent and never block pi; the log is ~/.m3m0s/hooks/claude-code.log.