<?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: Uddhav Bhople</title>
    <description>The latest articles on DEV Community by Uddhav Bhople (@uddhav_bhople).</description>
    <link>https://dev.to/uddhav_bhople</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%2F3417698%2F8fecdba5-0542-446c-8cb5-c86ec5b89b3e.jpg</url>
      <title>DEV Community: Uddhav Bhople</title>
      <link>https://dev.to/uddhav_bhople</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uddhav_bhople"/>
    <language>en</language>
    <item>
      <title>I built a multi-agent IPL captain cool AI on Gemini</title>
      <dc:creator>Uddhav Bhople</dc:creator>
      <pubDate>Sun, 17 May 2026 12:51:16 +0000</pubDate>
      <link>https://dev.to/uddhav_bhople/i-built-a-multi-agent-ipl-captain-ai-on-gemini-494p</link>
      <guid>https://dev.to/uddhav_bhople/i-built-a-multi-agent-ipl-captain-ai-on-gemini-494p</guid>
      <description>&lt;p&gt;Cricket is a captain's game. And for 3 hours at a Google AI hackathon, I became one — by building Captain Cool, a multi-agent IPL strategist powered entirely by Google Gemini. Not a chatbot. Not a form with a Gemini call. A real debate between AI agents — the way a captain's brain actually works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Every IPL captain faces split-second decisions — who bowls the death over, when to bring in the Impact Player, how to set the field against a left-hander in dew. These calls win or lose matches.&lt;/p&gt;

&lt;p&gt;I wanted to build an AI that doesn't just answer "who should bowl?" but actually &lt;em&gt;debates it&lt;/em&gt;, shows its reasoning, and tells you what happens if you make the wrong call.&lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;Instead of one Gemini call wearing 4 hats, I built 4 named agents with distinct roles that talk to each other:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Input (Cricbuzz URL or manual match state)
                ↓
         Orchestrator
┌─────────────────────────────────────┐
│ Agent 1: Stats Analyst              │ ← Google Search tool call
│ Agent 2: Strategist (persona-based) │ ← Proposes the call
│ Agent 3: Devil's Advocate           │ ← Challenges it hard
│ Agent 4: Commentator                │ ← Final output + counterfactual
└─────────────────────────────────────┘
                ↓
    Decision + Debate UI + Voice Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The 4 agents
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Agent 1 — Stats Analyst
&lt;/h3&gt;

&lt;p&gt;Uses Gemini's built-in &lt;strong&gt;Google Search tool&lt;/strong&gt; to fetch live player form and head-to-head stats. Not hardcoded JSON — real tool use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System prompt:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are an IPL stats analyst. Analyze pitch conditions, dew factor,
bowler economy rates, and batter weaknesses. Use Google Search to
fetch current player form. Output structured JSON with: key_stats,
batter_weakness, bowler_recommendation, win_probability (%).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Agent 2 — Strategist (Persona-driven)
&lt;/h3&gt;

&lt;p&gt;The user picks a captain persona — and the entire system prompt personality changes:&lt;/p&gt;

&lt;p&gt;🧊 &lt;strong&gt;Dhoni mode:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are MS Dhoni. Ice in your veins. You back your bowlers,
never panic, always think 2 overs ahead. Make ONE decisive call. No hedging.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💥 &lt;strong&gt;Rohit mode:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are Rohit Sharma. Bold and aggressive. Back your instincts
and your big hitters. Make the attacking call others won't.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔥 &lt;strong&gt;Hardik mode:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are Hardik Pandya. Unconventional and fearless.
Make the call that surprises everyone but works.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Agent 3 — Devil's Advocate
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a sharp rival captain. Challenge the Strategist's decision hard.
Find the flaw. Propose a specific alternative.
Format: CHALLENGE: [what's wrong] | ALTERNATIVE: [what you'd do instead]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Agent 4 — Commentator
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are Harsha Bhogle. Explain the final call in vivid cricket language
a passionate fan would love. Include: why this decision, why NOT the
alternative, a counterfactual ("if they'd bowled X, win prob drops ~Y%"),
and a confidence score out of 10.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Orchestrator flow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Extract match state from Cricbuzz URL using Gemini's URL context tool&lt;/li&gt;
&lt;li&gt;Stats Analyst runs Google Search → structured JSON with win probability&lt;/li&gt;
&lt;li&gt;Strategist (selected persona) proposes tactical decision&lt;/li&gt;
&lt;li&gt;Devil's Advocate challenges with a specific alternative&lt;/li&gt;
&lt;li&gt;Strategist defends or revises → final call&lt;/li&gt;
&lt;li&gt;Commentator delivers cricket-language output + counterfactual + confidence score + voice via Web Speech API&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  One full match scenario
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Match state:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MI vs CSK · 2nd innings · Over 16 · CSK need 34 off 24 · 4 wickets down&lt;/li&gt;
&lt;li&gt;Rohit Sharma on strike (67*) · Jadeja non-striker (12*)&lt;/li&gt;
&lt;li&gt;Bumrah has 2 overs left · Chahal has 1 · Flat pitch · Heavy dew · Wankhede&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stats Analyst:&lt;/strong&gt; Win prob MI 58% / CSK 42%. Dew negating seam movement. Jadeja vulnerable to pace outside off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strategist (Dhoni mode):&lt;/strong&gt; Bowl Bumrah now — back him to nail yorkers despite the dew.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Devil's Advocate:&lt;/strong&gt; Dew renders Bumrah's seam movement useless tonight. Save him for over 19. Bowl Chahal now while Jadeja is on strike — he's the weak link against leg spin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strategist (final call):&lt;/strong&gt; Point conceded. Chahal to bowl over 17. Bumrah held for over 19.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commentator:&lt;/strong&gt; &lt;em&gt;"In dew-heavy Wankhede, Bumrah's famous seam is rendered ineffective. Rohit holds him back for the 19th — calm, calculated captaincy. If they'd bowled Bumrah here, win probability drops to 51%. Confidence: 8/10."&lt;/em&gt; 🎙️&lt;/p&gt;




&lt;h2&gt;
  
  
  What made us stand out
&lt;/h2&gt;

&lt;p&gt;At the hackathon, 100+ developers were building the same thing — a form that calls Gemini and returns formatted text. Here's what we did differently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real agent debate visible in the UI&lt;/strong&gt; — shown as chat bubbles, not hidden or summarized&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Captain persona selector&lt;/strong&gt; — same agents, completely different personality per captain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Cricbuzz scraping&lt;/strong&gt; — paste a URL, Gemini extracts the match state automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Counterfactual&lt;/strong&gt; — we don't just tell you what to do, we tell you what happens if you don't&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice output&lt;/strong&gt; — the commentator speaks the final call aloud via Web Speech API&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;TypeScript + Vite + CSS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI model&lt;/td&gt;
&lt;td&gt;Google Gemini 2.5 Flash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SDK&lt;/td&gt;
&lt;td&gt;@google/genai&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool use&lt;/td&gt;
&lt;td&gt;Gemini built-in Google Search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Voice output&lt;/td&gt;
&lt;td&gt;Web Speech API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build environment&lt;/td&gt;
&lt;td&gt;Google AI Studio&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🐙 GitHub: &lt;a href="https://github.com/uddhav05-cyber/Captain-Cool-tactic-decisiodecision-" rel="noopener noreferrer"&gt;https://github.com/uddhav05-cyber/Captain-Cool-tactic-decisiodecision-&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🤖 AI Studio: &lt;a href="https://ai.studio/apps/adb39947-b3f1-49aa-8ee8-2d0b606f5c90" rel="noopener noreferrer"&gt;https://ai.studio/apps/adb39947-b3f1-49aa-8ee8-2d0b606f5c90&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Built by &lt;strong&gt;Uddhav Bhople&lt;/strong&gt; —  Associate Microsoft Learn Student Ambassador · Google Student Ambassador · B.Tech Computer Engineering Student @ D.Y. Patil University Pune&lt;/p&gt;

&lt;h1&gt;
  
  
  googleai #gemini #cricket #apl #hackathon #multiagent #typescript #gdgcloudpune #gdgcloudpune2026
&lt;/h1&gt;

</description>
      <category>gdgcloudpune</category>
      <category>apl</category>
      <category>gdgcloudpune2026</category>
      <category>gemini</category>
    </item>
  </channel>
</rss>
