npm i -g napkin-ai
pi install npm:pi-napkinnapkin-context — On session start, injects the vault overview into the agent's context. Registers two tools:
kb_search— Search the vault by keyword or topickb_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.
The napkin skill gives the agent full CLI reference for napkin — all commands, flags, and patterns.
Both extensions resolve the vault in this order:
- Local project vault — walk up from cwd looking for
.napkin/ - Global fallback — read
~/.pi/agent/napkin.jsonfor a default vault path
// ~/.pi/agent/napkin.json
{
"vault": "~/.pi/agent/kb"
}Local project vaults take priority when present.
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 |
MIT