@e9n/pi-web-dashboard
Live agent dashboard for pi — SSE streaming, session view, and prompt submission
Package details
Install @e9n/pi-web-dashboard from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@e9n/pi-web-dashboard- Package
@e9n/pi-web-dashboard- Version
0.3.0- Published
- Apr 26, 2026
- Downloads
- 209/mo · 160/wk
- Author
- e9n
- License
- MIT
- Types
- extension
- Size
- 75.8 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
@e9n/pi-web-dashboard
Live agent dashboard with SSE streaming for pi — watch agent activity in real-time and submit prompts from the browser.
Features
- Live event stream — SSE feed of agent lifecycle events (start/end, turns, tool calls, responses)
- Prompt submission — send prompts to the agent from the browser (rate-limited: 10/min per IP)
- Slash command routing —
/commandsare dispatched via event bus (extensions), expanded from disk (skills/templates), or sent as literal text (unknown) - Command listing —
GET /api/dashboard/commandsreturns available slash commands for autocomplete - Auto-cleanup — closes all SSE connections on shutdown
- Requires pi-webserver — mounts automatically when pi-webserver is ready
Web UI
Mounts on pi-webserver at session start (listens for web:ready):
| Route | Method | Description |
|---|---|---|
/dashboard |
GET | Dashboard HTML (dashboard.html) |
/api/dashboard/commands |
GET | List available slash commands |
/api/dashboard/events |
GET | SSE event stream |
/api/dashboard/prompt |
POST | Submit a prompt — auto-routes /commands |
/api/dashboard/stop |
POST | Abort the running agent |
/api/dashboard/config |
GET | Status: SSE client count, server time |
SSE events
| Event type | Fields | Description |
|---|---|---|
user_message |
text, time |
User submitted a prompt (non-command) |
command_dispatched |
command, args, time |
Slash command routed (extension/skill/template) |
connected |
time |
Initial connection handshake |
agent_start |
time |
Agent loop started |
agent_end |
time |
Agent loop finished |
turn_start |
turn |
New turn began |
turn_end |
turn, text, toolResults |
Turn completed with response text |
tool_start |
toolName, toolCallId |
Tool execution started |
tool_end |
toolName, isError, preview |
Tool execution finished (first 200 chars of output) |
Install
pi install npm:@e9n/pi-web-dashboard
License
MIT