AI Systems & Agents
September 8, 2026
10 min read

Behind the Multi-Agent Architecture of Panda FPL

How a Swahili-inspired vision, high-stakes East African mini-leagues, RAG on official rules, and ClubElo data power a conversational FPL strategist for 10M+ managers.

Jack Mkimbo
Jack Mkimbo
Software Engineer & AI Systems Developer

In Swahili, the word Panda carries an unmistakable imperative: it means to climb.

To climb a steep hill, to climb a tree, or—most crucially for football obsessives across East Africa—to climb the global Fantasy Premier League (FPL) rank tables.

Across Kenya and the wider continent, football is not a passive pastime; it is cultural currency. Every weekend, millions of fans participate in fiercely competitive private mini-leagues. In Nairobi offices, university WhatsApp groups, and neighborhood barbershops, managers put real money on the line in pooled cash leagues where bragging rights and reputations are won or lost on a single Gameweek captaincy choice.

Yet, every single Friday night, the same frantic ritual unfolds: You are sitting at dinner with friends, toggling frantically between 8 different browser tabs—Reddit threads, Twitter injury leaks, official press conference embargo quotes, expected goals (xG) spreadsheets, and price change prediction sites—agonizing over whether to take a -4 point penalty hit 20 minutes before the deadline.

When I set out to build Panda FPL, the vision was simple: bring elite, institutional-grade decision intelligence directly into WhatsApp.

Here is the story of how Panda FPL was inspired, why we chose a messaging-first architecture, and how we engineered a collaborative multi-agent "War Room" grounded in Retrieval-Augmented Generation (RAG) and ClubElo data to deliver deep, strategic, and data-grounded tactical briefings in sub-10 seconds.

Panda FPL Multi-Agent Architecture
Panda FPL Multi-Agent Architecture

1. The 10 Million Manager Market & Why WhatsApp First#

Fantasy Premier League has exploded into a global phenomenon with over 10 million registered managers worldwide. While its roots are in the UK, its fastest-growing and most passionate communities span Africa (Kenya, Nigeria, South Africa, Egypt), Southeast Asia, and Latin America.

When designing the product, the instinct of many startup founders is to build a native mobile app (iOS/Android) or a complex web dashboard. We deliberately chose WhatsApp as our primary launch channel:

  1. Zero Download Friction: Asking a user to download a 60 MB mobile app from the App Store, create an account, verify an email, and configure push notifications introduces massive drop-off. On WhatsApp, onboarding takes 5 seconds: they send a single message and are immediately chatting with an expert strategist.
  2. Living Where the Banter Already Happens: Football fans do not discuss weekly lineups in isolated SaaS dashboards; they banter in WhatsApp group chats. By living in WhatsApp, users can copy-paste Panda’s transfer analysis directly into their rival group chats within seconds.
  3. Resilience Over Spotty Data: In emerging markets, users frequently run on metered mobile data bundles or spotty 3G/4G connections. A heavy React web dashboard or native app can stutter or fail to load; WhatsApp messages and voice notes slip through reliably.

Omnichannel by Design#

While WhatsApp serves as our flagship interface today, the backend service layer is completely decoupled from the transport channel.

The entire multi-agent engine, RAG pipeline, and tool registry operate behind a clean API gateway. If market dynamics evolve or user needs dictate, the exact same backend is already architected to power a Telegram bot, a native mobile application, a Discord community bot, or an interactive web dashboard without rewriting a single line of strategic logic.


2. Why Monolithic Prompts Fail on Fantasy Sports#

If you paste an FPL question into a general-purpose consumer LLM chat interface:

"I have £0.8m in the bank and 1 free transfer. Should I sell Saka for Palmer, take a -4 hit for Isak, and who is the safest captain against Everton?"

the model sounds remarkably confident—and will almost certainly give you disastrous advice:

  • Hallucinated Rosters & Prices: It will recommend buying players who transferred to Saudi Arabia or the German Bundesliga two seasons ago, or invent player prices out of thin air.
  • Midweek European Confusion: General training data frequently confuses Wednesday night UEFA Champions League matches with Saturday domestic Premier League fixtures, miscalculating rest days and difficulty.
  • Rule Violations: It will casually suggest buying a 4th Arsenal player (violating the official 3-players-per-club rule) or suggest starting 6 midfielders in an illegal formation.

An LLM is a phenomenal reasoning engine, but it is not a calculator, an official rulebook, or a real-time database. Cramming an entire 15-player squad, 20 club schedules, and rule manuals into one giant system prompt blows up token costs, degrades reasoning, and pollutes the context window with irrelevancies. In competitive fantasy sports, the ultimate benchmark is not instant conversational fluff—it is rigorous tactical precision, factual accuracy, and game-theoretic insight.

To solve this, we decoupled the decision engine into an interactive Multi-Agent War Room.


3. Inside the Specialist War Room Multi-Agent Architecture#

Rather than asking one model to do everything, Panda FPL treats every incoming inquiry as a collaborative mission coordinated by a centralized supervisor:

System Flowchart
Loading system architecture diagram...

The Specialist Breakdown#

Every agent in the War Room has a strictly scoped responsibility:

  1. The Supervisor (Traffic Controller): Uses lightweight, fast classification to determine user intent. If the query is simple banter ("Morning Panda!"), it bypasses all sports tools and replies instantly. If it requires analysis, it formulates a strict routing sequence.
  2. The Account Agent: Manages point-in-time personal account data (overall rank, live matchday scores, bank balance, and chips remaining). It also tracks volatile squad state—such as when a user tells the bot mid-week: "I just sold Saka for Foden in the official app".
  3. The Tactician: The master game theorist. Evaluates multi-gameweek transfer planning, captaincy matrices, chip timing (Wildcard, Free Hit, Bench Boost), and -4 hit math.
  4. The Scout: Focuses exclusively on granular player metrics (xG, xA, baseline bonus points, penalty taker status, and starter probabilities).

Squad Token Masking to Save Sixty-Five Percent on Context Tokens#

One of our most impactful architectural breakthroughs was Squad Token Masking.

A complete 15-player FPL squad—with purchase costs, selling prices, injury flags, and upcoming fixtures—consumes thousands of prompt tokens. If a manager asks: "Who is the best budget defender to replace my injured center-back?", the model has zero reason to inspect their goalkeepers or strikers.

The routing engine dynamically assigns a positional squad mask (ALL, ATTACKERS, DEFENDERS, or NONE):

  • Queries about strikers or wingers receive only ATTACKERS.
  • Queries about goalkeepers and fullbacks receive only DEFENDERS.
  • Account balance inquiries receive NONE.

This reduces prompt tokens by up to 65%, cuts inference latency by more than half, and prevents the model from hallucinating bench players into discussions about forwards.

The Architectural Evolution to Unified Execution#

While this specialized swarm provided clean conceptual boundaries, real-world production revealed critical trade-offs: chaining independent subagent calls introduced serialized latency, and exposing dozens of micro-tools across agents created decision drift. As our user base grew, we evolved this architecture from a loose multi-agent swarm into a Unified Agent with Pre-Execution Intent Gating, cutting latency in half and raising tool accuracy past 98%. (I detail that complete transition in Part 2).


4. Heavy-Duty RAG & Deterministic Grounding (No Guesswork)#

The golden engineering rule of Panda FPL: The LLM never calculates statistics. It reasons strictly over verified RAG and deterministic tool outputs.

1. Vector RAG on the Official FPL Rulebook#

FPL rules are notoriously nuanced:

  • How does auto-substitution work when a defender does not play?
  • What happens to rolled transfers when you activate a Free Hit chip?
  • How does the Bonus Point System (BPS) calculate baseline defensive contributions (CBIT)?

We embedded the complete official Premier League rulebook and historical seasonal updates into a vector store. When a manager asks an edge-case question ("If my vice-captain plays but gets 0 minutes, does my captain double?"), the Tactician runs semantic retrieval over verified rule chunks, providing a definitive, cited answer rather than an educated guess.

2. The ClubElo Fixture Difficulty Engine#

The official Fantasy Premier League game assigns every match a basic Fixture Difficulty Rating (FDR) between 1 and 5. Experienced managers know these numbers are deeply flawed: they treat an away fixture against an in-form Newcastle the same as a home match against a struggling Everton.

To provide genuine competitive advantage, we built a custom tool integrating ClubElo ratings:

typescript
// Conceptual ClubElo Fixture Analysis Tool Declaration
export const analyzeFixtureSwingsTool = {
  name: "analyze_fixture_swings",
  description:
    "Calculates rolling fixture difficulty swings for EPL teams over a 1 to 6 gameweek horizon using normalized ClubElo ratings.",
  parameters: {
    type: "OBJECT",
    properties: {
      teamName: {
        type: "STRING",
        description: "Premier League Club (e.g. Arsenal, Chelsea)",
      },
      horizon: {
        type: "INTEGER",
        description: "Number of gameweeks to analyze (1 to 6)",
      },
      filterCompetitions: {
        type: "BOOLEAN",
        description:
          "Enforces strict Premier League only filtering (ignores UCL/FA Cup matches)",
      },
    },
    required: ["teamName", "horizon"],
  },
};

Our backend computes rolling fixture swings by isolating Premier League fixtures only, applying home/away Elo adjustments, and calculating defensive clean sheet odds. The returned JSON is passed to the Tactician, which translates the raw mathematical probability into sharp, actionable advice ("Arsenal’s defensive schedule turns green from GW12 through GW16; target Gabriel now before price rises").


5. Multimodal Banter & Voice Notes on the Move#

Real-world football managers rarely communicate in textbook prose. They send voice notes while stuck in Nairobi traffic or walking home from the stadium.

To meet users naturally:

  • Audio Voice Notes: Inbound .ogg voice notes received via WhatsApp are transcribed and normalized through multimodal pipelines in a single pass, capturing nuanced tactical queries while preserving voice fidelity.
  • Sheng & Slang Extraction: Our intent extraction pipeline understands English, Swahili, and Kenyan street slang (Sheng). Whether a manager types "Who should I cap?" or sends a voice note saying "Nani anafaa kuvaa armband this weekend?", the system resolves to the identical captaincy evaluation pipeline.
  • Interactive WhatsApp Buttons: For critical next steps, Panda dynamically attaches quick-action WhatsApp buttons (btn_confirm_transfer, btn_pick_captain), allowing users to make decisions with a single thumb tap.

What Next#

Panda FPL was built to prove that specialized AI assistants do not need to look like generic chatbots. By combining the cultural passion of East African football with multi-agent orchestration, RAG, and deterministic data grounding, we created a tool that genuinely helps managers Panda—climb the ranks and win their leagues.

Explore the complete engineering series behind Panda FPL:


Ready to climb your mini-league table? Start chatting with Panda FPL on WhatsApp today, or check out our complete Panda FPL Engineering Case Study.

Looking to design specialized multi-agent architectures, RAG pipelines, or WhatsApp conversational systems? Let's connect for an architecture consultation.

Multi-Agent AIRAGClubEloFantasy Premier LeagueWhatsApp AISystem Design
Share article:
X (Twitter)LinkedInWhatsApp
Jack Mkimbo
Written by Jack Mkimbo

Software engineer specializing in AI systems integration, multi-agent orchestration, and full-stack SaaS product development. Co-Founder & CTO at AcidCat Digital Marketing and creator of Patofy & Panda FPL.

Related Deep Dives

View all →