惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
C
Cybersecurity and Infrastructure Security Agency CISA
G
Google Developers Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The GitHub Blog
The GitHub Blog
TaoSecurity Blog
TaoSecurity Blog
V
Visual Studio Blog
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
博客园 - Franky
S
Security @ Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
T
Troy Hunt's Blog
B
Blog RSS Feed
A
About on SuperTechFans
IT之家
IT之家
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
J
Java Code Geeks
S
Securelist
T
Threatpost
SecWiki News
SecWiki News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Forbes - Security
Forbes - Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
Docker
N
News and Events Feed by Topic
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
月光博客
月光博客
C
CXSECURITY Database RSS Feed - CXSecurity.com
罗磊的独立博客
H
Hacker News: Front Page
N
News and Events Feed by Topic
N
Netflix TechBlog - Medium
AWS News Blog
AWS News Blog
P
Privacy International News Feed
Scott Helme
Scott Helme
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Vulnerabilities – Threatpost
The Register - Security
The Register - Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
🏏 Captain Cool: The Multi-Agent IPL Match Strategist Built on Google Gemini
GitPhantom70 · 2026-05-17 · via DEV Community

🏏 "Captain Cool" — The Multi-Agent IPL Match Strategist Built on Google Gemini

This is a submission for the Google Gemini Multi-Agent Hackathon! Powered by Google Antigravity and built entirely on the next-generation Google Gemini Stack.


🚀 The Vision

In cricket-crazy nations, fans don't just watch the game—they play the role of "armchair captains," constantly arguing about who should bowl the 19th over, when the strategic timeout should be taken, or how the field should be set.

"Captain Cool" brings this tactical war room to life! It acts as an autonomous virtual IPL Captain, leveraging multiple collaborative Gemini-powered agents to debate the next tactical move in a live match, the way MSD, Rohit, or Gambhir would.

It takes real-time variables—innings, overs, wickets, pitch type, venue, and dew factor—and outputs a calculated strategy backed by numbers, tested through internal debate, and narrated in poetic cricket language.


🏛️ Architecture & Multi-Agent Design

A single prompt wearing four hats is not a true multi-agent system. "Captain Cool" runs a stateful, sequential multi-turn debate between four distinct, named Gemini agents powered by gemini-2.5-flash via the official @google/genai SDK:

🏛️ The Sequential Reasoning Chain

Instead of a single prompt trying to do everything, "Captain Cool" runs a structured, stateful debate loop across four collaborative stages:

  1. 📥 User Input (Match State): You enter parameters like wickets, score, overs remaining, venue, and pitch images.
  2. 📊 Stats Shastri (The Analyst): Processes the data, triggers the dynamic weather API to assess local Dew Factor, and evaluates historic matchup metrics.
  3. 🧠 Thala Dhoni (The Strategist): Takes Shastri's empirical report and proposes the initial tactical game plan (e.g., bowling Bumrah straight).
  4. 🔥 Gautam Gambhir (Devil's Advocate): Scrutinizes the proposal for high-risk tactical blind spots (e.g., spin slipping on wet dew grass) and issues an intense critique.
  5. 🧠 Thala Dhoni (Rebuttal & Resolution): Dhoni reviews the challenge, adapts or defends his strategy, and locks in the optimal final plan.
  6. 🎙️ Harsha Bhogle (Poetic Commentator): Translates the final complex captaincy decision into highly engaging cricket storytelling and vocal commentary.

🛠️ The Hard Requirements (How We Checked Every Box)

1. Three or More Collaborative Agents

  • 📊 Stats Shastri (The Analyst): The numbers engine. Strictly clinical and quantitative.
  • 🧠 Thala Dhoni (The Strategist): Calm, game-aware mastermind. Proposes simple, impactful strategies.
  • 🔥 Gautam Gambhir (The Devil's Advocate): High-intensity critic. Aggressively challenges Dhoni’s plans to uncover blind spots.
  • 🎙️ Harsha Bhogle (The Commentator): The final narrator, turning tactical jargon into beautiful cricket poetry.

2. Live Tool Use (Function Calling)

We implemented three real-world grounding tools that run on our Next.js API server to provide empirical data to the agents:

  • fetch_weather_and_dew_factor: Dynamically calls the Open-Meteo API using coordinates of the target IPL stadium to fetch humidity, temperature, and predict dew factor in real-time.
  • calculate_match_win_probability: A custom mathematical model assessing runs required, wickets remaining, balls remaining, and pitch difficulty.
  • fetch_head_to_head_stats: Performs direct player-vs-player matching on a database of legendary IPL matchups.

3. Multi-Turn Reasoning Loop (The Internal Debate)

When you submit a match state, the server launches the sequential debate. Dhoni proposes, Gambhir dissents, Dhoni addresses the critique in a rebuttal phase, and the consolidated layout is resolved before the commentator ever speaks.

4. Explainability for Casual Fans

The final output is translated by Harsha Bhogle into highly engaging commentary, explicitly detailing the "Why This, Not That" (e.g. why we prioritized Bumrah's length control over Narine's spin mystery under heavy dew).


🌟 5/5 Stretch Goals Achieved!

We didn't just stop at the requirements. We hit all five optional stretch goals:

  1. Real-time mode: A built-in web scraper extracts live match states directly from Cricbuzz URLs using Gemini 2.5 JSON mode.
  2. Voice in/out: The "Listen to Harsha" button uses the browser's Web Speech API to broadcast the final commentary out loud.
  3. Confidence Score & Counterfactuals: Animated circular dials display exact win-probabilities, and Gambhir's critiques provide counterfactual modeling.
  4. Memory Across Overs: The system maintains an internal memory log of previous overs, passing context back into the prompt to ensure a cohesive 20-over strategy.
  5. Multimodal Pitch Image: Users can upload a screenshot of the pitch, which is encoded and passed to Gemini Vision. Stats Shastri literally "looks" at the pitch cracks and grass to adjust his metrics!

💻 Tech Stack

  • Core: Next.js (App Router, Tailwind CSS, TypeScript).
  • AI Engine: Official @google/genai TypeScript SDK.
  • Models: gemini-2.5-flash via Google AI Studio.
  • UI/UX: Glassmorphism dashboard with an interactive SVG Stadium Field mapping and dynamic circular probability gauges.
  • Voice: Web Speech API for TTS synthesis of Harsha's commentary.

🎙️ Deep Dive: The Agent Prompts

📊 Stats Shastri Prompt

You are "Stats Shastri", a highly clinical, numbers-driven cricket analyst who talks in percentages, head-to-head records, pitch characteristics, boundary sizes, and climate dew risks. Analyze the match situation and give a structured, logical summary of the current numbers. Avoid metaphors.

🧠 Thala Dhoni Prompt

You are "Thala Dhoni", a legendary IPL Captain known as "Captain Cool". You possess ultimate match awareness, cool-headed composure, and deep tactical mastermind capabilities. Propose the single best tactical next step based on match situation and Stats Shastri report. Explain your reasoning in calm, authoritative, captain's language.

🔥 Gautam Gambhir Prompt

You are "Gautam Gambhir", a fiercely intense, brutally honest, and aggressive cricket mind. You serve as the Devil's Advocate. Your job is to aggressively challenge Thala Dhoni's proposed tactical decision. Point out what Dhoni missed! speak with edge, passion, and tactical grit.

🎙️ Harsha Bhogle Prompt

You are "Harsha Bhogle", the iconic, poetic, and beloved voice of Indian cricket commentary. Translate this intense internal captaincy debate into highly engaging, classic cricket storytelling. Explain the final decision in commentary-style English and details the "Why This, Not That" in an educational way.

🔗 AI Studio Prompt Link

Check out our Harsha Bhogle agent prompt directly in Google AI Studio:
View Harsha Bhogle Prompt on Google AI Studio


📸 Dashboard Walkthrough (The Wow Factor)

Captain Cool Dashboard Mockup

Live Demo Scenario: CSK vs GT (IPL 2023 Final)

  • Scenario: 10 runs needed off 2 balls, Ravindra Jadeja on strike, Mohit Sharma bowling, Ahmedabad.
  • Stadium Visualizer: Renders short boundaries, pitch strip coloring, and live player strike arrangements.
  • Stats Shastri shows that Jadeja strikes at 129% against Mohit Sharma but has been dismissed twice.
  • Thala Dhoni wants to target the straight boundary.
  • Gautam Gambhir aggressively argues that Mohit will bowl outside off-stump to avoid the leg-side swing, recommending a deep third-man cover.
  • Harsha Bhogle synthesizes this into an epic commentary package!

🎥 Watch it in Action!

Here is a recording of our browser session simulating the agent debate:

Captain Cool Agent Debate Demo


🚀 How to Run Locally

  1. Clone the Repo:

    git clone https://github.com/GitPhantom700/captian-cool.git
    cd captian-cool
    
  2. Install dependencies:

    npm install
    
  3. Setup your environment:
    Create a .env.local file and add your Google Gemini API key:

    GEMINI_API_KEY=your_gemini_api_key_here
    

    (Security Note: NEVER commit your actual API key to GitHub. The .env.local file is hidden by default. The blog post should only show the placeholder text your_gemini_api_key_here!)

  4. Launch:

    npm run dev
    

    Open http://localhost:3000 on your browser!


Thank you to Google Antigravity and the Gemini Developer team for hosting this exceptional event! Let us know your thoughts on Captain Cool in the comments!