• # BetClaw Live

## Inspiration

Most betting products drop users straight into odds, pressure, and impulsive decisions. I wanted to build something slower, more deliberate, and more structured: a live agent that discusses strategy first, narrows the right leagues and fixtures, and only then moves toward slip creation. The bigger idea was to make football betting feel less like random guesswork and more like operating a disciplined betting desk built around planning, review, and controlled execution.

## What It Does

BetClaw Live is a voice-first football betting copilot built on top of BetClaw’s bankroll tracking system. Users speak their objective, choose leagues and time windows, fetch fixtures from the backend, select matches of interest, attach screenshots and context per fixture, and build dossiers before any slip is created. Gemini Live powers the real-time conversation, while the backend grounds the experience with fixtures, odds, bankroll-aware logic, and persistent track/session state.

The product is structured around three core layers:

  • BetTrack: the long-running bankroll plan, including target, remaining budget, temperament, and performance context
  • BetSession: the active betting cycle inside a track, where stake allocation and slip activity are grouped
  • BetSlip: the final output created from reviewed fixtures after dossier analysis

That means BetClaw Live is not just chatting about matches. It is reasoning inside an actual bankroll workflow.

## How I Built It

I built the frontend with Next.js and React, and the backend with Express and TypeScript. Gemini Live handles real-time audio conversation. The backend manages live session token creation, fixture retrieval, odds enrichment, fallback data generation, dossier analysis, and slip persistence into BetClaw’s existing track-session architecture.

The project flow is roughly:

$$ \text{Voice Intent} \rightarrow \text{League/Period Selection} \rightarrow \text{Fixture Fetch} \rightarrow \text{Dossier Review} \rightarrow \text{Analysis} \rightarrow \text{Slip Creation} $$

Underneath that user flow, the system follows a bankroll structure:

$$ \text{BetTrack} \rightarrow \text{BetSession} \rightarrow \text{BetSlip} $$

I also integrated:

  • Gemini Live for streaming voice interaction
  • a backend fixture pipeline using Sports API and Odds API
  • fallback synthetic fixtures and odds when external APIs fail
  • dossier-based evidence gathering for selected matches
  • verdict-driven analysis before slip creation
  • staged UI feedback so users can see where they are in the workflow
  • persistence so created slips are tracked inside the active BetTrack and BetSession context

## Challenges I Faced

The biggest challenge was making the live experience reliable enough to feel usable. Browser speech APIs were not enough, so I replaced them with real Gemini Live streaming. Audio formatting was another issue: getting microphone input into the PCM format Gemini expected took iteration.

The second major challenge was external sports data reliability. The Sports API free tier imposed season, parameter, rate, and daily quota limits. I had to redesign the backend so the product would not break when that source failed. That led to a fallback chain:

$$ \text{Sports API} \rightarrow \text{Odds API Fixtures} \rightarrow \text{Synthetic Fixtures} $$

That made the product demoable even when upstream services were constrained. Another important challenge was architectural: I did not want the live experience to exist as an isolated demo. It needed to plug into BetClaw’s real tracking model. That meant designing the live agent so it could operate within existing BetTrack and BetSession structures, rather than producing untracked recommendations with no bankroll memory.

## What I Learned

I learned that building a live multimodal agent is less about the model alone and more about orchestration. Real-time UX depends on transport, audio handling, fallback logic, and clear workflow design. I also learned that grounding matters: a live agent becomes much more useful when it works with structured backend data instead of improvising everything from conversation alone.

I also learned that persistence changes the product. Once slips are created inside tracks and sessions, the agent stops being just a conversational assistant and starts becoming part of a real operating system for betting strategy.

## What’s Next

The next step is to deepen the connection between live conversation and BetClaw’s tracking engine, so dossier analysis, slip approval, session allocation, and long-term track performance all work as one continuous loop. That would make BetClaw Live not just a voice interface for betting, but a fully interactive layer over BetClaw’s bankroll management system.

Built With

Share this project:

Updates

Submission history