Web UI
The Web UI is a local chat interface built on Hono with real-time SSE streaming. It's always-on — no enable flag needed.
Ports
| Command | Port | Description |
|---|---|---|
pnpm dev | 3002 | Backend with watch mode. Serves the pre-built UI after pnpm build. |
pnpm dev:ui | 5173 | Frontend dev server (Vite) with hot reload. Proxies to port 3002. |
For production, pnpm build bundles the frontend into the backend — everything runs on port 3002.
The port is configurable in data/config/connectors.json:
{
"web": { "port": 3002 }
}
Chat Interface
The chat interface streams AI responses in real-time via Server-Sent Events (SSE). Multiple browser tabs can connect simultaneously — each tab gets its own SSE connection, and all tabs see the same conversation in the default channel.
Sub-Channels
Sub-channels let you run multiple independent conversations with different AI configurations. Each sub-channel can override:
- System prompt — Different persona or instructions
- AI provider — Different model or backend
- Disabled tools — Restrict which tools are available
Configure in data/config/web-subchannels.json:
[
{
"id": "research",
"label": "Research (GPT-4o)",
"provider": "vercel-ai-sdk",
"vercelAiSdk": {
"provider": "openai",
"model": "gpt-4o",
"apiKey": "sk-..."
},
"disabledTools": ["placeOrder", "tradingCommit", "tradingPush"]
},
{
"id": "conservative",
"label": "Conservative Trading",
"systemPrompt": "You are a conservative trader. Never suggest more than 5% of equity per position."
}
]
Each sub-channel gets its own session file (data/sessions/web/{id}.jsonl), so conversations are completely independent.
Portfolio Dashboard
The Web UI includes a portfolio dashboard that shows:
- Equity curve — Built from snapshot history
- Current positions — Live positions with unrealized P&L
- Account info — Net liquidation, cash, buying power
Trading Approval
When Alice calls tradingPush, the Web UI shows the pending operations for your review. You can approve or reject the push directly in the interface — this is the only way to execute trades.
Config Management
The Web UI provides a settings panel for editing all JSON config files:
- AI provider switching
- Account management (add/remove/enable/disable)
- Guard configuration
- Cron job management
- Heartbeat toggle
- Tool enable/disable
- Connector management
Changes are written directly to the config files and take effect immediately (hot-reload).
API Routes
The Web UI exposes a REST API for programmatic access:
| Route | Description |
|---|---|
POST /api/chat | Send a message (SSE streaming response) |
GET /api/events | Event log queries |
GET /api/trading/* | Trading data (portfolio, orders, snapshots) |
GET/POST /api/config/* | Config read/write |
GET/POST /api/cron/* | Cron job management |
GET/POST /api/heartbeat/* | Heartbeat control |
GET/POST /api/accounts/* | Account management |