@amolith/pi-personas

Switchable agent personas for Pi

Packages

Package details

extension

Install @amolith/pi-personas from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@amolith/pi-personas
Package
@amolith/pi-personas
Version
0.1.0
Published
Jun 5, 2026
Downloads
491/mo · 14/wk
Author
amolith
License
unknown
Types
extension
Size
12.1 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

@amolith/pi-personas

pi-personas on NPM Licensed under MutuaL-1.2 REUSE status scratchanitch.dev badge Liberapay donation status

Code with a grumpy senior today and work with a patient tutor tomorrow. Switch between them with /persona. The active one persists across sessions until changed. Setting a persona prior to startup appends it to the system prompt. Changing it mid-session sends the persona content as a steering message.

Personas are loaded from persona-name.md files in $PI_CODING_AGENT_DIR/personas/. /persona is interactive and /persona grug sets it directly.

Install

pi install npm:@amolith/pi-personas

Write personas

Create one markdown file per persona in $PI_CODING_AGENT_DIR/personas/:

$PI_CODING_AGENT_DIR/personas/grumpy-senior.md
$PI_CODING_AGENT_DIR/personas/patient-tutor.md

The file name without .md is the persona name. That's what /persona and the persona setting use.

Switch personas

Open an interactive picker:

/persona

Switch directly:

/persona patient-tutor

Clear the active persona:

/persona none

unset and clear also clear the active persona.

Remember the active persona

The active persona persists as the persona key in $PI_CODING_AGENT_DIR/settings.json:

{
  "persona": "patient-tutor"
}

The extension only accepts persona names that match markdown files under $PI_CODING_AGENT_DIR/personas/.

What happens when it changes

If a persona is set before startup, the extension reads it at session start and appends it to the system prompt for the lifetime of the session.

When you set or clear a persona mid-session, the extension updates the setting immediately and sends a one-shot hidden reminder message. It does not rewrite the session's system prompt mid-stream.