TUI Reference
Full-featured terminal UI built with Textual. Keyboard-first, live-updating agent management.
Setup
cd clients/tui
pip install -r requirements.txt
python -m tui
Global Keybindings
Available from any screen:
| Key | Action |
|---|---|
Ctrl+C | Quit application |
1 | Switch to Dashboard |
2 | Switch to Create Agent |
3 | Switch to Log Viewer |
4 | Switch to ASCII Lab |
5 | Switch to Leaderboard |
Dashboard
Main screen. Left panel lists agents with live PnL, right panel shows details for the selected agent (Overview, Strategy, Models, Config).
Agents poll every 2s. Running agents show green dot, stopped show red. Risk tags: [C] conservative, [M] moderate, [A] aggressive.
Keybindings
| Key | Action |
|---|---|
a | Create new agent |
s | Start selected agent |
f | Start all stopped agents |
d | Delete selected agent |
p | Stop selected agent |
c | Stop all running agents |
r | Refresh agent list |
e | Edit selected agent |
b | Open leaderboard |
o | Toggle leaderboard opt-in for selected agent |
Create Agent Form
5 form sections with all configuration options:
| Section | Fields |
|---|---|
| Identity | Agent Name, Token Symbol |
| Trading Config | Amount (USDT), Leverage (1–125), Timeframe, Poll Interval (s), Risk Profile (Conservative / Moderate / Aggressive) |
| TP / SL | Mode (Fixed / Dynamic ATR), Take Profit %, Stop Loss % |
| Execution + Supervisor | Mode (Paper Trading / Live), Supervisor Interval (30–300s) |
| API Keys | Exchange API Key, Exchange Secret, LLM API Key, LLM Provider (OpenAI / Anthropic / Gemini / DeepSeek) |
Press Launch to create or Escape to cancel.
Edit Agent
8 editable fields — leave empty to skip:
| Field | Type |
|---|---|
| Agent Name | text |
| Amount (USDT) | number |
| Leverage | integer (1–125) |
| Risk Profile | conservative / moderate / aggressive |
| Take Profit % | number (empty for auto) |
| Stop Loss % | number (empty for auto) |
| Supervisor Interval | seconds |
| Poll Interval | seconds |
Live agent edits
TP/SL/amount changes apply immediately. Leverage and LLM changes trigger an agent restart.
Press Save to apply or Escape to cancel.
Leaderboard
Top 20 agents globally. Columns: Rank, Agent, Symbol, Owner, Strategy, Trades, PnL, Win%, Sharpe. Top 3 get medal labels.
| Key | Action |
|---|---|
Escape | Back to dashboard |
r | Refresh rankings |
Log Viewer
Real-time log streaming with filtering:
| Control | Function |
|---|---|
| Agent select | Choose which agent to tail |
| Level filter | ALL, INFO, LLM, ERROR, TICK |
| Search | Text filter on log messages |
| Auto-scroll | Toggle to pin to latest entries |
Log Level Categories
| Filter | Includes |
|---|---|
| ALL | Everything |
| INFO | init, start, action, sl_tp, stop |
| LLM | llm, supervisor |
| ERROR | error, warn |
| TICK | tick |
Logs are color-coded: errors red, warnings yellow, LLM/supervisor cyan, actions green, sl_tp magenta, ticks dim.
Press Escape to return to dashboard.
ASCII Lab
Easter egg — 3D rotating $ sign rendered in ASCII art with ray-marched lighting. Press Escape to go back.
