Pi
pi (pi)
Section titled “pi (pi)”pi uses a managed Signet runtime extension installed by
@signetai/connector-pi. The extension forwards lifecycle events
to the daemon and injects hidden Signet context into the session when
needed.
Files managed by Signet
Section titled “Files managed by Signet”| File | Description |
|---|---|
PI_CODING_AGENT_DIR/extensions/signet-pi.js |
Managed extension bundle when PI_CODING_AGENT_DIR is set |
~/.pi/agent/extensions/signet-pi.js |
Managed extension bundle in the default pi agent directory |
Managed extension
Section titled “Managed extension”During setup or connect, the connector writes a bundled
signet-pi.js file into the pi extensions directory. If
PI_CODING_AGENT_DIR is set, Signet uses that agent directory.
Otherwise it writes to ~/.pi/agent/extensions/.
Runtime behavior
Section titled “Runtime behavior”- Existing unrelated pi extensions are left untouched.
- Signet refuses to overwrite a colliding unmanaged
signet-pi.js. - Daemon or network failures are fail-open, so prompt handling, compaction, session switches, and shutdown continue even if Signet is unavailable.
- Automatic recall: On every user prompt, the extension automatically fetches relevant memories from the daemon and injects them as hidden messages (
display: false) into the agent’s context. These injections are kept out of transcript reconstruction. - Manual commands:
/recall <query>and/remember <content>let users explicitly search and store memories. The/recallcommand displays results in the UI only — it does not inject them into the conversation context./signet-statusshows connection and memory stats./remember <content>— save a memory/remember critical: <content>— save as pinned (never decays)/remember [tag1, tag2]: <content>— save with tags/remember critical: [tag1, tag2]: <content>— pinned with tags (critical prefix must come first)
- Agent tools:
signet_recall,signet_source_search,signet_session_search, andsignet_rememberare registered as LLM-callable tools. When the agent callssignet_recall, the results (including memory IDs) are returned into the conversation context via the tool response.signet_source_searchsearches provenance-backed artifacts separately from ordinary memory recall;signet_session_searchsearches active or completed session transcripts. - Hidden inject messages use
display: falseandrole: "custom". Pi converts custom messages torole: "user"for the LLM, so theX-Initiatorheader (which determines Copilot billing attribution) is set based on the last message’s role — extensions cannot override it via anattributionfield as Oh My Pi can. - Does not sync
AGENTS.mdinto pi.
Configuration
Section titled “Configuration”Configuration is optional and loaded from ~/.pi/agent/extensions/signet.json
(or $PI_CODING_AGENT_DIR/extensions/signet.json if set). The SIGNET_ENABLED
environment variable overrides the file setting.
Optional ~/.pi/agent/extensions/signet.json:
{ "enabled": false}| Option | Description | Default |
|---|---|---|
enabled |
Whether Signet is enabled by default | true |
Environment Variable (overrides file config):
| Variable | Description |
|---|---|
SIGNET_ENABLED |
Set to false to disable |
Examples:
# Use config file defaultspi
# Disable Signet for a single sessionSIGNET_ENABLED=false pi
# Create a config file to disable by defaultecho '{"enabled": false}' > ~/.pi/agent/extensions/signet.jsonSupported hooks
Section titled “Supported hooks”| Hook | Supported |
|---|---|
| session-start | yes |
| user-prompt-submit | yes |
| pre-compaction | yes |
| compaction-complete | yes |
| session-end | yes |