Advanced Resources
Agent TUI
Terminal User Interface for debug logs and status of local agent
Features
🎨 Visual Dashboard
- Pitchfork ASCII Art: Prominent branding header
- Real-time Stats: Agent info, connection status, active bots, system metrics
- Color-coded Logs: Different colors for log levels and services
- Interactive Controls: Keyboard navigation and filtering
📊 Dashboard Components
Header Section
- Agent name, ID, and version
- Connection status (Online/Offline/Busy)
- Active bot count
- System metrics (CPU, Memory)
- Uptime counter
Log Window
-
Scrollable log output with vim-like navigation
-
Log Level Colors:
- 🔴 ERROR: Red/bright red
- 🟡 WARN: Yellow/orange
- 🔵 INFO: Blue/cyan
- 🟢 DEBUG: Green/dim
-
Service Colors:
- 🟣 AGENT: Purple/magenta
- 🟢 PYTHON: Green
- 🔵 CLIENT: Blue
- 🟨 WRAPPER: Cyan
- 🟠 WEBACTION: Yellow
- 🩷 BOT: Pink
Control Panel
- Current filter status
- Scroll position indicator
- Keyboard shortcuts reference
Usage
Starting the Agent with TUI
The TUI is enabled by default. Simply run the agent:
./agentDisabling TUI Mode
To run in traditional text mode:
./agent -no-tuiKeyboard Controls
Navigation
↑/↓orj/k: Scroll logs up/downqorCtrl+C: Quit application
Log Level Filters
d: Toggle Debug logsi: Toggle Info logsw: Toggle Warn logse: Toggle Error logs
Service Filters
1: Toggle Agent logs2: Toggle Python logs3: Toggle Client logs4: Toggle Wrapper logs5: Toggle WebAction logs6: Toggle Bot logs
Control Actions
p: Pause/Resume log scrollingc: Clear log bufferr: Reset all filters
Automatic Headless Detection
The agent automatically disables TUI mode in clearly headless environments:
- CI/CD environments (CI=true or CONTINUOUS_INTEGRATION=true)
- Docker containers without TTY (DOCKER_CONTAINER=true + no terminal)
- Dumb terminals (TERM=dumb)
- No terminal (no stdin/stdout terminal + empty TERM)
Note: The detection is now more conservative and favors enabling TUI when uncertain. Use AGENT_FORCE_TUI=true to override detection if needed.
Log File Integration
Even with TUI enabled, you can still write logs to a file:
# TUI display + file logging
./agent -log-file agent.log
# Text mode with file logging
./agent -no-tui -log-file agent.logTroubleshooting
TUI Won't Start
- Check terminal compatibility: Ensure your terminal supports ANSI colors
- Verify terminal size: TUI requires minimum terminal dimensions
- Check environment: May auto-disable in headless environments
- Set
AGENT_FORCE_TUI=trueto override headless detection - Use
AGENT_TUI_MODE=trueto explicitly enable TUI
- Set
- Check TUI flag: Ensure you're not using
-no-tuiflag
Performance Issues
- Reduce log buffer: Use
-tui-buffer 500for lower memory usage - Increase update interval: Use
-tui-update-interval 1sfor less frequent updates - Filter logs: Disable debug logs with
dkey if too verbose
Display Issues
- Terminal encoding: Ensure UTF-8 support for ASCII art
- Color support: Some terminals may not display all colors correctly
- Resize handling: TUI automatically adapts to terminal resize
Was this page helpful?