DEV Community

Amit Sumit
Amit Sumit

Posted on

Building CaptainCool Nexus — An Autonomous IPL Tactical Intelligence System with Google Gemini & ADK

Introduction

Cricket captaincy is one of the most complex real-time decision systems in sports.

Every over involves:

  • probabilistic reasoning
  • psychological pressure
  • pitch behavior
  • momentum shifts
  • matchup analysis
  • field geometry
  • risk management

Traditional AI chatbots fail here because captaincy is not a single-answer problem.

It is a continuous tactical debate.

So instead of building another “AI cricket assistant”, I built:

War zone

CaptainCool Nexus

An autonomous AI-powered IPL tactical operating system built entirely on the Google Gemini ecosystem using:

  • Gemini 2.5 Pro
  • Gemini 2.5 Flash
  • Google ADK
  • Gemini Function Calling
  • Gemini Vision
  • Antigravity
  • Multi-Agent Orchestration

The goal was to create a system that thinks like an IPL war room.


The Core Idea

CaptainCool Nexus simulates elite cricket intelligence through autonomous Gemini agents that:

  • debate tactics
  • challenge assumptions
  • retrieve tactical memory
  • simulate alternate futures
  • analyze pitch conditions
  • generate field placements
  • compute pressure states
  • explain decisions like real commentators

This is not a chatbot.

It is a tactical intelligence operating system.


Why Multi-Agent Architecture?

Cricket captaincy cannot be solved reliably with a single prompt.

A single model tends to:

  • overfit to one strategy
  • ignore tactical tradeoffs
  • lack internal disagreement
  • miss psychological context

So I designed a true multi-agent architecture using Google ADK.

Each agent has:

  • independent prompts
  • separate reasoning style
  • separate tactical role
  • contextual memory
  • tool permissions

Gemini Agent System

Field

Match Strategist

Proposes bowling changes, batting adjustments, and tactical plans.

Statistical Intelligence Agent

Analyzes:

  • matchup history
  • strike rates
  • death-over patterns
  • projected scoring

Conditions Analyst

Evaluates:

  • dew
  • pitch deterioration
  • grip
  • bounce
  • turn probability

Momentum Psychologist

Tracks:

  • pressure spikes
  • emotional momentum
  • collapse probability
  • crowd pressure

Devil’s Advocate

Aggressively attacks tactical assumptions and forces strategic revisions.

Captain Persona Engine

Models tactical personalities of:

  • Dhoni
  • Rohit
  • Kohli
  • Gambhir
  • Hardik
  • Cummins

Tactical Simulator

Runs counterfactual simulations and alternate futures.

Commentary Narrator

Transforms AI reasoning into broadcast-style tactical commentary.


Google ADK Orchestration

The entire orchestration pipeline runs through Google ADK.

The orchestrator:

  1. routes tactical context
  2. activates relevant agents
  3. manages debate rounds
  4. propagates confidence
  5. invokes tools
  6. retrieves memory
  7. synthesizes consensus

This creates visible autonomous collaboration instead of fake “multi-agent roleplay”.


Gemini Function Calling

One major requirement was genuine tool usage.

I implemented native Gemini function calling for:

  • player matchup analytics
  • pressure index calculations
  • tactical simulations
  • venue intelligence
  • pitch analysis
  • live match parsing

The agents autonomously decide:

  • when to invoke tools
  • which tools to use
  • how to incorporate outputs

This made the reasoning process significantly more believable.


Tactical Debate Engine

The debate engine became the heart of the system.

Instead of generating a single answer:

  1. Strategist proposes
  2. Stats Agent validates
  3. Conditions Analyst critiques
  4. Devil’s Advocate attacks
  5. Persona Engine modifies intent
  6. Tactical Simulator projects outcomes
  7. Consensus Engine finalizes decision

The UI visualizes:

  • confidence shifts
  • rejected strategies
  • tactical pruning
  • consensus convergence
  • risk propagation

This makes the system feel alive.


Tactical Multiverse Engine

One of my favorite features was the Tactical Multiverse Engine.

The system simulates alternate universes:

  • aggressive bouncer attack
  • spin introduction
  • defensive wide-line strategy
  • field compression
  • matchup traps

Each branch computes:

  • win probability delta
  • collapse risk
  • momentum volatility
  • tactical tradeoffs

This transforms tactical analysis into a probabilistic simulation system.


Tactical Memory System

CaptainCool Nexus continuously remembers:

  • failed plans
  • successful overs
  • pressure spikes
  • batsman tendencies
  • field outcomes
  • captain behavior

Agents reference memory dynamically during debates.

Example:

“The slower bouncer failed against Pant in Over 14.”

This created innings continuity instead of isolated predictions.


Multimodal Intelligence

Gemini Vision powers:

  • pitch image analysis
  • scorecard screenshot parsing
  • contextual image reasoning

The system can infer:

  • dryness
  • crack density
  • turn expectation
  • dew absorption
  • pace deterioration

This made the platform feel like a real tactical intelligence system.


Observability & Telemetry

One important goal was making AI reasoning observable.

The observability dashboard tracks:

  • orchestration cycles
  • token throughput
  • active agents
  • confidence propagation
  • memory retrieval
  • live telemetry
  • tool execution traces

Most AI projects hide orchestration.

CaptainCool Nexus exposes it.


Tech Stack

Frontend

  • Next.js 15
  • TypeScript
  • TailwindCSS
  • Framer Motion
  • shadcn/ui

AI Stack

  • Gemini 2.5 Pro
  • Gemini 2.5 Flash
  • Google ADK
  • Gemini Function Calling
  • Gemini Vision

State & Visualization

  • Zustand
  • React Query
  • Recharts
  • React Flow

Deployment

  • Vercel

Biggest Engineering Challenge

The hardest challenge was balancing:

  • believable tactical intelligence
  • orchestration complexity
  • UI responsiveness
  • streaming reasoning
  • explainability

Without turning the system into fake “AI theater”.

The solution was:

  • visible reasoning evolution
  • observable telemetry
  • real tactical disagreement
  • confidence propagation
  • structured orchestration

What I Learned

This project completely changed how I think about AI systems.

The future is not:

“one super prompt”

The future is:

  • orchestration
  • specialization
  • memory
  • simulations
  • explainability
  • autonomous collaboration

Agentic systems become significantly more powerful when models can:

  • disagree
  • revise
  • simulate
  • remember
  • critique

Final Thoughts

CaptainCool Nexus started as a hackathon project.

But it evolved into something much larger:
an experiment in autonomous tactical intelligence.

Cricket became the perfect medium for exploring:

  • multi-agent reasoning
  • strategic simulations
  • memory systems
  • probabilistic decision-making
  • AI explainability

And Google Gemini + ADK made that possible.


Links

GitHub Repository

GitHub logo AmitChigare / captaincool-nexus

Autonomous IPL Tactical Intelligence System powered by Gemini Multi-Agent Orchestration

CaptainCool Nexus 🏏🤖

CaptainCool Nexus is a research-grade, autonomous AI cricket command center Built on a high-performance Next.js 15 App Router architecture, it simulates a state-of-the-art Formula 1 pit-wall and military command center, entirely dedicated to real-time cricket tactical intelligence.

🚀 Tech Stack

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS v4 (with custom Dark Tactical Theme)
  • Animations: Framer Motion
  • UI Components: shadcn/ui & Lucide React icons
  • State Management: Zustand
  • Data Fetching: React Query
  • AI Ecosystem integration: Gemini 2.5 Pro, Gemini 2.5 Flash, Vertex AI, Google ADK

📂 Architecture Structure

This repository is organized to support multi-agent collaboration, memory persistence, and telemetry:

src/
├── agents/
│   ├── orchestration/    # Coordinates Gemini 2.5 Pro and Flash
│   ├── persona/          # "Captain" Persona (MS Dhoni style logic)
│   └── consensus/        # Resolves tactical conflicts between agents
├── components/
│   ├── dashboard/        # Main F1 Pit-wall UI (CommandCenter.tsx)
│   ├── panels/

Screenshots

War Room

Tactical Debate Engine

Multimodal Intelligence

Field Intelligence Engine


Built with Google Gemini, Google ADK, and Antigravity for Agentic Premier League by GDG Cloud Pune.

Top comments (0)