<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mainak Dasgupta</title>
    <description>The latest articles on DEV Community by Mainak Dasgupta (@mainak29).</description>
    <link>https://dev.to/mainak29</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F532066%2F68f4a3f8-ced3-4f73-99ea-74aafaaf7ba3.jpeg</url>
      <title>DEV Community: Mainak Dasgupta</title>
      <link>https://dev.to/mainak29</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mainak29"/>
    <language>en</language>
    <item>
      <title>Building “Captain Cool AI” — A Multi-Agent IPL Strategist Using Google Gemini</title>
      <dc:creator>Mainak Dasgupta</dc:creator>
      <pubDate>Sun, 17 May 2026 12:34:17 +0000</pubDate>
      <link>https://dev.to/mainak29/building-captain-cool-ai-a-multi-agent-ipl-strategist-using-google-gemini-4cid</link>
      <guid>https://dev.to/mainak29/building-captain-cool-ai-a-multi-agent-ipl-strategist-using-google-gemini-4cid</guid>
      <description>&lt;p&gt;Cricket has always been called a captain’s game.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;So I thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if an AI system could think like an IPL captain?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That idea became &lt;strong&gt;Captain Cool AI&lt;/strong&gt; — a multi-agent tactical cricket strategist powered entirely by the Google Gemini ecosystem.&lt;/p&gt;

&lt;p&gt;Built for a Google-focused hackathon, the goal was not to create just another chatbot, but to build an &lt;strong&gt;agentic AI system&lt;/strong&gt; where multiple AI personalities debate and collaborate before making a final cricketing decision.&lt;/p&gt;




&lt;h1&gt;
  
  
  🚀 The Core Idea
&lt;/h1&gt;

&lt;p&gt;The system takes a live IPL match situation as input:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Current score&lt;/li&gt;
&lt;li&gt;Overs&lt;/li&gt;
&lt;li&gt;Wickets&lt;/li&gt;
&lt;li&gt;Batters at crease&lt;/li&gt;
&lt;li&gt;Pitch condition&lt;/li&gt;
&lt;li&gt;Dew factor&lt;/li&gt;
&lt;li&gt;Match situation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…and generates:&lt;/p&gt;

&lt;p&gt;✅ The next tactical move&lt;br&gt;
✅ The cricket reasoning behind it&lt;br&gt;
✅ Internal debate between multiple AI agents&lt;br&gt;
✅ Final captain-style decision&lt;/p&gt;

&lt;p&gt;Instead of a single LLM response, the system behaves like a real IPL dugout discussion.&lt;/p&gt;


&lt;h1&gt;
  
  
  🧠 Why Multi-Agent Instead of One Prompt?
&lt;/h1&gt;

&lt;p&gt;One of the hackathon requirements was building a truly “agentic” system.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple independent agents&lt;/li&gt;
&lt;li&gt;different responsibilities&lt;/li&gt;
&lt;li&gt;actual collaboration&lt;/li&gt;
&lt;li&gt;visible disagreement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So instead of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“One AI pretending to be many”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I created separate Gemini-powered agents with unique personalities and responsibilities.&lt;/p&gt;


&lt;h1&gt;
  
  
  🏗️ System Architecture
&lt;/h1&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Input
   ↓
Match Context Parser
   ↓
Strategist Agent
   ↓
Devil’s Advocate Agent
   ↓
Stats Analyst Agent
   ↓
Strategist Revision
   ↓
Final Tactical Decision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  🤖 The Agents
&lt;/h1&gt;
&lt;h2&gt;
  
  
  1. Strategist Agent 🧠
&lt;/h2&gt;

&lt;p&gt;This agent behaves like an IPL captain.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bowling changes&lt;/li&gt;
&lt;li&gt;field setup&lt;/li&gt;
&lt;li&gt;pressure tactics&lt;/li&gt;
&lt;li&gt;over management&lt;/li&gt;
&lt;li&gt;batter matchups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example reasoning:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bring the leg-spinner now before the left-hander settles.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  2. Devil’s Advocate Agent ⚠️
&lt;/h2&gt;

&lt;p&gt;This is my favorite part of the system.&lt;/p&gt;

&lt;p&gt;The Devil’s Advocate intentionally challenges the strategist.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;expose tactical risks&lt;/li&gt;
&lt;li&gt;challenge assumptions&lt;/li&gt;
&lt;li&gt;suggest alternative plans&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bad idea. Dew is increasing and gripping the ball will become difficult.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This creates a real tactical debate instead of a generic AI answer.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. Stats Analyst Agent 📊
&lt;/h2&gt;

&lt;p&gt;This agent provides data-driven insights.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;matchup analysis&lt;/li&gt;
&lt;li&gt;venue behavior&lt;/li&gt;
&lt;li&gt;win probability&lt;/li&gt;
&lt;li&gt;tactical support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bumrah’s economy in death overs at Wankhede this season is 7.1”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  ⚙️ Tech Stack
&lt;/h1&gt;

&lt;p&gt;The project is built entirely on Google’s AI ecosystem.&lt;/p&gt;
&lt;h2&gt;
  
  
  AI Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Google Gemini 2.5 Pro&lt;/li&gt;
&lt;li&gt;Google AI Studio&lt;/li&gt;
&lt;li&gt;Google Antigravity&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Frontend
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Next.js&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;shadcn/ui&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Backend
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;FastAPI&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;google-genai SDK&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  🎨 UI Philosophy
&lt;/h1&gt;

&lt;p&gt;I wanted the interface to feel like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an IPL dugout&lt;/li&gt;
&lt;li&gt;a tactical war room&lt;/li&gt;
&lt;li&gt;a broadcast analytics dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The UI includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;match state input&lt;/li&gt;
&lt;li&gt;live agent debate panels&lt;/li&gt;
&lt;li&gt;final tactical recommendation&lt;/li&gt;
&lt;li&gt;cricket-style reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of technical AI jargon, the responses sound like real cricket discussions.&lt;/p&gt;


&lt;h1&gt;
  
  
  🧩 Example Match Scenario
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Input
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"154/4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"over"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"16.2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"batting_team"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CSK"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bowling_team"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"MI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"striker"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Dhoni"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"pitch"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"slow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"dew"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  AI Debate
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Strategist
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bring Bumrah now before Dhoni settles.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Devil’s Advocate
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;“But then who bowls the 19th over?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Stats Analyst
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bumrah concedes only 6.8 economy in overs 16–20.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  Final Decision
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Use one Bumrah over now and reserve another for the 19th. Attack Dhoni early before the required rate drops.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  💡 Biggest Engineering Challenge
&lt;/h1&gt;

&lt;p&gt;The hardest part wasn’t calling Gemini APIs.&lt;/p&gt;

&lt;p&gt;It was designing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;believable agent personalities&lt;/li&gt;
&lt;li&gt;tactical disagreement&lt;/li&gt;
&lt;li&gt;natural cricket reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If all agents sound identical, the system feels fake.&lt;/p&gt;

&lt;p&gt;So each prompt had:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a unique role&lt;/li&gt;
&lt;li&gt;different priorities&lt;/li&gt;
&lt;li&gt;different communication style&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made the debate feel much more realistic.&lt;/p&gt;


&lt;h1&gt;
  
  
  🔥 What Makes This Different?
&lt;/h1&gt;

&lt;p&gt;Most AI sports projects generate:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Based on data, expected value suggests…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I wanted this to sound like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dugout strategy&lt;/li&gt;
&lt;li&gt;TV commentary&lt;/li&gt;
&lt;li&gt;IPL tactical chatter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AI that feels like cricket.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  📈 What’s Coming Next?
&lt;/h1&gt;

&lt;p&gt;Currently, Phase 1 is complete.&lt;/p&gt;

&lt;p&gt;Upcoming upgrades include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;real cricket API integration&lt;/li&gt;
&lt;li&gt;Gemini function calling&lt;/li&gt;
&lt;li&gt;win probability engine&lt;/li&gt;
&lt;li&gt;live Cricbuzz URL parsing&lt;/li&gt;
&lt;li&gt;memory across overs&lt;/li&gt;
&lt;li&gt;voice commentary mode&lt;/li&gt;
&lt;li&gt;counterfactual analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“If Hardik bowls instead of Bumrah, win probability drops by 8%.”&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  🏆 Final Thoughts
&lt;/h1&gt;

&lt;p&gt;This project made me realize something interesting:&lt;/p&gt;

&lt;p&gt;The future of AI applications is not just about smarter models.&lt;/p&gt;

&lt;p&gt;It’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;collaboration&lt;/li&gt;
&lt;li&gt;reasoning&lt;/li&gt;
&lt;li&gt;explainability&lt;/li&gt;
&lt;li&gt;personality&lt;/li&gt;
&lt;li&gt;interaction design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cricket is already a game of tactical intelligence.&lt;/p&gt;

&lt;p&gt;Building an AI captain felt like the perfect intersection of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sports&lt;/li&gt;
&lt;li&gt;strategy&lt;/li&gt;
&lt;li&gt;storytelling&lt;/li&gt;
&lt;li&gt;agentic AI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And honestly…&lt;/p&gt;

&lt;p&gt;Watching AI agents argue over death-over bowling plans is surprisingly entertaining 😄&lt;/p&gt;


&lt;h1&gt;
  
  
  GitHub
&lt;/h1&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Mainak29" rel="noopener noreferrer"&gt;
        Mainak29
      &lt;/a&gt; / &lt;a href="https://github.com/Mainak29/captain-cool-ai" rel="noopener noreferrer"&gt;
        captain-cool-ai
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8kgnkhhx8no5blhsgba.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8kgnkhhx8no5blhsgba.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Built With ❤️ Using Google Gemini
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>gdg</category>
      <category>gdgpune</category>
      <category>gdgcloudpune</category>
    </item>
  </channel>
</rss>
