What happens when you give a cricket captain six Gemini 2.5 Flash agents instead of two ears and a gut feeling? You get CaptainCool AI โ an IPL strategist that debates tactical decisions in real-time, complete with contrarian challenges, win probability math, and Star Sports-style commentary. Built during the Agentic Premier League (APL) hackathon by GDG Cloud Pune, this system is the kind of multi-agent architecture that makes you rethink what a "simple" cricket app can be.
The Architecture: Six Agents, One Debate
The core innovation here isn't just having multiple agents โ it's forcing them to actually talk to each other. The pipeline runs StatsAnalyst โ Strategist (proposal) โ Devil's Advocate (challenge) โ Strategist (rebuttal) โ Match Predictor (win probability + counterfactual) โ Commentator (final verdict). That rebuttal step is the mandatory multi-turn loop that separates this from a glorified prompt chain. Without it, you're just building a monologue with extra steps. The live data comes courtesy of a Cricbuzz scraper invoked via Gemini function calling โ not mocked data, not static JSON. BeautifulSoup strips the HTML down to pure text before hitting the LLM, reducing token usage by roughly 80%. A 10-second in-memory cache prevents API rate limits when multiple users are polling simultaneously.
The Agents Play Specific Roles
Each agent has a distinct personality baked into its system prompt. Stats Analyst is the data gatekeeper that makes the tool call and structures the match state. Strategist channels MS Dhoni โ calm, decisive, commits to one specific decision with names and field placements. Devil's Advocate exists purely to find the flaw: it cites precedents (like Asia Cup 2022), provides alternatives, and forces the strategist to either defend or revise. The Match Predictor calculates win probability for both teams, shows how the captain's call shifts odds if successful, and runs a counterfactual on what would happen if the alternative was chosen. Finally, Match Commentator pretends to be on Star Sports โ no mentions of "ML" or "agent," just raw cricket emotion.
The MI vs RCB Demo Scenario
The walkthrough uses a realistic scenario: RCB need 34 off 18 balls with Kohli on 72(49) and Bumrah having two overs left. Strategist proposes bowling Bumrah NOW with a 7-2 field targeting toes. Devil's Advocate counters that Hardik should bowl instead, citing Kohli's 131 strike rate against Bumrah in death overs. The strategist's rebuttal? "The key stat being missed: Kohli's SR against Hardik is 167." Standing firm โ Hardik can't handle this. Win probability shifts from MI 58% to MI 79% if Bumrah takes Kohli's wicket, but flips to RCB 51% on a boundary off ball one.
Key Takeaways
- The multi-turn rebuttal loop transforms agents from monologue generators into actual debaters โ this is what separates ADK-pattern projects from prompt chains
- BeautifulSoup before Gemini isn't optional optimization; it's the difference between working production code and token-bloating garbage
- Win probability plus counterfactual gives non-technical stakeholders a reason to care about AI decisions without touching model internals
- Voice output via Web Speech API costs nothing and makes the system feel like an actual broadcast rather than a backend process
The Bottom Line
This is what agentic systems should look like in 2026 โ not one LLM answering questions, but multiple agents with conflicting incentives that must reconcile through structured debate. CaptainCool AI proves the pattern works for anything requiring nuanced tactical reasoning where single-model confidence masks uncertainty. Six agents arguing beats one agent hallucinating certainty every time.