@npm-ken/pi-prime-session
User-managed durable memory for priming Pi agent sessions
Package details
Install @npm-ken/pi-prime-session from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@npm-ken/pi-prime-session- Package
@npm-ken/pi-prime-session- Version
1.1.0- Published
- Aug 26, 2026
- Downloads
- 196/mo · 25/wk
- Author
- npm-ken
- License
- unknown
- Types
- extension
- Size
- 11.5 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Prime
A Pi extension for user-managed durable Primes: Markdown guidance stored outside the agent's command surface.
Install
Install the package with Pi, then restart or reload Pi:
pi install npm:@kenbanks-peng/pi-prime
/prime command
Running /prime displays its command interface, with one operation per line.
/prime list [global|project]displays Global Primes followed by Project Primes by default. Each Prime ends with its ID in brackets, for example[prime-5fdd69c9]. Add a scope to display only that scope. Empty scopes display asglobal: noneorproject: none./prime add [global|project]opens the Pi editor to author a Project Prime by default. Addglobalto add a Global Prime./prime edit <id>opens the matching Prime in the Pi editor. The ID determines its scope./prime delete <id>deletes the matching Prime. The ID determines its scope.
The extension assigns each added Prime a short unique ID such as prime-5fdd69c9 for its Markdown filename. The ID is shown after addition and identifies the Prime in list output; users never need to define one.
Global Primes live in ~/.agents/share/prime; Project Primes live in .agents/prime under the current project. Directories are created only when a user adds a Prime.
At the start of each agent run, Pi receives the combined Prime content as a hidden persistent message, outside the system prompt, in this form:
<prime_memories>
<memory>Global guidance</memory>
<memory>Project guidance</memory>
</prime_memories>