A developer going by sahil9 on DEV.to just dropped something that makes multi-agent AI actually fun again. "Captain Cool" is a fully open-source agentic system built on Google's official Gemini stack that processes real-time IPL match parameters and outputs tactical decisions in authentic cricket vernacular—complete with Hindi-English code-switching you'd hear in any dugout worth its salt.
The Multi-Agent Architecture
The system doesn't rely on a single LLM wearing multiple hats. Instead, sahil9 engineered three distinct agents, each running on different Gemini models with specialized roles. The Performance Analyst uses gemini-2.5-flash to crunch Live Run Rates and Win Probabilities via function calling, triggering the native calculate_match_metrics tool before proposing baseline tactics. The Devil's Advocate—also gemini-2.5-flash—acts as a cynical assistant coach that actively picks apart the Analyst's recommendations by introducing real-world variables like boundary dimensions and dew factors. Finally, Captain Cool itself runs on gemini-2.5-pro to synthesize these conflicting arguments and deliver definitive commands in vernacular cricket-speak.
The Tech Stack Under the Hood
The project leverages Google's full agentic ecosystem: the unified google-genai engine for API invocation, Google AI Studio for system prompt alignment and playground verification, and Google Antigravity as the IDE environment where the entire codebase was initialized and engineered. Native function calling automates algorithmic calculations without external dependencies. This isn't a demo—there's actual GitHub code available, though the linked repository wasn't accessible at press time.
Live Evaluation: M. Chinnaswamy Stadium Scenario
The article walks through a concrete scenario: chasing 185 at M. Chinnaswamy Stadium in Bengaluru with 142 runs needed from 14.2 overs on a turning, spin-friendly pitch with heavy dew. The Performance Analyst calculated a 68.2% win probability and recommended bringing on the leg-spinner immediately. The Devil's Advocate absolutely savaged that call—pointing out that heavy dew means wet ball, no grip, and tiny boundaries where loose deliveries get murdered. Captain Cool's verdict? "Spin ko hold karenge. Bring back the premium seamer, hit the deck with heavy lengths." That vernacular output is what separates this from generic RAG pipelines.
Why This Matters for AI Agent Development
Multi-agent systems usually devolve into prompt engineering nightmares where one model tries to handle too many responsibilities. Captain Cool demonstrates proper agent specialization—separate models with distinct system instructions that argue, contradict, and ultimately synthesize better decisions than any single agent could produce. The function calling integration for match metrics shows how native tool use can automate calculations without bloating the context window.
Key Takeaways
- Three-agent architecture (Analyst, Devil's Advocate, Captain Cool) prevents role confusion common in single-prompt systems
- gemini-2.5-flash handles data-heavy roles while gemini-2.5-pro manages final synthesis and vernacular output
- Native function calling for match metrics keeps the reasoning loop clean and auditable
- Open-source codebase available demonstrates production-ready implementation patterns
The Bottom Line
Captain Cool isn't just a cricket novelty—it's proof that multi-agent coordination can produce coherent, context-aware outputs when you give each agent a distinct personality and mandate. The vernacular output is the killer feature: real-time tactical advice that sounds human because it channels actual dugout energy rather than corporate-speak summaries.