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:

KeyAction
Ctrl+CQuit application
1Switch to Dashboard
2Switch to Create Agent
3Switch to Log Viewer
4Switch to ASCII Lab
5Switch 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

KeyAction
aCreate new agent
sStart selected agent
fStart all stopped agents
dDelete selected agent
pStop selected agent
cStop all running agents
rRefresh agent list
eEdit selected agent
bOpen leaderboard
oToggle leaderboard opt-in for selected agent

Create Agent Form

5 form sections with all configuration options:

SectionFields
IdentityAgent Name, Token Symbol
Trading ConfigAmount (USDT), Leverage (1–125), Timeframe, Poll Interval (s), Risk Profile (Conservative / Moderate / Aggressive)
TP / SLMode (Fixed / Dynamic ATR), Take Profit %, Stop Loss %
Execution + SupervisorMode (Paper Trading / Live), Supervisor Interval (30–300s)
API KeysExchange 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:

FieldType
Agent Nametext
Amount (USDT)number
Leverageinteger (1–125)
Risk Profileconservative / moderate / aggressive
Take Profit %number (empty for auto)
Stop Loss %number (empty for auto)
Supervisor Intervalseconds
Poll Intervalseconds

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.

KeyAction
EscapeBack to dashboard
rRefresh rankings

Log Viewer

Real-time log streaming with filtering:

ControlFunction
Agent selectChoose which agent to tail
Level filterALL, INFO, LLM, ERROR, TICK
SearchText filter on log messages
Auto-scrollToggle to pin to latest entries

Log Level Categories

FilterIncludes
ALLEverything
INFOinit, start, action, sl_tp, stop
LLMllm, supervisor
ERRORerror, warn
TICKtick

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.