npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@camplus360/pi-claude-mem

v1.0.0

Published

Self-maintained pi-coding-agent memory extension: a thin client for the local claude-mem worker HTTP API. Records tool activity, injects relevant past context, and registers a memory_recall search tool.

Readme

pi-claude-mem

A self-maintained memory extension for pi-coding-agent. It is a thin client for the local claude-mem worker HTTP API: it records tool activity to the worker, injects relevant past context each turn, and registers a memory_recall search tool. pi itself does no summarization — the worker at 127.0.0.1:37701 handles summarization, embeddings and vector search.

This is a fork, not an independent reimplementation. It derives from the ArtemisAI [email protected] adapter, which itself derives from the OpenClaw plugin shipped with claude-mem. See NOTICE for the full provenance and the list of modifications.

License

AGPL-3.0-or-later — see LICENSE. The original copyright and notices must be retained. Note this is stricter than the rest of agent-memory-bridge, which is MIT; this agents/pi/ subdirectory is a self-contained AGPL-licensed component.

The claude-mem worker backend is a separate program (Apache-2.0) that this extension only talks to over a local HTTP API; it is neither contained in nor published by this package.

Install as a local-path package

This package is "private": true" and is not published to any npm registry. pi loads the whole directory as a local-path package, so it is never overwritten by pi update.

# 1. make sure the worker is up
curl -s http://127.0.0.1:37701/api/health

# 2. install THIS directory as a local package (run from agents/pi, or pass an absolute path)
pi install "$PWD"

pi install appends the path to the packages array of ~/.pi/agent/settings.json:

{
  "packages": [
    "/absolute/path/to/agent-memory-bridge/agents/pi"
  ]
}

Restart pi. At startup it logs the resolved worker URL, e.g. [pi-claude-mem] worker → http://127.0.0.1:37701 (端口来源: settings.json). Then run the /memory-status slash command — it should report the worker version and degraded: false.

Uninstall

pi remove /absolute/path/to/agent-memory-bridge/agents/pi

then restart pi.

How it works

pi-coding-agent
   └── this extension (extensions/pi-claude-mem.ts)
        session start      local session id / project name
        before agent start -> POST /api/sessions/init        (with prompt)
        context            -> GET  /api/context/inject
        tool result        -> POST /api/sessions/observations (fire-and-forget)
        agent end          -> POST /api/sessions/summarize
        memory_recall tool -> GET  /api/search
        /memory-status     -> GET  /api/health
                              │
                              ▼
                local claude-mem worker (default 127.0.0.1:37701)
                SQLite (FTS5) + Chroma, shared across engines

Every observation is tagged platformSource: "pi-agent".

Configuration

| Variable | Default | Description | |---|---|---| | CLAUDE_MEM_HOST | 127.0.0.1 | Worker host | | CLAUDE_MEM_PORT | 37777 (fallback) | Worker port; the extension also reads CLAUDE_MEM_WORKER_PORT from ~/.claude-mem/settings.json (accepts both number and numeric-string) | | CLAUDE_MEM_DATA_DIR | ~/.claude-mem | Worker data dir (where settings.json is read from) | | PI_MEM_PROJECT | derived from cwd (pi-<dir>) | Project grouping for observations | | PI_MEM_DISABLED | — | Set to 1 to disable the extension |

Resolution order for the port: CLAUDE_MEM_PORT env → CLAUDE_MEM_WORKER_PORT in ~/.claude-mem/settings.json → fallback 37777.

The runtime only imports the two peer modules pi injects (@mariozechner/pi-ai, @mariozechner/pi-coding-agent) plus Node built-ins, so the directory needs no node_modules. The @earendil-works pi distribution exposes compatible extension APIs and loads the package as-is.

Modifying

Edit extensions/pi-claude-mem.ts in place and restart pi — there is no copy to sync (unlike an npm-package patch workflow). Verify with /memory-status.

Files

extensions/pi-claude-mem.ts   extension body (event hooks + memory_recall + /memory-status)
skills/mem-search/SKILL.md    skill that guides the model to use memory_recall
package.json                  private local-package manifest (pi.extensions / pi.skills)
LICENSE                       AGPL-3.0 full text + copyright header
NOTICE                        provenance and modification list

For a from-scratch machine setup (installing pi, the worker and the AI provider) see DEPLOY.md.