pi-napkin

๐Ÿงป Napkin integration for pi โ€” vault context, knowledge tools, and automatic distillation

Package details

extensionskill

Install pi-napkin from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-napkin
Package
pi-napkin
Version
0.2.3
Published
Apr 23, 2026
Downloads
544/mo ยท 183/wk
Author
miclivs
License
MIT
Types
extension, skill
Size
44.5 KB
Dependencies
1 dependency ยท 3 peers
Pi manifest JSON
{
  "extensions": [
    "extensions/napkin-context",
    "extensions/distill"
  ],
  "skills": [
    "skills"
  ]
}

Security note

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

README

pi-napkin

๐Ÿงป Napkin integration for pi.

Install

npm i -g napkin-ai
pi install npm:pi-napkin

What you get

Extensions

napkin-context โ€” On session start, injects the vault overview into the agent's context. Registers two tools:

  • kb_search โ€” Search the vault by keyword or topic
  • kb_read โ€” Read a note from the vault by name or path

napkin-distill โ€” Automatic knowledge distillation. Runs on a timer (default: 60 min), forks the conversation, and uses a cheap model to extract structured notes into the vault. /distill triggers it manually.

Skill

The napkin skill gives the agent full CLI reference for napkin โ€” all commands, flags, and patterns.

Vault resolution

Both extensions resolve the vault in this order:

  1. Local project vault โ€” walk up from cwd looking for .napkin/
  2. Global fallback โ€” read ~/.pi/agent/napkin.json for a default vault path
// ~/.pi/agent/napkin.json
{
  "vault": "~/.pi/agent/kb"
}

Local project vaults take priority when present.

Distillation config

Enable distillation in the vault's .napkin/config.json:

napkin --vault ~/.pi/agent/kb config set --key distill.enabled --value true
Setting Default Description
distill.enabled false Enable automatic distillation
distill.intervalMinutes 60 Timer interval
distill.model.provider "anthropic" Model provider
distill.model.id "claude-sonnet-4-6" Model for distillation

License

MIT