GitHubBlog

Search Documentation

Search for a page in the docs

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

CommandPortDescription
pnpm dev3002Backend with watch mode. Serves the pre-built UI after pnpm build.
pnpm dev:ui5173Frontend 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.

The history pane scrolls infinitely upward: as you scroll past the loaded window, older messages page in from the session file, so long-running conversations stay browseable without truncation.

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)",
    "profile": "research-gpt",
    "disabledTools": ["placeOrder", "tradingCommit", "tradingPush"]
  },
  {
    "id": "conservative",
    "label": "Conservative Trading",
    "systemPrompt": "You are a conservative trader. Never suggest more than 5% of equity per position."
  }
]

The profile field references a named profile in ai-provider-manager.json. Omit it to fall back to the global activeProfile. 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
  • FX rates sidebar — Live FX rates for currency-aware portfolio aggregation

Pages

Beyond the main chat and portfolio surface, the Web UI ships several dedicated pages:

PageWhat it shows
AutomationScheduler (cron + heartbeat), Logs, Flow graph, Webhook ingest surface. Hot-toggles for heartbeat; job execution history
DiaryHeartbeat session as a read-only card feed — Alice's periodic thoughts with tool-call groups, auto-polls every 60s
LogsEvent log viewer and tool-call log
DevTabs for Connectors, Tools inventory, Sessions, and Snapshots management (including manual snapshot capture)
NewsLive news feed with lookback + source filters, auto-refreshes every 60s
UTA DetailPer-account page at /uta/:id — account info, positions, orders, market clock, manual order entry; polls every 15s

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 Alice can execute trades.

Manual order entry. The UTA Detail page (/uta/:id) also exposes a manual order form that bypasses the AI entirely — you fill in the order directly and the route bundles stage → commit → push into one HTTP roundtrip. Useful when you want to trade on a specific account without going through chat.

Config Management

The Web UI provides a settings panel for editing all JSON config files. Supported sections (all hot-reloaded on save):

engine, agent, crypto, securities, market-data, compaction, ai-provider-manager, heartbeat, snapshot, connectors, news, tools, accounts, web-subchannels.

Changes are written directly to the config files and take effect immediately — no restart needed.

API Routes

The Web UI exposes a REST API for programmatic access:

RouteDescription
POST /api/chatSend a message (SSE streaming response)
GET /api/eventsEvent 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