Multi-Agent LLM Trading System with Governed Execution
Built a multi-agent AI trading floor that runs unattended on a schedule. Each cycle, five specialized GLM analysts independently assess the market from their domain — macro regime, news sentiment, technical structure, portfolio risk, and historical trade memory. Their briefings feed a Desk Chief LLM that synthesizes consensus, weighs disagreements, and emits a structured trade plan. A deterministic risk governor then re-validates every action against hard limits (ATR stops, 2:1 R/R, concentration caps, kill switches) before submitting bracket orders to Alpaca. The AI decides WHAT to trade; the risk manager is authoritative on HOW MUCH; the kill switch overrides everything. Includes a real-time Dockerized dashboard with 7 tabs tracking equity, performance, AI decision history, strategies, positions, trades, and analysis.

Retail algorithmic trading systems are either fully deterministic (rigid, miss context) or fully LLM-driven (unsafe, hallucinate sizes, ignore risk limits). Neither captures how a real trading desk operates: multiple specialists debating, a chief making the call, and a compliance layer enforcing hard constraints. I wanted to model that workflow — autonomous, context-aware, but risk-governed by hard math, never LLM-interpreted.
Designed a multi-agent pipeline: Market Data → Context Builder → 5 Analysts → Desk Chief (GLM) → Risk Governor → Execute. Each analyst runs an independent LLM call with domain-specific prompts and data slices. The Desk Chief reads all five briefings plus the live portfolio state and produces a JSON trade plan with explicit reasoning, consensus notes, and disagreements. A governed executor then re-validates sizing, concentration, and portfolio limits regardless of what the plan says — the chief decides, the executor governs. The entire loop runs on cron via Hermes Agent, delivering compact briefings to Discord after each cycle.
Explore the main capabilities and functionality of this project
Macro, News, Technical, Risk, and Memory analysts each run independent GLM calls with domain-specific prompts, then brief the Desk Chief
AI decides WHAT to trade; risk governor enforces HOW MUCH — ATR stops, 2:1 R/R, concentration caps, kill switches, all hard math
Momentum ROC, mean reversion, volume-price, volatility regime, trend persistence, volume-weighted, and multi-factor — each independently backtested
Dockerized FastAPI + React dashboard with 7 tabs: equity curve, performance, AI cycle history, strategies, positions, trades, and analysis
VIX/VIXY + SPY trend drives a 0.25×–1.0× risk multiplier that scales all position sizes — risk-on/off/neutral detected deterministically
Supermemory-backed recall of past analyst findings, regime patterns, and lessons — injected as context at the start of each cycle
Key challenges faced during development and how they were solved
Technologies and tools used to build this project
Separating "AI decides what" from "risk manager decides how much" is the key to safe LLM-driven trading
Multi-agent consensus should act on majority conviction, not unanimity — requiring full agreement causes decision paralysis
Signal-flip exits need confirmation bars and earnings grace windows to avoid selling at intraday lows on noise
Small samples (N<10) are statistically meaningless — a losing streak is not evidence a strategy is broken
Opportunity cost matters: hoarding cash is a failure mode, not safety. The risk manager must flag under-deployment
I'd love to discuss this project in detail and share insights about the development process.