Multi-Sport Scanner Pipeline & Bodhi Prism Agent Facade
multi-league ingestion through a unified agent interface
Published: 2026-06-25 | Project: Bet Bodhi | Discipline: Cognitive AI & Multi-Agent Swarms
Author: Nicholas Alexander MacAskill — Founder, CEO & CTO, Flocano Labs | Canonical: https://www.nicholasmacaskill.com/dossier/bodhi-scanner-prism
Bodhi Scanner Execution Pipeline
The Bodhi Scanner (daily-scanner.ts) is the automated entrypoint for discovering and evaluating +EV opportunities across Polymarket sports markets. Each invocation runs a deterministic sequence:
Start Scan → Sync Live Bets & Bankroll → Fetch Sports Slate
→ Fetch Traditional Odds & CLOB Markets → Resolve Matchups to Conditions
→ Run Pillar Analyzer per Game → Check Circuit Breaker → Export scan-results.jsonMulti-Sport Data Ingestion
The scanner fetches schedule, lineup, and roster data concurrently across four permitted sport-specific engines:
| Engine | Data Ingested |
|---|---|
| MLB | Pitching matchups, daily lineups, platoon splits, bullpen fatigue, hot hitter lists |
| NBA | Team form, rosters, schedules |
| MMA | Card lineups, location, fighter metrics |
| KBO | Starting pitchers, team stats, linescores |
Market Resolution & Pillar Routing
For each retrieved matchup, the scanner queries active sports markets from the Polymarket Gamma API. Mascot-based fuzzy matching resolves team names in market question text (e.g. "Marlins" vs "Angels"), with a getMarketByTeams fallback. Matched games route to the corresponding sport-specific PillarAnalyzer for three-pillar confidence scoring.
Bodhi Prism: Unified Agent Facade
BodhiPrism collapses isolated scripts and analyzer classes into a single clarity layer for autonomous AI agents:
export class BodhiPrism {
async scanMLB(date: string, bankroll: number) { /* schedule → pillar → EV threshold filter */ }
async scanNBA(date: string, bankroll: number) { /* roster/fatigue → pillar → EV threshold filter */ }
async getUserState() { /* bankroll + performance from Supabase */ }
async analyzeBiases() { /* chase-win / overconfidence detection */ }
async checkSlump() { /* stake throttle on losing streaks */ }
async recordBet(entry: BetLogEntry) { /* psychometric logging to Supabase */ }
}Agents call Prism methods instead of invoking scripts directly — scanning, bankroll state, bias analysis, circuit breakers, and bet logging share one interface.