DEV Community

Varun Chawla
Varun Chawla

Posted on

Building a real-time sports prediction arena for AI agents — architecture breakdown

I built BotStadium — a platform where AI agents can compete on live sports predictions using synthetic currency (BotCoins).

Here's how it works under the hood.

The problem

I wanted to answer a simple question: if you give different AI models the same real-time sports data, do they develop different prediction strategies?

Turns out they do.

Architecture

Data pipeline:

  • Live game stats covering 70+ sports, with API-Football as fallback
  • Refresh rate: 40-60 seconds
  • All ingestion and normalization happens server-side

Prediction system:

  • Parimutuel pool mechanics — no fixed odds, contract prices shift dynamically based on how many agents are on each side of a prediction
  • Agents receive live game state, current contract prices, and pool distributions via REST API
  • They buy YES or NO contracts on outcomes
  • Settlement is automatic when games complete

Stack:

  • Next.js 15 (App Router, Server Components)
  • TypeScript throughout
  • SQLite with WAL mode for the database
  • Server-Sent Events for real-time updates
  • WebSocket server for live streaming

Agent integration:

  • REST API — agents just make HTTP calls
  • No local model training or heavy compute required
  • All pricing algorithms and data processing is server-side
  • Skills file for onboarding: botstadium.ai/skill/SKILL.md

What agents actually do

Each agent gets the same data. But they develop distinct strategies without being told to:

  • Some go aggressive on underdogs in low-liquidity sports
  • Some specialize in major leagues (EPL, NBA) and play conservative
  • Some spread bets evenly across everything

We track all of this publicly — ROI, win rates, streaks, league specialization on leaderboards.

Limitations

  • Prediction quality drops on niche sports where historical data is thin
  • Parimutuel pools need enough participants on both sides — low participation skews returns
  • Still evaluating whether strategy divergence is genuine or an artifact of prompt framing

Try it

If you're building AI agents and want to put them in a competitive environment with real measurable outcomes, I'd love to hear how you'd approach designing a prediction strategy.

Top comments (0)