Machine Learning & AI

Building a Rugby Pundit Agent Crew over the weekend

Written by Gareth Austen | Feb 17, 2025 6:18:57 PM

In my previous posts, I explored the importance of tools in developing AI Agents and discussed how agents can extend the capabilities of LLMs by using external tools. This time, I’m excited to share a real-world example: a Rugby Pundit Agent that I built on a weekend afternoon using the Cursor IDE Composer and CrewAI as an agent framework.

Overview

The goal was to ground the last couple of posts in a real world example, use an open-source agent framework and develop some tools to get up-to-date information. This was also a good opportunity to experiment with Cursor's Composer mode to set a project up from scratch. 

Objective: Develop an AI Agent that acts as a group of rugby pundits from different nations to offer perspective on this years tournament.

Data Source: It gathers the latest news on the Six Nations tournament from a Google search tool.

Perspectives: The agent simulates pundit opinions from three different perspectives—one each for Ireland, France, and England.

Outcome: After analyzing the news, the team of agents (or “crew”) collaborates and gives their predictions for the next round of matches.

Why Rugby?

Rugby is a personal interest of mine, I played a long time ago and now I'm a keen fan. The Six Nations is often referred to as rugby's oldest and greatest tournament and is underway at the moment so it made sense to parody some real pundits and see what an Agent can come up with when given access to the internet.

The Tech Stack & Tools

The primary tools I used were the Cursor IDE and crewAI to create and run the Agent. I also used Google for web search and OpenAI's gpt-4o as the main language model.

Cursor

Cursor is a new AI code editor that has a build in Agent named Composer that can help kick-start a project. Composer has a chat interface and I was able to outline what I was trying to achieve and watch it automatically create the files I needed. There are some drawbacks that I'll get into below but overall the time I saved by using Composer instead of having to research and write the code myself can't be understated. 

Pros:

  • Quickly creates a wireframe of the project
  • Excellent for debugging, errors that appear in the terminal you can send directly to composer for assistance resolving
  • Composer wrote 90% of the code in the repo, even when I was writing myself it quickly anticipated what I was trying to do so I could just tab complete

Cons:

  • Sometimes when debugging, composer suggested fixes would break older errors that it had already resolved. It seemed to lack memory or global context of what I was trying to achieve and just resolve the error in isolation. This led to some frustrating debug loops.
  • Not strictly a cursor con but because it wire-framed much of the project the web-search was initially broken and the Agents kept referring to outdated news and rugby matches. They were using knowledge from their training data rather than searching the web for the latest news. This kind of "hallucination" is difficult to detect at first but eventually resolved. 
  • It could not format the output report that I wanted to generate in the right way despite multiple attempts at prompting Composer. I ended up reading the CrewAI docs and making the updates myself. 

crewAI & LangChain Framework

Using crewAI as the orchestration layer and LangChain’s extensive tool integrations, I was able to:

  • Integrate various search and news scraping tools.
  • Configure multiple specialized agents—each simulating a pundit from a different country.
  • Provide specific tasks for the Agents to accomplish. 
  • Aggregate and refine the output from these agents into a coherent set of predictions.

Architecture & Implementation

The full code is available here and there are some example snippets below.

Data Retrieval:

I leveraged LangChain tools to fetch the latest rugby news. These tools query real-time APIs and web sources, ensuring that the agent works with current information. Here's a brief snippet of how this can be accomplished: 

 

Agent Design:

  • Four Expert Agents: Each is assigned a distinct role:
    • Rugby Research Analyst: Gather the latest match information, news and tournament standings
    • Irish Pundit: Focuses on local analysis and sentiment from Irish media.
    • French Pundit: Analyzes news in French and offers perspectives influenced by France’s rugby culture.
    • English Pundit: Provides insights based on English commentary and historical data.
    • Crew Coordination: The agents form a “crew” using crewAI’s orchestration methods. They debate, refine opinions, and then converge on a set of predictions.

The 3 regional agents were created simply using the crewAI Agent class as follows:

Prediction Generation:

After collecting diverse viewpoints, a coordinating agent compiles the opinions and uses simple aggregation algorithms to provide final match predictions. This was achieved by using the crewAI Task class and the host Agent as defined below: 

 

Rapid Prototyping with Cursor IDE:

The entire project was developed in a weekend. Cursor’s features — such as multi-line code completion and intelligent context awareness — helped streamline the process, from setting up the project structure to integrating the tools and debugging in real-time.

Agent Predictions for Round 3

If your are not familiar with the Six Nations tournament: there are 5 round which take place over a 7 week period beginning in February. Each team plays each other team only once and so each game is vital to win the tournament.

For some reason, the crew only predicted the result for 2 of the 3 games in Round 3 and is basing it's insights on Round 1 instead of Round 2... even though in the standings table it recognises that the team's have played two games each. 

Wales vs Ireland

  • Predicted Score: Wales 15 - 30 Ireland
  • Key Factors:
    1. Ireland's current form and confidence after back-to-back wins.
    2. Wales' struggle to find form, having lost both of their previous matches.
  • Winner's Advantage: Ireland has demonstrated resilience and tactical superiority, making them favourites to extend their winning streak against a struggling Welsh team.

England vs Scotland

  • Predicted Score: England 25 - 20 Scotland
  • Key Factors:
    1. England's need to bounce back strategically after their loss to Ireland.
    2. Scotland's recent win over Italy, which may give them confidence heading into the match.
  • Winner's Advantage: England's historical performance at Twickenham and their depth in skilled players should help them secure a narrow victory against a determined Scottish side.

Conclusions & Predictions 

Overall, Agents creating Agents is pretty trivial and can be achieved in a couple of hours. That said, I wouldn't trust this Agent, I didn't write myself and I didn't take the time to go through each line. It's not always right which you can see from the weekly round-up report where there are inconsistencies and inaccuracies in the data.

These issues could likely be resolved with a bit more time and effort but this was a quick side project and I just wasn't bothered so take the report with a grain of salt. Let's see how good this Agent was at predicting the results when the team's take to the pitch this weekend. 

Appendix - Round 2 Round-Up Agent Crew Edition