During a high-stakes IPL match, a captain relies on a dugout brain trust: a data analyst pulling matchups, a defensive strategist drawing up lines, and a cynical advisor pointing out how the plan could blow up.
To replicate this, I built Captain Coolβan agentic, multi-agent AI system engineered on the modern Google Gemini stack. It simulates real-time strategic debates to make the final, definitive match call.
π Project Resources
GitHub Repository: `https://github.com/siddhi070306/APL.git
`
ποΈ Architecture Design & Multi-Agent Topology
The application implements a strictly decoupled multi-agent topology using separate client instances, individual system instructions, and specialized runtime configurations via an asynchronous Analyze β Propose β Challenge β Settle pattern managed by a Node.js gateway.
[ User Inputs / Live Cricbuzz URL ]
β
βΌ
[ Express POST /api/strategy ]
β
ββββββββββββββββ΄βββββββββββββββ
βΌ βΌ
1. Stats Guru (Analyst) 2. Captain Cool (Turn 1)
βββ Tool: scraperTool βββ Generates Initial Proposal
β β
βΌ βΌ
[ Extracted HTML/Fallback ] 3. Devil's Advocate (Critic)
β βββ Sharp Tactical Dissent
β β
βΌ βΌ
ββββββββββββββββ¬βββββββββββββββ
βΌ
4. Captain Cool (Turn 2)
βββ Synthesizes Debate & Executes Final Command
End-to-End Simulation Walkthrough
The Match Situation:
Venue: M. Chinnaswamy Stadium, Bengaluru (Short 55m leg-side boundary).
Situation: Chasing team needs 13 runs off 5 balls. A destructive left-handed finisher is on strike. Flat pitch, heavy evening dew.
Dugout Dilemma: Trust the primary right-arm fast yorker specialist cracking under pressure, or bring on the mystery off-spinner?
The Agentic Output Stream:
πΉ 1. Stats Guru Breakdown: "Strike batter hits right-arm pace at a strike-rate of 188.5, but struggles against turning balls sliding into the body (avg 14.2). However, spin economy rates spike by 24% at this venue once dew sets in."
πΈ 2. Captain's Initial Proposal: "We are pulling the pace bowler out of the firing line. I am bringing on the mystery spinner to choke the angles and drag the length back."
π» 3. Devil's Advocate Critique: "Bringing on a spinner with a wet ball at Chinnaswamy is absolute suicide! The dew means zero gripβthat ball is going to turn into a slippery full-toss. With a tiny 55m boundary on the leg side, he will clear the stadium roof."
π© 4. Final Tactical Directive (Captain Cool's Command): "The advisor's warning about the wet ball grip is valid. We adjust. We stick with the fast bowler, but change the line completely. We are bringing in the Impact Player to pack the off-side field. Bowler will deliver wide, cross-seam deliveries outside off-stump, out of the batter's swinging arc, completely removing the short leg-side boundary from play."
Conclusion
By separating concerns into distinct, cooperating Gemini agents, Captain Cool surfaces hidden environmental risks (like dew factoring into wet-ball dynamics) through collaborative filtering. Building this project inside Google Antigravity demonstrated how seamlessly complex multi-agent reasoning structures translate to lightweight Node.js/React codebases.
Top comments (0)