How suriyagb/hermes-trading-agent- works
Hermes is an AAPL options-wheel trading agent with separate trading, Telegram analyst, and web-dashboard services. The primary flow is a scheduled market pulse: gather market and option data, obtain a constrained AI decision, apply execution safeguards, then persist portfolio and decision history and send an alert. The dashboard and assistant read that stored state. The README documents these service boundaries; sampled source confirms database writes and dashboard API configuration, but several internal call paths were not shown, so those links rely on the README.
Main entry points: executor.py Trade executor · assistant.py RAG analyst · get_ibkr_analysis.py Market analysis · call_brain_direct.py Decision brain
Components 19
Trading engine
- Market analysis
core/get_ibkr_analysis.py - Decision brain
core/call_brain_direct.py - Trade executor
core/executor.py - Paper execution
core/sim_executor.py - IBKR execution
core/executor.py
Telegram analyst
- Message listener
core/telegram_listener.py - RAG analyst
core/assistant.py
Web dashboard
- Dashboard pages
frontend/src/app - Navigation settings
frontend/src/components/Sidebar.js - API configuration
frontend/src/utils/api.js - Read-only API
core/api.py
Portfolio memory
- Decision database
core/database.py - Portfolio state
data
Other components
- Scheduled pulse
- Telegram user
- Telegram service
- Dashboard user
- Market data sources
- GPT-4o
Connections 21
- Scheduled pulse → Market analysis: starts pulse
README.md - Market analysis → Market data sources: fetches quotes
README.md - Market analysis → Decision brain: sends analysis
README.md - Decision brain → GPT-4o: requests decision
README.md - Decision brain → Trade executor: returns token
README.md - Trade executor → Decision database: records trades
core/executor.py - Trade executor → Portfolio state: updates state
README.md - Trade executor → Paper execution: selects simulation
- Trade executor → IBKR execution: selects live trades
core/executor.py - Trade executor → Telegram service: sends alert
README.md - Telegram user → Message listener: sends query
README.md - Message listener → RAG analyst: forwards query
README.md - RAG analyst → Decision database: reads history
README.md - RAG analyst → Portfolio state: reads state
README.md - RAG analyst → Telegram service: sends reply
README.md - Dashboard user → Dashboard pages: views pages
README.md - Dashboard pages → API configuration: resolves API
frontend/src/app/page.js - Navigation settings → API configuration: resolves endpoints
frontend/src/components/Sidebar.js - Dashboard pages → Read-only API: requests dashboard data
README.md - Read-only API → Decision database: reads history
README.md - Read-only API → Portfolio state: reads files
README.md