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

@gordonb/pi-memory-blocks

v0.3.0

Published

Letta-style persistent memory blocks for Pi coding agents

Readme

pi-memory-blocks

Letta/MemGPT-style persistent memory blocks for Pi coding agents. Gives the agent self-editable memory that survives across sessions.

What it does

  • Creates persistent memory blocks stored as Markdown files with frontmatter (.pi/memory-blocks/<key>.md)
  • Injects all memory blocks into the system prompt every turn
  • Provides an updateMemory tool the LLM can use to update its own memory
  • Ships with two default blocks: user (facts about you) and agent (facts about its role and context)
  • Each block has a configurable character limit (default: 2000 chars)

The LLM sees its memory blocks in the system prompt and can decide to persist important information — user preferences, project context, its own role — using the updateMemory tool. Memory accumulates over sessions, giving the agent long-term recall.

Installation

pi install npm:@gordonb/pi-memory-blocks

How it works

Memory blocks

Each block is a .md file in .pi/memory-blocks/ with YAML frontmatter:

---
description: Information about the user
limit: 2000
---

Prefers functional programming style. Uses TypeScript and Deno.
Name is Gordon.
  • description — tells the LLM what the block is for
  • limit — maximum character count for the block's content

On first run, the extension creates two default blocks (user.md and agent.md) if they don't exist. You can add more blocks manually — just create a new .md file with the frontmatter format above.

The updateMemory tool

The LLM can call updateMemory with:

| Parameter | Required | Description | | ---------- | -------- | ---------------------------------------------------- | | blockKey | Yes | Block to update (e.g. "user", "agent") | | oldText | No | Text to find and replace. Omit to append instead. | | newText | Yes | Replacement text, or text to append if no oldText. |

The tool supports two modes:

  • Replace — finds oldText in the block and replaces it with newText
  • Append — if oldText is omitted, appends newText to the block

Content is truncated to the block's character limit if it exceeds it. The LLM can only write to existing blocks — it cannot create new ones.

The /memory command

Type /memory in the Pi TUI to see all memory blocks, their usage bars, and content previews.

Adding custom blocks

Create a new .md file in .pi/memory-blocks/:

---
description: Current project architecture decisions
limit: 4000
---

The block key is the filename without .md. The LLM will see it in its system prompt and can update it with updateMemory.

Inspiration

Inspired by Letta (formerly MemGPT), which pioneered the idea of giving LLMs self-editable memory blocks with bounded capacity.

License

MIT