pi-timestamp
Pi extension — inject timestamp via system prompt + custom message
Package details
Install pi-timestamp from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-timestamp- Package
pi-timestamp- Version
2.0.0- Published
- May 30, 2026
- Downloads
- not available
- Author
- soul_of_arcane
- License
- MIT
- Types
- extension
- Size
- 4.5 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./timestamp.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-timestamp
Pi extension — injects a timestamp into the conversation via system prompt + custom message.
Features
- LLM knows the time via system prompt injection
- Clean user messages — no timestamp pollution in message history
- Visual time label — displayed as a custom message tag (
⏱ [05/30 22:15 Asia/Shanghai]) - Cache-friendly — user message history stays stable for prefix cache hits
- Interval mode — configurable time gap to save tokens (default 15 min)
Install
pi install npm:pi-timestamp
Configuration
# Interval between timestamps (minutes, default: 15, 0 = every message)
export TIMESTAMP_INTERVAL_MINUTES=15
How it works
Uses before_agent_start to inject:
- A system prompt append with current time (LLM sees it)
- A custom message for TUI display (you see it as a tag)
This avoids modifying user input, keeping message history clean.
License
MIT