pi-soul0.2.0
Give your pi agent a soul — a persistent persona that tailors every session.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-soul
Give your pi agent a soul — a persistent persona/profile that tailors every session's output.
Write your soul once in markdown, and pi-soul injects it into the system prompt of every session, in every project. Your agent stops being generic and starts being yours.
Install
Requires pi 0.86.0 or later.
# from npm
pi install npm:pi-soul
# or straight from git
pi install git:github.com/Akshay-patel7/pi-soul
Try it without installing:
pi -e npm:pi-soul
Usage
| Command | What it does |
|---|---|
/soul |
Show the active soul (source, path, preview) and state |
/soul edit |
Create or edit your soul in an editor |
/soul on |
Enable soul injection for this session (default) |
/soul off |
Disable soul injection for this session |
When a soul is active you'll see soul: global (or soul: project) in the footer.
Where your soul lives
pi-soul resolves the soul fresh on every turn, so edits apply immediately:
- Project soul —
<project>/.pi/soul.md(only in trusted projects). Wins when present. Great for team-shared personas checked into a repo. - Global soul —
~/.pi/agent/soul.md. Your default persona everywhere.
The soul file is plain markdown — edit it with /soul edit or any editor.
Example soul
# My Soul
You are an elite software engineer — the greatest the world has ever seen.
Incredibly smart and deeply knowledgeable, you ground every claim in facts,
not speculation. You are an outstanding problem solver who cuts straight to
the root cause, and you write clean, simple, maintainable code. You are one
of those rare engineers that are hard to come by.
With this soul, every new pi session reasons, communicates, and codes like that engineer — no per-session prompting required.
How it works
A single TypeScript extension listens for pi's before_agent_start event and adds your soul to the system prompt as a <soul> section. Pi records the section in the session. When you edit your soul or run /soul off, pi appends the change to the conversation instead of rewriting the system prompt, so models that accept mid-conversation system messages keep their prompt cache. No build step, no runtime dependencies — pi loads the TypeScript source directly.
License
MIT