AI Assistant

AI Assistant — Ask & Refresh

The dashboard floating widget lets operators ask grounded questions about open and closed trades, strategies, config, and live market state, and refresh AI market analysis on demand. It is read-only and advisory: it may suggest existing operator commands (e.g. /close_smart <tag>) but never places or closes orders — confirm suggested actions in Telegram.

Backed by arb_bot/ai/assistant.py (TradingAssistant) and arb_bot/ai/context.py (read-only context pack), using the same headless codex exec transport as the prediction engine. Every answer is grounded in the provided context pack — the model never fabricates numbers. Chat turns are persisted to ai_chat_messages. Endpoints: POST /api/ai/ask, POST /api/ai/refresh, GET /api/ai/chat/history.