
Sentinel Gate is an autonomous options trading agent built for the Alpaca AI Trading Agents Hackathon. Each reasoning cycle, Claude (Sonnet 5) sees a fresh account snapshot, a pre-fetched market scan — quotes, a sector- momentum leaderboard across the 10 SPDR sector ETFs, news, and market movers — and reasons live over option chains through Alpaca's official MCP server to decide what to trade. The read path and write path never touch. Claude's MCP tools are read-only by construction; the only way an order reaches the account is through a custom propose_trade tool that runs a fixed sequence of deterministic risk gates in code — market hours, a hard allowlist of seven defined-risk strategies only (no naked/undefined-risk options, ever), a real max-loss figure, a position sizing cap, and a per-symbol cooldown — before execute_trade is even called. A separate 60-second code-only loop handles stop-loss and take-profit, since Alpaca doesn't support OCO/bracket orders for options. Within those rails, Claude owns the actual judgment: which of seven structures fits an idea, which side of implied volatility to be on, whether a sector is confirming or fighting a single-name thesis, and when a position's reason for existing has broken and it's time to exit. Built and operated live for the full competition week, including finding and fixing three real production incidents same-day — an upstream dependency break, a multi-leg naked-position risk in the protective loop, and a position-counting bug that was silently capping trade volume. 79 unit tests cover the risk-gate layer.
4 Sep 2026