pi-speed-monitor
Interactive speed monitor panel for pi coding agent - tracks TTFT, TPS, token usage, and elapsed time per turn
Package details
Install pi-speed-monitor from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-speed-monitor- Package
pi-speed-monitor- Version
0.1.0- Published
- Jul 12, 2026
- Downloads
- 22/mo · 22/wk
- Author
- dreamtaco
- License
- MIT
- Types
- extension
- Size
- 27 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-speed-monitor
Interactive speed monitor panel for pi coding agent.
Tracks and displays per-turn performance metrics:
- TTFT (Time to First Token)
- TPS (Tokens Per Second)
- Input / Output tokens
- Elapsed time
Features
- Interactive panel with keyboard navigation (vim-style
jk+ arrow keys) - Three-phase indicator: TTFT (waiting) → 🧠 Thinking → ⚡ Output
- Live streaming metrics: real-time TPS and output token count during generation
- Per-turn breakdown: scroll through all turns, select any turn for detailed view
- Dual totals:
Σr(current round) +Σa(all-time) - Descending order: newest turns at top
Installation
pi install npm:pi-speed-monitor
Usage
/speed Open interactive panel
/speed clear Clear history
/speed off Stop monitoring
/speed on Resume monitoring
Keyboard Shortcuts
| Key | Action |
|---|---|
↑ / k |
Previous turn (newer) |
↓ / j |
Next turn (older) |
PgUp / PgDn |
Scroll by page |
g / Home |
Jump to newest |
G / End |
Jump to oldest |
Enter / Space |
Toggle details panel |
Esc / q |
Close panel |
Panel Layout
╭──────────────────────────────────────────────────────────────────────╮
│ ⚡ Speed Monitor │
│ │ Turn │ TTFT │ TPS │ Input │ Output │ Elapsed │ │
│ │──────┼────────┼─────────┼──────────┼──────────┼────────────│ │
│▶ │ 5│ 450ms│ 64│ 1.2K│ 830│ 13s│ │
│ │ 4│ 320ms│ 68│ 980│ 623│ 9s│ │
│ │──────┼────────┼─────────┼──────────┼──────────┼────────────│ │
│ │ Σr◀ │ 450ms │ 55│ 4.3K │ 3.0K │ 59s │ │
│ │──────┼────────┼─────────┼──────────┼──────────┼────────────│ │
│ │ Σa12 │ ─ │ 48│ 12.5K │ 8.2K │ 2m30s│ │
│ │
│ ◀ turn 5 │ phase:⚡ output │ ttft:450ms │ ~52 │ 830 tok │ elapsed:5s│
│ │
│ ── Turn #5 ── │
│ TTFT 450ms │
│ TPS 64 │
│ Input 1,234 tokens │
│ Output 830 tokens │
│ Elapsed 13.0s │
│ │
│ ↑↓/jk nav • g/G top/bottom • PgUp/PgDn scroll • Enter details │
╰──────────────────────────────────────────────────────────────────────╯
Metrics
| Metric | Description |
|---|---|
| TTFT | Time from turn start to first token (thinking or text, whichever first) |
| TPS | Output tokens / total turn wall time |
| Input | Total input tokens (cumulative context) |
| Output | Total output tokens (summed across assistant messages in turn) |
| Elapsed | Wall time from turn_start to turn_end |
| Σr | Current/most recent round (agent_start → agent_end, may span multiple turns) |
| Σa | All-time totals across all rounds |
License
MIT