<?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: Prajwal Tupe</title>
    <description>The latest articles on DEV Community by Prajwal Tupe (@prajwal_tupe_3387fed53c23).</description>
    <link>https://dev.to/prajwal_tupe_3387fed53c23</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%2F3936224%2F73f31e59-8174-4e7c-8ad1-324673a51e47.jpg</url>
      <title>DEV Community: Prajwal Tupe</title>
      <link>https://dev.to/prajwal_tupe_3387fed53c23</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prajwal_tupe_3387fed53c23"/>
    <language>en</language>
    <item>
      <title>Captain Cool:The Multi-Agent IPL Match Strategist</title>
      <dc:creator>Prajwal Tupe</dc:creator>
      <pubDate>Sun, 17 May 2026 13:34:53 +0000</pubDate>
      <link>https://dev.to/prajwal_tupe_3387fed53c23/captain-coolthe-multi-agent-ipl-match-strategist-3al7</link>
      <guid>https://dev.to/prajwal_tupe_3387fed53c23/captain-coolthe-multi-agent-ipl-match-strategist-3al7</guid>
      <description>&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%2Flq2porvv4vpqbiawl73v.jpg" 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%2Flq2porvv4vpqbiawl73v.jpg" alt=" " width="800" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Building "Captain Cool": An AI-Powered IPL Match Strategist
&lt;/h1&gt;

&lt;p&gt;Cricket, particularly the high-octane IPL T20 format, is a game of fine margins. A single tactical decision—who bowls the 19th over, when to deploy the Impact Player, or how to counter a left-handed power hitter on a turning track—can change the course of a match. Behind these decisions is a captain who thinks two overs ahead, absorbing data and intuition in real-time.&lt;/p&gt;

&lt;p&gt;But what if we could replicate this decision-making process using Generative AI? &lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;Captain Cool&lt;/strong&gt;, a multi-agent orchestration pipeline built with the Google Gemini model and the official Google GenAI SDK.&lt;/p&gt;

&lt;p&gt;In this post, we’ll dive into how we built an AI system that acts as an elite IPL strategist, debating tactical moves in a simulated "coaching staff" environment before making the final call.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture: A Three-Agent Coaching Staff
&lt;/h2&gt;

&lt;p&gt;To mimic the intense debate in a cricket dugout, we designed a three-agent architecture where AI agents communicate sequentially to form a final strategy. &lt;/p&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%2F544j500jxjnf6ic75ge1.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%2F544j500jxjnf6ic75ge1.png" alt=" " width="688" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Stats Analyst 📊
&lt;/h3&gt;

&lt;p&gt;Data is the backbone of modern T20 cricket. The Stats Analyst agent is responsible for consuming the real-time match state (e.g., "16th over, 145/3, heavy dew") and utilizing Tool Calling. &lt;/p&gt;

&lt;p&gt;We equipped the Analyst with Python functions (&lt;code&gt;fetch_historical_stats&lt;/code&gt; and &lt;code&gt;fetch_live_match_data&lt;/code&gt;). When prompted, the Gemini model automatically knows when to invoke these tools, fetching mock data like MS Dhoni’s strike rate or the current win probability. It then synthesizes a purely data-driven report without making any actual strategic calls.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Strategist (Captain Cool) 🧠
&lt;/h3&gt;

&lt;p&gt;Armed with the Analyst's data, the Strategist takes the stage. Prompted to embody the calm, calculated persona of legendary IPL captains like MS Dhoni or Rohit Sharma, this agent proposes a single tactical move. &lt;/p&gt;

&lt;p&gt;Crucially, we employed strict prompt engineering here: the agent is instructed to use authentic cricket terminology ("bowling into the pitch", "matchups", "taking the game deep") and explicitly forbidden from using generic AI jargon.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Devil’s Advocate 👿
&lt;/h3&gt;

&lt;p&gt;No strategy is foolproof. To ensure robustness, we introduced the Devil’s Advocate. This agent acts as a highly critical assistant coach whose sole job is to aggressively challenge the Strategist's proposal. It looks for counter-matchups, momentum risks, and potential pitfalls in the plan. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Final Call 🏆
&lt;/h3&gt;

&lt;p&gt;Finally, the loop returns to the Strategist, who evaluates the Devil’s Advocate’s critique. Like a true captain, it decides whether to stick to its guns or pivot, providing the final cricket logic behind the move.&lt;/p&gt;




&lt;h2&gt;
  
  
  Handling the Chaos: Resiliency and UX
&lt;/h2&gt;

&lt;p&gt;Building AI pipelines comes with challenges, notably API rate limits and network instability. To counter this, we integrated the &lt;code&gt;tenacity&lt;/code&gt; library, wrapping our API calls in robust exponential backoff retries. If the Gemini API hits a rate limit, the system gracefully pauses and retries, ensuring the pipeline doesn't crash mid-debate.&lt;/p&gt;

&lt;p&gt;On the user experience front, we utilized the &lt;code&gt;rich&lt;/code&gt; Python library. Instead of a boring wall of text, users interact with a beautifully formatted CLI. Colored panels represent each agent's turn, and spinner animations keep the user engaged while the AI "crunches the numbers."&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Gemini 2.5 Pro / Flash?
&lt;/h2&gt;

&lt;p&gt;For an interactive application like this, speed is just as important as intelligence. We chose Gemini because it offers the perfect balance: it's fast enough to keep the CLI feeling responsive in real-time while possessing the deep reasoning capabilities required for complex tool calling and contextual multi-agent debate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;The end result is an incredibly fun, dynamic tool that genuinely feels like you are sitting in an IPL dugout in 2026. You feed it a stressful match scenario, and it gives you a data-backed, heavily debated, and authentically phrased tactical masterplan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developed for GDG APL Pune 🚀
&lt;/h2&gt;

&lt;p&gt;This project was built and showcased as part of the &lt;strong&gt;GDG APL Pune&lt;/strong&gt; event. A huge shoutout to the &lt;strong&gt;@gdgcloudpune&lt;/strong&gt; community for organizing such an incredible platform for developers to push the boundaries of Generative AI and share real-world implementations. &lt;/p&gt;

&lt;p&gt;If you were at the event, let’s connect in the comments and discuss how you’re leveraging multi-agent systems!&lt;/p&gt;

</description>
      <category>gdgcloudpune</category>
      <category>alp2026</category>
    </item>
    <item>
      <title>Captain Cool:The Multi-Agent IPL Match Strategist</title>
      <dc:creator>Prajwal Tupe</dc:creator>
      <pubDate>Sun, 17 May 2026 12:47:25 +0000</pubDate>
      <link>https://dev.to/prajwal_tupe_3387fed53c23/captain-cool-1k6l</link>
      <guid>https://dev.to/prajwal_tupe_3387fed53c23/captain-cool-1k6l</guid>
      <description>&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%2Flq2porvv4vpqbiawl73v.jpg" 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%2Flq2porvv4vpqbiawl73v.jpg" alt=" " width="800" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Building "Captain Cool": An AI-Powered IPL Match Strategist
&lt;/h1&gt;

&lt;p&gt;Cricket, particularly the high-octane IPL T20 format, is a game of fine margins. A single tactical decision—who bowls the 19th over, when to deploy the Impact Player, or how to counter a left-handed power hitter on a turning track—can change the course of a match. Behind these decisions is a captain who thinks two overs ahead, absorbing data and intuition in real-time.&lt;/p&gt;

&lt;p&gt;But what if we could replicate this decision-making process using Generative AI? &lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;Captain Cool&lt;/strong&gt;, a multi-agent orchestration pipeline built with the Google Gemini model and the official Google GenAI SDK.&lt;/p&gt;

&lt;p&gt;In this post, we’ll dive into how we built an AI system that acts as an elite IPL strategist, debating tactical moves in a simulated "coaching staff" environment before making the final call.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Architecture: A Three-Agent Coaching Staff
&lt;/h2&gt;

&lt;p&gt;To mimic the intense debate in a cricket dugout, we designed a three-agent architecture where AI agents communicate sequentially to form a final strategy. &lt;/p&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%2F544j500jxjnf6ic75ge1.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%2F544j500jxjnf6ic75ge1.png" alt=" " width="688" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Stats Analyst 📊
&lt;/h3&gt;

&lt;p&gt;Data is the backbone of modern T20 cricket. The Stats Analyst agent is responsible for consuming the real-time match state (e.g., "16th over, 145/3, heavy dew") and utilizing Tool Calling. &lt;/p&gt;

&lt;p&gt;We equipped the Analyst with Python functions (&lt;code&gt;fetch_historical_stats&lt;/code&gt; and &lt;code&gt;fetch_live_match_data&lt;/code&gt;). When prompted, the Gemini model automatically knows when to invoke these tools, fetching mock data like MS Dhoni’s strike rate or the current win probability. It then synthesizes a purely data-driven report without making any actual strategic calls.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Strategist (Captain Cool) 🧠
&lt;/h3&gt;

&lt;p&gt;Armed with the Analyst's data, the Strategist takes the stage. Prompted to embody the calm, calculated persona of legendary IPL captains like MS Dhoni or Rohit Sharma, this agent proposes a single tactical move. &lt;/p&gt;

&lt;p&gt;Crucially, we employed strict prompt engineering here: the agent is instructed to use authentic cricket terminology ("bowling into the pitch", "matchups", "taking the game deep") and explicitly forbidden from using generic AI jargon.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Devil’s Advocate 👿
&lt;/h3&gt;

&lt;p&gt;No strategy is foolproof. To ensure robustness, we introduced the Devil’s Advocate. This agent acts as a highly critical assistant coach whose sole job is to aggressively challenge the Strategist's proposal. It looks for counter-matchups, momentum risks, and potential pitfalls in the plan. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Final Call 🏆
&lt;/h3&gt;

&lt;p&gt;Finally, the loop returns to the Strategist, who evaluates the Devil’s Advocate’s critique. Like a true captain, it decides whether to stick to its guns or pivot, providing the final cricket logic behind the move.&lt;/p&gt;




&lt;h2&gt;
  
  
  Handling the Chaos: Resiliency and UX
&lt;/h2&gt;

&lt;p&gt;Building AI pipelines comes with challenges, notably API rate limits and network instability. To counter this, we integrated the &lt;code&gt;tenacity&lt;/code&gt; library, wrapping our API calls in robust exponential backoff retries. If the Gemini API hits a rate limit, the system gracefully pauses and retries, ensuring the pipeline doesn't crash mid-debate.&lt;/p&gt;

&lt;p&gt;On the user experience front, we utilized the &lt;code&gt;rich&lt;/code&gt; Python library. Instead of a boring wall of text, users interact with a beautifully formatted CLI. Colored panels represent each agent's turn, and spinner animations keep the user engaged while the AI "crunches the numbers."&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Gemini 2.5 Pro / Flash?
&lt;/h2&gt;

&lt;p&gt;For an interactive application like this, speed is just as important as intelligence. We chose Gemini because it offers the perfect balance: it's fast enough to keep the CLI feeling responsive in real-time while possessing the deep reasoning capabilities required for complex tool calling and contextual multi-agent debate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Result
&lt;/h2&gt;

&lt;p&gt;The end result is an incredibly fun, dynamic tool that genuinely feels like you are sitting in an IPL dugout in 2026. You feed it a stressful match scenario, and it gives you a data-backed, heavily debated, and authentically phrased tactical masterplan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developed for GDG APL Pune 🚀
&lt;/h2&gt;

&lt;p&gt;This project was built and showcased as part of the &lt;strong&gt;GDG APL Pune&lt;/strong&gt; event. A huge shoutout to the &lt;strong&gt;@gdgcloudpune&lt;/strong&gt; community for organizing such an incredible platform for developers to push the boundaries of Generative AI and share real-world implementations. &lt;/p&gt;

&lt;p&gt;If you were at the event, let’s connect in the comments and discuss how you’re leveraging multi-agent systems!&lt;/p&gt;

</description>
      <category>gdgcloudpune</category>
      <category>apl2026</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
