PAI Unified Web Interface

Single URL for all PAI engines and tools:

https://pai-primary.taild73141.ts.net/

Quick Access

  • πŸ’¬ Chat (Alt+1) - OpenCode conversation
  • πŸ—‚οΈ Workspaces (Alt+2) - All sessions across engines
  • πŸ”Š Voice (Alt+3) - Voice player controls

Widgets (Bottom-Right)

  • πŸ’» Terminal (purple button or Ctrl+`) - Embedded tmux terminal
  • 🎀 Microphone (blue button or Ctrl+Shift+M) - Voice input (STT)
  • πŸ”Š Voice Status (green/gray) - Voice output indicator (TTS)

Workspaces View

URL: /workspaces

Shows all sessions grouped by engine in a card grid:

  • PNK (OpenCode) - Purple badge
  • PNC (Claude Code) - Blue badge
  • PNX (Codex) - Green badge
  • PNG (Antigravity) - Red badge

Opening Sessions

OpenCode (PNK):

  1. Click β€œOpen” button
  2. Session opens in current window
  3. Continue where you left off

Terminal Engines (PNC/PNX/PNG):

  1. Click β€œOpen” button
  2. Command copied to clipboard
  3. Open Terminal widget (πŸ’» or Ctrl+`)
  4. Paste and run command
  5. Session resumes in terminal

Services

All services auto-start on boot via systemd:

# OpenCode web GUI (port 8123)
systemctl --user status opencode-web.service
 
# PAI Pulse daemon (port 31337)
systemctl --user status pai-pulse.service
 
# Terminal web interface (port 7681)
systemctl --user status herdr-terminal-web.service

Architecture

OpenCode Web β†’ Tailscale HTTPS β†’ Pulse API β†’ Session Registry ↓ Terminal (ttyd)

Components:

  • OpenCode - Web GUI for PNK sessions
  • Pulse - Unified daemon (voice, sessions API, cockpit)
  • Herdr - tmux session management (PNC/PNX/PNG)
  • ttyd - Terminal web interface
  • Tailscale - Secure HTTPS proxy

Data Sources

Session Registry (~/.claude/PAI/Tools/SessionRegistry.ts):

  • PNK - OpenCode SQLite DB (~/.local/share/opencode/opencode.db)
  • PNC - Claude Code session-names.json
  • PNX/PNG - Herdr workspace API (future)

APIs:

  • GET /sessions - JSON session list
  • GET /workspaces - Workspaces UI
  • GET /sessions/ui - Detailed sessions table
  • GET /voice/player - Voice player interface

Keyboard Shortcuts

KeyAction
Alt+1Chat (OpenCode)
Alt+2Workspaces
Alt+3Voice Player
Ctrl+`Toggle Terminal
Ctrl+Shift+MVoice Input (STT)

Voice System

Status: Disabled per user preference (audio routing unclear)

When enabled:

  • TTS plays automatically in browser
  • STT activates via microphone button
  • Routing: Pulse β†’ Legion Voicebox β†’ Kokoro TTS

To enable: Update voice preferences in PAI settings

Troubleshooting

Can’t access web interface:

# Check OpenCode web service
systemctl --user status opencode-web.service
 
# Check Pulse daemon
systemctl --user status pai-pulse.service
 
# Check Tailscale
tailscale status

Sessions not showing:

# Rebuild session registry
bun ~/.claude/PAI/Tools/SessionRegistry.ts build
 
# Check API
curl http://localhost:31337/sessions

Terminal not working:

# Check ttyd service
systemctl --user status herdr-terminal-web.service
 
# Restart if needed
systemctl --user restart herdr-terminal-web.service

URLs Reference


Last Updated: 2026-07-07
Version: PAI 5.1.0 Unified Web Interface