How jemplayer82/ai-trading-desk works
ai-trading-desk is a self-hosted, multi-agent trading research dashboard. A user submits a ticker; the web runner invokes the analysis orchestrator, which gathers market data, runs analyst and debate stages, and produces a trading decision streamed to the browser. Separate scheduled workflows add Schwab portfolio scans, S&P 500 research and paper allocation, and daily options paper trading. The graph reflects README-described capabilities; unsampled subsystem links are included only where the README or source index supports them.
Main entry points: switchboard_orchestrator.py Analysis orchestrator · spy_scanner.py S&P scanner · portfolio_routes.py Schwab portfolio scan · options_engine.py Options trading
Components 24
Web experience
- Dashboard API
web/main.py - Live streaming
web/runner.py - Agent Bus
web/bus_mirror.py - Alerts and briefing
web/alerts.py
Trading analysis
- Analysis orchestrator
tradingagents/orchestrator/switchboard_orchestrator.py - Market analysts
tradingagents/agents/analysts - Research debate
tradingagents/agents/researchers - Trade decision
tradingagents/agents/trader/trader.py - Risk and portfolio review
tradingagents/agents/risk_mgmt
Data and models
- Agent tools
tradingagents/agents/utils/agent_utils.py - Market data sources
tradingagents/dataflows - LLM clients
tradingagents/llm_clients
Scheduled research
- Shared daily research
web/research_engine.py - S&P scanner
web/spy_scanner.py - Equity allocator
web/spy_allocator.py - Options trading
web/options_engine.py - Schwab portfolio scan
web/portfolio_routes.py - Job scheduler
web/scheduler.py
Persistence and policy
- SQLite state
web/db.py - Account risk policy
web/account_policy.py
Other components
- Trader
- Browser
- Schwab services
- LLM providers
Connections 27
- Trader → Dashboard API: submits analysis
README.md - Dashboard API → Live streaming: starts run
README.md - Live streaming → Analysis orchestrator: invokes
web/runner.py - Analysis orchestrator → Market analysts: runs analysts
tradingagents/orchestrator/switchboard_orchestrator.py - Analysis orchestrator → Research debate: runs debate
README.md - Analysis orchestrator → Trade decision: builds decision
README.md - Analysis orchestrator → Risk and portfolio review: reviews trade
README.md - Analysis orchestrator → Agent tools: uses tools
tradingagents/agents/utils/agent_utils.py - Agent tools → Market data sources: fetches data
tradingagents/agents/utils/agent_utils.py - Analysis orchestrator → LLM clients: creates clients
tradingagents/orchestrator/switchboard_orchestrator.py - LLM clients → LLM providers: queries models
README.md - Live streaming → Browser: streams progress
README.md - Analysis orchestrator → Agent Bus: publishes activity
README.md - Job scheduler → Shared daily research: schedules daily run
README.md - Shared daily research → S&P scanner: feeds research
web/research_engine.py - S&P scanner → Equity allocator: allocates portfolio
README.md - Shared daily research → Options trading: feeds allocations
web/options_engine.py - Job scheduler → Options trading: schedules trading
README.md - Job scheduler → Schwab portfolio scan: schedules scans
README.md - Schwab portfolio scan → Schwab services: reads account
README.md - S&P scanner → SQLite state: persists scans
web/spy_scanner.py - Options trading → SQLite state: records positions
web/options_engine.py - Schwab portfolio scan → SQLite state: stores results
web/portfolio_routes.py - Options trading → Account risk policy: applies guardrails
web/options_engine.py - S&P scanner → Account risk policy: applies stops
web/account_policy.py - Schwab portfolio scan → Alerts and briefing: sends briefing
README.md - Dashboard API → SQLite state: stores app state
web/db.py