<?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: Shubham </title>
    <description>The latest articles on DEV Community by Shubham  (@shubhamxpawar).</description>
    <link>https://dev.to/shubhamxpawar</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%2F2968795%2Fda5af9e9-86bd-4f84-a637-c43fd4f00294.jpeg</url>
      <title>DEV Community: Shubham </title>
      <link>https://dev.to/shubhamxpawar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shubhamxpawar"/>
    <language>en</language>
    <item>
      <title>Blog for APL Pune 2026</title>
      <dc:creator>Shubham </dc:creator>
      <pubDate>Sun, 17 May 2026 12:42:43 +0000</pubDate>
      <link>https://dev.to/shubhamxpawar/blog-for-apl-pune-2026-26b</link>
      <guid>https://dev.to/shubhamxpawar/blog-for-apl-pune-2026-26b</guid>
      <description>&lt;p&gt;🏏 Captain Cool: The Multi-Agent IPL Strategist Built on Gemini&lt;br&gt;
Cricket isn’t just played with a bat and ball; it’s played in the captain’s head. When the match is on the line, the dew is falling, and MS Dhoni is on strike, a single bowling change decides the game.&lt;/p&gt;

&lt;p&gt;For this hackathon, I didn't want to build just another chatbot that spits out generic cricket facts. I wanted to build a Virtual Strategy Room.&lt;/p&gt;

&lt;p&gt;Enter Captain Cool: a fully interactive, multi-agent AI system built entirely on the Google Gemini stack. It ingests match state, visual pitch data, and historical context to debate the next best move before delivering a final, captain-style tactical decision.&lt;/p&gt;

&lt;p&gt;Here is a deep dive into the architecture and how I brought this to life during a frantic vibe-coding session in Google Antigravity.&lt;/p&gt;

&lt;p&gt;Link to GitHub Repository - &lt;a href="https://github.com/shubhamxpawar/cool-cricket-agent" rel="noopener noreferrer"&gt;https://github.com/shubhamxpawar/cool-cricket-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🛠️ The Tech Stack (Google's House)&lt;br&gt;
Google Antigravity: My primary IDE for the build. The seamless agentic assistance helped me pivot architectures and generate testing scripts autonomously.&lt;/p&gt;

&lt;p&gt;Gemini 2.5 Flash: via the @google/genai Node.js SDK. Blazing fast and perfect for chaining agent outputs.&lt;/p&gt;

&lt;p&gt;Multimodal Vision: Processing raw images of cricket pitches.&lt;/p&gt;

&lt;p&gt;Structured Outputs: Utilizing Gemini's responseSchema (JSON) to guarantee deterministic handoffs between agents.&lt;/p&gt;

&lt;p&gt;Interactive CLI: Built with Node readline, formatted beautifully with chalk and ora.&lt;/p&gt;

&lt;p&gt;🧠 The Architecture: Four Agents in a Room&lt;br&gt;
The core requirement of this challenge was genuine collaboration. A single LLM call wearing four hats doesn't cut it. My architecture splits the workload into four distinct, highly specialized agents.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The Pitch Inspector (Multimodal Vision)&lt;br&gt;
Before any stats are crunched, we need to know the surface. This agent ingests pitch.jpg using Gemini's native vision capabilities, evaluates the cracks, moisture, or grass, and outputs a one-sentence assessment (e.g., "Dry and cracking, heavy turn expected").&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Stats Analyst (Structured Data)&lt;br&gt;
The Analyst takes the visual pitch data, the current match scenario, and the memory of previous balls.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Agentic Twist: It doesn't output text. It is constrained via responseSchema to output strict JSON containing a proposedMove and reasoning. This mimics true enterprise Model Context Protocol (MCP) data passing.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Devil’s Advocate (Counterfactual Risk)
Every good captain needs someone to tell them why they are wrong. The Advocate ingests the Analyst's JSON proposal, tears it apart, and calculates a counterfactual.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Agentic Twist: It is forced to return a JSON payload with a specific winProbabilityDrop metric, highlighting the exact statistical risk of the Analyst's plan.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Captain Cool (The Final Call)
The ultimate decision-maker. It reads the Pitch Inspector's visual data, the Analyst's logic, and the Advocate's warnings. It synthesizes this into a single gut call, delivered in pure cricket slang.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🎙️ The Prompts (Google AI Studio)&lt;br&gt;
Before touching the code, I spent time prototyping the distinct personas in Google AI Studio to ensure the Advocate was actually aggressive and the Captain sounded authentic.&lt;/p&gt;

&lt;p&gt;Check out the raw system instructions here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aistudio.google.com/app/prompts?state=%7B%22ids%22:%5B%2218psZgnrzMX8sjT4linDQeYGerp_rlI0V%22%5D,%22action%22:%22open%22,%22userId%22:%22107523829563042115214%22,%22resourceKeys%22:%7B%7D%7D&amp;amp;usp=sharing" rel="noopener noreferrer"&gt;https://aistudio.google.com/app/prompts?state=%7B%22ids%22:%5B%2218psZgnrzMX8sjT4linDQeYGerp_rlI0V%22%5D,%22action%22:%22open%22,%22userId%22:%22107523829563042115214%22,%22resourceKeys%22:%7B%7D%7D&amp;amp;usp=sharing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔄 End-to-End Walkthrough: The Final Over Drama&lt;br&gt;
To prove the system's "Memory across overs" capability, I ran an interactive CLI session.&lt;/p&gt;

&lt;p&gt;The Setup: CSK is batting against MI. 18.2 overs in. 35 runs needed off 16 balls. Heavy dew.&lt;/p&gt;

&lt;p&gt;Turn 1:&lt;br&gt;
The Analyst looks at the required run rate (13+ RPO) and suggests firing wide yorkers to prevent boundaries. The Devil's Advocate steps in, warning that pure defense will drop the win probability by 18%, suggesting they hunt for a wicket instead.&lt;/p&gt;

&lt;p&gt;Captain Cool's Verdict:&lt;/p&gt;

&lt;p&gt;"Right, 35 off 16, they're fancying it. We ain't just going defensive here and hoping they miss. Get our gun death bowler on... mix it up: precise seam-up, the disguised slower ball. We need a breakthrough, a proper wicket, to turn this game around."&lt;/p&gt;

&lt;p&gt;Turn 2 (The Memory Loop):&lt;br&gt;
I interacted with the CLI and fed the system the next event: "Bumrah bowls a searing wide yorker, dot ball."&lt;/p&gt;

&lt;p&gt;Because the system maintains a running matchHistory context window, the agents instantly adapt. On the very next calculation, the Analyst notes the dot ball has spiked the required run rate, and the Advocate adjusts its risk metric based on the momentum shift. The agents remember the match state, ball by ball.&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%2Fwac3bvpxtkxvzwklzt2l.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%2Fwac3bvpxtkxvzwklzt2l.png" alt=" " width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚀 Conclusion&lt;br&gt;
Building this was an incredible exercise in orchestration. By leaning into Gemini's Structured JSON schemas, we bypass the hallucination risks of text-to-text agent chains. By adding Vision and a continuous CLI memory loop, the app stops feeling like a chatbot and starts feeling like an actual assistant sitting in the dugout.&lt;/p&gt;

&lt;p&gt;Thanks for reading! Check out the GitHub repo to run the Virtual Strategy Room locally.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>gemini</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
