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

推荐订阅源

IT之家
IT之家
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Visual Studio Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
小众软件
小众软件
L
LangChain Blog
Cyberwarzone
Cyberwarzone
美团技术团队
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tor Project blog
V
V2EX
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
L
LINUX DO - 最新话题
Recent Announcements
Recent Announcements
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
aimingoo的专栏
aimingoo的专栏
人人都是产品经理
人人都是产品经理
F
Full Disclosure
V2EX - 技术
V2EX - 技术
The Cloudflare Blog
博客园 - 叶小钗
T
Threat Research - Cisco Blogs
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Latest news
Latest news
S
Security @ Cisco Blogs
Spread Privacy
Spread Privacy
Project Zero
Project Zero
K
Kaspersky official blog
MyScale Blog
MyScale Blog
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
罗磊的独立博客
Vercel News
Vercel News
N
News and Events Feed by Topic
A
Arctic Wolf
C
CERT Recently Published Vulnerability Notes

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: Building a Multi-Agent IPL Strategist with Google Gemini & ADK
Mayur Kate · 2026-05-17 · via DEV Community

In the high-pressure cooker of T20 cricket, a captain has mere seconds to make decisions that dictate the outcome of a match. Who bowls the death overs? How do you set a field for a rampaging Suryakumar Yadav on a gripping pitch?

For the Agentic Premier League, I set out to solve the captain-strategist problem. Standard AI chatbots are too generic & agreeable to make tough, high-stakes sports decisions. To fix this, I built Captain Cool, a virtual IPL captain powered by the Google Gemini stack.

Instead of a single prompt, Captain Cool uses a Multi-Agent Debate Framework orchestrated via the Google Agent Development Kit (ADK). It actively fetches live weather data, proposes a strategy, aggressively critiques its own plan, and outputs a fan-friendly tactical breakdown.

Here is a deep dive into the architecture, the agentic design, and how to run it yourself.

🏗️ High-Level Design (HLD) & Architecture

To achieve a true "agentic" workflow, the system cannot rely on a single LLM call wearing multiple hats. It requires distinct personas executing a sequential loop.

The application is built on a Python backend wrapping the google-genai SDK and the google-adk. The frontend is a sleek, responsive dashboard built with Streamlit.

The 5-Turn Agentic Loop

Here is the logical flow of our system.

🔬 Low-Level Design (LLD): The Agentic Team & Prompts

To optimize for both speed and deep reasoning, I utilized model routing. The deep-thinking agents (Strategist/Advocate) run on gemini-2.5-pro, while the fast data-gatherers and summarizers (Analyst/Commentator) run on gemini-2.5-flash.

Here are the system prompts engineered for the team:

1. The Stats Analyst (The Tool Caller)

Model: gemini-2.5-flash
Role: To ground the LLM in reality rather than hallucinating conditions.
Prompt:

"You are a precise cricket data analyst. You will receive a JSON of the current match state. Before doing anything else, you MUST execute your provided Python tool call get_venue_weather(venue) to fetch the live temperature and dew risk for the provided stadium. Append this real-world data to the match context and pass it forward."

2. The Strategist (The Captain)

Model: gemini-2.5-pro
Role: The primary decision-maker.
Prompt:

"You are an elite, proactive IPL Captain (think MS Dhoni or Rohit Sharma). Review the match state and the Analyst's weather report. Propose the exact next tactical decision: who bowls the next over, the field setup, and how to utilize remaining bowlers for the death. Be decisive and explain your cricketing reasoning based on matchups and pitch conditions."

3. The Devil's Advocate (The Skeptic)

Model: gemini-2.5-pro
Role: To force the AI to self-correct and avoid obvious traps.
Prompt:

"You are a ruthless cricket tactician and skeptic. Review the Strategist's proposal. Your ONLY job is to attack this plan. Point out vulnerabilities, batter vs. bowler mismatches, or instances where they ignored the dew factor or pitch conditions. Do not be polite. Highlight the risk of their strategy."

4. The Match Commentator (The Explainer)

Model: gemini-2.5-flash
Role: Fan-facing communication and stretch-goal execution.
Prompt:

"You are a charismatic cricket commentator like Harsha Bhogle. Take the Strategist's final defended decision and explain the internal debate to the fans in exciting, natural cricket language. YOU MUST INCLUDE TWO THINGS AT THE END: 1) A Confidence Score (0-100%) for the decision. 2) A 'Counterfactual' explaining exactly how the win probability would drop if they had taken the safe route instead."


⚙️ Real Tool Calling in Action

Instead of hardcoding a JSON payload to fake "live context," the Stats Analyst agent uses Google Gemini's native function calling to execute a real Python script.

When the user inputs "Wankhede Stadium", the Analyst executes a function that pings the free Open-Meteo API, parses the coordinates, and returns the exact live temperature and humidity to determine the dew risk. This proves the system can break out of its training data and interact with the live internet to make decisions.


📸 End-to-End Walkthrough: The Wankhede Scenario

Let's look at the system in action during a high-stakes scenario.

The Situation: 2nd Innings. 15.6 overs gone. 67 runs needed off 24 balls. Suryakumar Yadav (75 off 34) is on strike. Pitch is slowing down and gripping.

[Insert Screenshot of your Streamlit Sidebar Input here]

Once we click "Generate Strategy", the ADK routes the inputs through our 5-turn debate.

[Insert Screenshot of the Chat UI showing the Strategist and Devil's Advocate debate here]

The Debate:

  • The Strategist proposes bowling Rashid Khan in the 17th over, arguing that we need a wicket-taking option immediately on a gripping pitch, saving Bumrah for the absolute death (18 and 20).
  • The Devil's Advocate violently objects, calling it a "glaring vulnerability" and a "perilous gamble" because SKY is a master at dissecting wrist-spinners and is fully set.
  • The Defense: The Strategist absorbs the critique but defends the move, stating that bowling a medium pacer like Mohit Sharma is just as risky but without the wicket-taking upside. It's a calculated necessity.

Finally, the Commentator agent wraps it up, translating the intense AI reasoning into an engaging broadcast format, complete with a 75% confidence score and a detailed counterfactual.

[Insert Screenshot of the final Counterfactual output box here]


🎯 Hitting the Stretch Goals

This architecture was specifically designed to hit the hackathon's advanced requirements:

  • Explainability: The Commentator removes ML jargon and outputs pure cricket logic.
  • Confidence & Counterfactuals: Hardcoded into the final output agent for deep fan insight.
  • Memory Across Overs: The Streamlit session_state appends the final strategy to a match_history list. If the user advances the over from 15.6 to 16.0, the context is fed back into the Strategist, ensuring the AI remembers its previous overs!

💻 Tech Stack

  • Google Gemini API: gemini-2.5-pro & gemini-2.5-flash
  • Google Agent Development Kit (ADK): Orchestrating the multi-agent pipeline.
  • Google Antigravity: Google's agentic IDE used for 100% of the vibe-coding and environment setup.
  • Streamlit: For the rapid, chat-based dashboard UI.

🏆 Try it Yourself!

Want to see the agents debate your favorite IPL scenarios? The complete codebase is open-source and ready to run locally.

GitHub Repository: https://github.com/mayureshkate/captain-cool-ipl/tree/main

Quick Start Guide:

# 1. Clone the repository
git clone [https://github.com/mayureshkate/captain-cool-ipl.git](https://github.com/mayureshkate/captain-cool-ipl.git)
cd captain-cool-ipl

# 2. Set up the virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Add your Gemini API Key
echo "GEMINI_API_KEY=your_api_key_here" > .env

# 5. Launch the Streamlit App
streamlit run app.py --server.port 3000

Enter fullscreen mode Exit fullscreen mode

Cricket is a captain's game. But with Gemini and ADK, it's an agent's game too.

Built for the Agentic Premier League Hackathon.


Enter fullscreen mode Exit fullscreen mode