A developer has built an agentic AI system called Captain Cool that simulates the internal dressing-room debate of an IPL franchise, using Google Gemini's multi-agent capabilities to generate cricket strategy recommendations in real-time. The project, documented on DEV.to by user kishan_mishra_0e42ac3dcc9 and published May 17, 2026, demonstrates how forcing large language models to argue against each other can eliminate generic responses and produce sharper tactical decisions.
Why Multi-Agent Debate Architecture Wins
The core insight here is elegant: instead of relying on a single prompt to handle all the reasoning, Captain Cool splits decision-making across four distinct AI personas that debate each other. This multi-agent loop—orchestrated via FastAPI and the google-genai Python SDK—forces the system to catch its own blind spots before presenting recommendations. The result is strategy that's analytically sound rather than the kind of safe, middle-ground nonsense you'd get from a single LLM trying to please everyone.
Meet the Four Agents Running the Show
The Stats Analyst handles data retrieval through Gemini Function Calling, automatically pulling historical batting and bowling stats from CSV files using get_batsman_stats() and get_bowler_stats(). The Strategist (Captain Cool) receives that statistical report and makes definitive tactical calls—deciding who bowls next or who bats next based on pitch conditions, required run rate, and player matchups. Here's where it gets interesting: the Devil's Advocate agent aggressively critiques every decision from the Strategist, hunting for flaws like potential spin-friendly pitch surprises or bad bowler-batsman matchups. Finally, the Match Commentator translates that internal dressing-room jargon into fan-facing hype, complete with a final Agent Conclusion.
Live Walkthrough: Dhoni vs Bumrah Under Pressure
The project includes a live demo scenario that's genuinely compelling to read. With CSK chasing MI and needing just 3 runs off 10 balls with MS Dhoni facing Jasprit Bumrah on a dew-heavy turning track, the system kicks into gear. The Stats Analyst notes Bumrah's elite economy rate of 7.39 against Dhoni's career strike rate of 135. The Strategist initially recommends playing it safe and rotating strike—but the Devil's Advocate immediately counters that 'playing it safe against Bumrah in the death is a myth.' After revision, the final call has Dhoni standing deep in his crease to exploit any wet ball slip-ups from Bumrah and finish the chase immediately.
Key Takeaways
- Gemini 2.5 Flash powers all four agents with multi-turn reasoning capabilities
- Function calling lets the Stats Analyst pull real CSV data automatically rather than hallucinating numbers
- The Devil's Advocate agent is the secret sauce—it eliminates confirmation bias by design
- Tech stack stays lean: FastAPI backend, React + Vite frontend with Glassmorphism UI, Pandas for data manipulation
The Bottom Line
This project validates what we've been saying in AI agent circles: single-LLM setups are fundamentally limited. When you force models to challenge each other through structured debate loops, you get strategy that's actually battle-tested before it reaches the user. Captain Cool isn't just a cricket novelty—it's a proof of concept for how multi-agent systems should be architected across any high-stakes decision domain.