Cricket has always been called a captain’s game.
A single bowling change, a field adjustment, or the timing of an Impact Player can completely shift the momentum of a match. During the IPL, captains like Dhoni, Rohit Sharma, and Hardik Pandya constantly make tactical micro-decisions under pressure.
So I thought:
What if an AI system could think like an IPL captain?
That idea became Captain Cool AI — a multi-agent tactical cricket strategist powered entirely by the Google Gemini ecosystem.
Built for a Google-focused hackathon, the goal was not to create just another chatbot, but to build an agentic AI system where multiple AI personalities debate and collaborate before making a final cricketing decision.
🚀 The Core Idea
The system takes a live IPL match situation as input:
- Current score
- Overs
- Wickets
- Batters at crease
- Pitch condition
- Dew factor
- Match situation
…and generates:
✅ The next tactical move
✅ The cricket reasoning behind it
✅ Internal debate between multiple AI agents
✅ Final captain-style decision
Instead of a single LLM response, the system behaves like a real IPL dugout discussion.
🧠 Why Multi-Agent Instead of One Prompt?
One of the hackathon requirements was building a truly “agentic” system.
That means:
- multiple independent agents
- different responsibilities
- actual collaboration
- visible disagreement
So instead of:
“One AI pretending to be many”
I created separate Gemini-powered agents with unique personalities and responsibilities.
🏗️ System Architecture
User Input
↓
Match Context Parser
↓
Strategist Agent
↓
Devil’s Advocate Agent
↓
Stats Analyst Agent
↓
Strategist Revision
↓
Final Tactical Decision
🤖 The Agents
1. Strategist Agent 🧠
This agent behaves like an IPL captain.
Responsibilities:
- bowling changes
- field setup
- pressure tactics
- over management
- batter matchups
Example reasoning:
“Bring the leg-spinner now before the left-hander settles.”
2. Devil’s Advocate Agent ⚠️
This is my favorite part of the system.
The Devil’s Advocate intentionally challenges the strategist.
Responsibilities:
- expose tactical risks
- challenge assumptions
- suggest alternative plans
Example:
“Bad idea. Dew is increasing and gripping the ball will become difficult.”
This creates a real tactical debate instead of a generic AI answer.
3. Stats Analyst Agent 📊
This agent provides data-driven insights.
Responsibilities:
- matchup analysis
- venue behavior
- win probability
- tactical support
Example:
“Bumrah’s economy in death overs at Wankhede this season is 7.1”
⚙️ Tech Stack
The project is built entirely on Google’s AI ecosystem.
AI Stack
- Google Gemini 2.5 Pro
- Google AI Studio
- Google Antigravity
Frontend
- Next.js
- Tailwind CSS
- shadcn/ui
Backend
- FastAPI
- Python
- google-genai SDK
🎨 UI Philosophy
I wanted the interface to feel like:
- an IPL dugout
- a tactical war room
- a broadcast analytics dashboard
The UI includes:
- match state input
- live agent debate panels
- final tactical recommendation
- cricket-style reasoning
Instead of technical AI jargon, the responses sound like real cricket discussions.
🧩 Example Match Scenario
Input
{
"score": "154/4",
"over": "16.2",
"batting_team": "CSK",
"bowling_team": "MI",
"striker": "Dhoni",
"pitch": "slow",
"dew": true
}
AI Debate
Strategist
“Bring Bumrah now before Dhoni settles.”
Devil’s Advocate
“But then who bowls the 19th over?”
Stats Analyst
“Bumrah concedes only 6.8 economy in overs 16–20.”
Final Decision
“Use one Bumrah over now and reserve another for the 19th. Attack Dhoni early before the required rate drops.”
💡 Biggest Engineering Challenge
The hardest part wasn’t calling Gemini APIs.
It was designing:
- believable agent personalities
- tactical disagreement
- natural cricket reasoning
If all agents sound identical, the system feels fake.
So each prompt had:
- a unique role
- different priorities
- different communication style
This made the debate feel much more realistic.
🔥 What Makes This Different?
Most AI sports projects generate:
“Based on data, expected value suggests…”
I wanted this to sound like:
- dugout strategy
- TV commentary
- IPL tactical chatter
The goal was:
AI that feels like cricket.
📈 What’s Coming Next?
Currently, Phase 1 is complete.
Upcoming upgrades include:
- real cricket API integration
- Gemini function calling
- win probability engine
- live Cricbuzz URL parsing
- memory across overs
- voice commentary mode
- counterfactual analysis
Example:
“If Hardik bowls instead of Bumrah, win probability drops by 8%.”
🏆 Final Thoughts
This project made me realize something interesting:
The future of AI applications is not just about smarter models.
It’s about:
- collaboration
- reasoning
- explainability
- personality
- interaction design
Cricket is already a game of tactical intelligence.
Building an AI captain felt like the perfect intersection of:
- sports
- strategy
- storytelling
- agentic AI
And honestly…
Watching AI agents argue over death-over bowling plans is surprisingly entertaining 😄

Top comments (0)